diff options
Diffstat (limited to 'drivers/serial/altera_jtag_uart.c')
-rw-r--r-- | drivers/serial/altera_jtag_uart.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c index 0573c7a..9a81402 100644 --- a/drivers/serial/altera_jtag_uart.c +++ b/drivers/serial/altera_jtag_uart.c @@ -8,10 +8,28 @@ #include <common.h> #include <watchdog.h> #include <asm/io.h> -#include <nios2-io.h> #include <linux/compiler.h> #include <serial.h> +typedef volatile struct { + unsigned data; /* Data register */ + unsigned control; /* Control register */ +} nios_jtag_t; + +/* data register */ +#define NIOS_JTAG_RVALID (1<<15) /* Read valid */ +#define NIOS_JTAG_DATA(d) ((d)&0x0ff) /* Read data */ +#define NIOS_JTAG_RAVAIL(d) ((d)>>16) /* Read space avail */ + +/* control register */ +#define NIOS_JTAG_RE (1 << 0) /* read intr enable */ +#define NIOS_JTAG_WE (1 << 1) /* write intr enable */ +#define NIOS_JTAG_RI (1 << 8) /* read intr pending */ +#define NIOS_JTAG_WI (1 << 9) /* write intr pending*/ +#define NIOS_JTAG_AC (1 << 10) /* activity indicator */ +#define NIOS_JTAG_RRDY (1 << 12) /* read available */ +#define NIOS_JTAG_WSPACE(d) ((d)>>16) /* Write space avail */ + DECLARE_GLOBAL_DATA_PTR; /*------------------------------------------------------------------ |