summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-07-17 11:32:53 +0930
committerStewart Smith <stewart@linux.ibm.com>2018-07-17 01:13:16 -0500
commitebc8524a3a457f73083d984296bfd797940a711c (patch)
treeb478552a2b810ceff3e98bbefe67aa07706dbf48 /include
parent8972e44f97883e5aabf4b9c6737dcf3b22fd24b8 (diff)
downloadblackbird-skiboot-ebc8524a3a457f73083d984296bfd797940a711c.tar.gz
blackbird-skiboot-ebc8524a3a457f73083d984296bfd797940a711c.zip
ast-io: Rework setup/tear-down of communication with the BMC
It's possible for the platform to configure the BMC with SuperIO access disabled. Rework the interfaces to report failures if SuperIO is not enabled, and clean up once we're finished. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/ast.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/ast.h b/include/ast.h
index 3525c828..1b5e0013 100644
--- a/include/ast.h
+++ b/include/ast.h
@@ -39,6 +39,8 @@
#define LPC_HICR6 (LPC_BASE + 0x80)
#define LPC_HICR7 (LPC_BASE + 0x88)
#define LPC_HICR8 (LPC_BASE + 0x8c)
+#define LPC_HICRB (LPC_BASE + 0x100)
+#define LPC_HICRB_ILPC_DISABLE (1 << 6)
#define LPC_iBTCR0 (LPC_BASE + 0x140)
/* VUART1 */
@@ -49,9 +51,15 @@
#define VUART1_ADDRH (VUART1_BASE + 0x2c)
/* SCU registers */
-#define SCU_BASE 0x1e6e2000
-#define SCU_HW_STRAPPING (SCU_BASE + 0x70)
-#define SCU_REVISION_ID (SCU_BASE + 0x7C)
+#define SCU_BASE 0x1e6e2000
+#define SCU_HW_STRAPPING (SCU_BASE + 0x70)
+#define SCU_STRAP_SIO_DECODE_DISABLE (1 << 20)
+#define SCU_REVISION_ID (SCU_BASE + 0x7C)
+#define SCU_REVISION_SOC_FAMILY(x) (((x) >> 24) & 0xff)
+#define SCU_REVISION_SOC_FAMILY_2400 0x02
+#define SCU_REVISION_SOC_FAMILY_2500 0x04
+#define SCU_REVISION_HW_REVISION_ID(x) (((x) >> 16) & 0xff)
+#define SCU_REVISION_CHIP_BONDING(x) (((x) >> 8) & 0x3)
/* MCR registers */
#define MCR_BASE 0x1e6e0000
@@ -73,7 +81,10 @@
void ast_ahb_writel(uint32_t val, uint32_t reg);
uint32_t ast_ahb_readl(uint32_t reg);
-void ast_io_init(void);
+bool ast_sio_init(void);
+bool ast_can_isolate_sp(void);
+bool ast_io_init(void);
+bool ast_io_is_rw(void);
bool ast_lpc_fw_is_flash(void);
bool ast_lpc_fw_is_mbox(void);
bool ast_scratch_reg_is_mbox(void);
OpenPOWER on IntegriCloud