[Skiboot] [PATCH v2 27/59] platforms/astbmc: Add ast2600

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Aug 4 17:21:05 AEST 2021


From: Reza Arbab <arbab at linux.ibm.com>

Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 platforms/astbmc/astbmc.h |  2 ++
 platforms/astbmc/common.c | 19 +++++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h
index 86631bc4e..00f221230 100644
--- a/platforms/astbmc/astbmc.h
+++ b/platforms/astbmc/astbmc.h
@@ -87,9 +87,11 @@ static struct slot_table_entry st_name[] = \
 
 extern const struct bmc_hw_config bmc_hw_ast2400;
 extern const struct bmc_hw_config bmc_hw_ast2500;
+extern const struct bmc_hw_config bmc_hw_ast2600;
 extern const struct bmc_platform bmc_plat_ast2400_ami;
 extern const struct bmc_platform bmc_plat_ast2500_ami;
 extern const struct bmc_platform bmc_plat_ast2500_openbmc;
+extern const struct bmc_platform bmc_plat_ast2600_openbmc;
 
 extern void astbmc_early_init(void);
 extern int64_t astbmc_ipmi_reboot(void);
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
index d96e070e5..83ef70ad3 100644
--- a/platforms/astbmc/common.c
+++ b/platforms/astbmc/common.c
@@ -266,8 +266,9 @@ static void astbmc_fixup_dt_mbox(struct dt_node *lpc)
 	 * can indicate they support mbox using the scratch register, or ipmi
 	 * by configuring the hiomap ipmi command. If neither are configured
 	 * for P8 then skiboot will drive the flash controller directly.
+	 * XXX P10
 	 */
-	if (proc_gen != proc_gen_p9 && !ast_scratch_reg_is_mbox())
+	if (proc_gen == proc_gen_p8 && !ast_scratch_reg_is_mbox())
 		return;
 
 	/* First check if the mbox interface is already there */
@@ -478,7 +479,7 @@ void astbmc_early_init(void)
 		 * never MBOX. Thus only populate the MBOX node on P9 to allow
 		 * fallback.
 		 */
-		if (proc_gen == proc_gen_p9) {
+		if (proc_gen >= proc_gen_p9) {
 			astbmc_fixup_dt_mbox(dt_find_primary_lpc());
 			ast_setup_sio_mbox(MBOX_IO_BASE, MBOX_LPC_IRQ);
 		}
@@ -530,6 +531,14 @@ const struct bmc_hw_config bmc_hw_ast2500 = {
 	.mcr_scu_strap = 0x00000000,
 };
 
+/* XXX P10: Update with Rainier values */
+const struct bmc_hw_config bmc_hw_ast2600 = {
+	.scu_revision_id = 0x05000303,
+	.mcr_configuration = 0x11200756,
+	.mcr_scu_mpll = 0x1008405F,
+	.mcr_scu_strap = 0x000030E0,
+};
+
 const struct bmc_platform bmc_plat_ast2400_ami = {
 	.name = "ast2400:ami",
 	.hw = &bmc_hw_ast2400,
@@ -547,3 +556,9 @@ const struct bmc_platform bmc_plat_ast2500_openbmc = {
 	.hw = &bmc_hw_ast2500,
 	.sw = &bmc_sw_openbmc,
 };
+
+const struct bmc_platform bmc_plat_ast2600_openbmc = {
+	.name = "ast2600:openbmc",
+	.hw = &bmc_hw_ast2600,
+	.sw = &bmc_sw_openbmc,
+};
-- 
2.31.1



More information about the Skiboot mailing list