summaryrefslogtreecommitdiff
path: root/jtag_uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'jtag_uart.h')
-rw-r--r--jtag_uart.h51
1 files changed, 17 insertions, 34 deletions
diff --git a/jtag_uart.h b/jtag_uart.h
index 4328be7..24317eb 100644
--- a/jtag_uart.h
+++ b/jtag_uart.h
@@ -16,44 +16,27 @@
#define JTAG_UART_BASE 0x806810F0
#define JTAG_UART_SIZE 8
+#define JTAG_UART_IRQ IRQ_JTAG_UART
+#define JTAG_UART_REG_COUNT (JTAG_UART_SIZE / sizeof(uint32_t))
+#define JTAG_UART_FIFO_SIZE 1
#define JTAG_UART_DATA_REG 0
#define JTAG_UART_CTRL_REG 1
-extern struct device jtag_uart_core;
+#define JTAG_UART_DATA_DATA_MASK 0x000000FF
+#define JTAG_UART_DATA_RVALID_MASK 0x00008000
+#define JTAG_UART_DATA_RAVAIL_MASK 0xFFFF0000
+#define JTAG_UART_DATA_RAVAIL_OFF 16
+
+#define JTAG_UART_CTRL_RE_MASK 0x00000001
+#define JTAG_UART_CTRL_WE_MASK 0x00000002
+#define JTAG_UART_CTRL_RI_MASK 0x00000100
+#define JTAG_UART_CTRL_RI_OFF 8
+#define JTAG_UART_CTRL_WI_MASK 0x00000200
+#define JTAG_UART_CTRL_AC_MASK 0x00000400
+#define JTAG_UART_CTRL_WSPACE_MASK 0xFFFF0000
+#define JTAG_UART_CTRL_WSPACE_OFF 16
-#if 0
-#define JTAG_UART_CTRL_REG (0)
-#define JTAG_UART_DATA_REG (1)
-#define JTAG_UART_BASE_ADDR (0x806810F0)
-#define JTAG_IRQ_MASK (1 << 1)
-#define JTAG_UART_FIFO_SIZE (1)
-
-struct fifo {
- uint8_t data;
- uint8_t is_write;
-};
-
-struct jtag_uart_priv{
- struct io_reg regs[JTAG_UART_REG_COUNT];
- struct fifo tx_fifo;
-};
-
-#define ALTERA_JTAGUART_DATA_DATA_MSK (0x000000FF)
-#define ALTERA_JTAGUART_DATA_RVALID_MSK (0x00008000)
-#define ALTERA_JTAGUART_DATA_RAVAIL_MSK (0xFFFF0000)
-#define ALTERA_JTAGUART_DATA_RAVAIL_OFST (16)
-
-#define ALTERA_JTAGUART_CONTROL_RE_MSK (0x00000001)
-#define ALTERA_JTAGUART_CONTROL_WE_MSK (0x00000002)
-#define ALTERA_JTAGUART_CONTROL_RI_MSK (0x00000100)
-#define ALTERA_JTAGUART_CONTROL_RI_OFST (8)
-#define ALTERA_JTAGUART_CONTROL_WI_MSK (0x00000200)
-#define ALTERA_JTAGUART_CONTROL_AC_MSK (0x00000400)
-#define ALTERA_JTAGUART_CONTROL_WSPACE_MSK (0xFFFF0000)
-#define ALTERA_JTAGUART_CONTROL_WSPACE_OFST (16)
-
-extern struct io_device jtag_uart_io_device;
-#endif
+extern struct device jtag_uart_core;
#endif /* _JTAG_UART_H_ */