aboutsummaryrefslogtreecommitdiff
path: root/include/ast.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-05 09:16:36 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-10-05 09:16:36 +1100
commitb33fd8dc893e2ea65ceef5dad2fa8173932443e5 (patch)
tree8fbf5bfd56914848ea0369f67fb4438916576ceb /include/ast.h
parent5876e124399cc2e4961020f22b28bfc9abdae3bb (diff)
downloadskiboot-b33fd8dc893e2ea65ceef5dad2fa8173932443e5.zip
skiboot-b33fd8dc893e2ea65ceef5dad2fa8173932443e5.tar.gz
skiboot-b33fd8dc893e2ea65ceef5dad2fa8173932443e5.tar.bz2
plat/palmetto: Fix SIO UART vs UART setup and iBT setup
The AMI images use the virtual UART, not the SIO UART, so configuring the SIO the way we do is incorrect. Additionally, they don't configure the interrupts properly (bad polarity for VUART and bad number for iBT). This reworks the inits to fix that up: - All SIO interrupts are set to level low - Check if VUART is enabled. If yes, configure and use it (and disable SIO UART which hostboot might have left enabled). - Else, reconfigure VUART LPC address and IRQ properly - Configure iBT LPC address and IRQ properly Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/ast.h')
-rw-r--r--include/ast.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/ast.h b/include/ast.h
index 17ee17e..f97aa44 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -36,6 +36,14 @@
#define LPC_HICR6 (LPC_BASE + 0x80)
#define LPC_HICR7 (LPC_BASE + 0x88)
#define LPC_HICR8 (LPC_BASE + 0x8c)
+#define LPC_iBTCR0 (LPC_BASE + 0x140)
+
+/* VUART1 */
+#define VUART1_BASE 0x1e787000
+#define VUART1_GCTRLA (VUART1_BASE + 0x20)
+#define VUART1_GCTRLB (VUART1_BASE + 0x24)
+#define VUART1_ADDRL (VUART1_BASE + 0x28)
+#define VUART1_ADDRH (VUART1_BASE + 0x2c)
/*
* AHB Accessors
@@ -59,8 +67,15 @@ int ast_copy_from_ahb(void *dst, uint32_t reg, uint32_t len);
void ast_io_init(void);
-/* UART init */
-void ast_setup_uart1(uint16_t io_base, uint8_t irq);
+/* UART configuration */
+
+bool ast_is_vuart1_enabled(void);
+void ast_setup_vuart1(uint16_t io_base, uint8_t irq);
+void ast_setup_sio_uart1(uint16_t io_base, uint8_t irq);
+void ast_disable_sio_uart1(void);
+
+/* BT configuration */
+void ast_setup_ibt(uint16_t io_base, uint8_t irq);
#endif /* __SKIBOOT__ */