[PATCH u-boot v2019.04-aspeed-openbmc v3 2/4] ram/aspeed: Remove ECC config option
Joel Stanley
joel at jms.id.au
Wed Sep 21 17:44:37 AEST 2022
Always build the code now that it is enabled by device tree.
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
drivers/ram/aspeed/sdram_ast2500.c | 4 ----
drivers/ram/aspeed/sdram_ast2600.c | 5 +----
drivers/ram/aspeed/Kconfig | 7 -------
3 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/ram/aspeed/sdram_ast2500.c b/drivers/ram/aspeed/sdram_ast2500.c
index 79760975be44..c8eee32da698 100644
--- a/drivers/ram/aspeed/sdram_ast2500.c
+++ b/drivers/ram/aspeed/sdram_ast2500.c
@@ -278,7 +278,6 @@ static void ast2500_sdrammc_calc_size(struct dram_info *info)
<< SDRAM_CONF_CAP_SHIFT));
}
-#ifdef CONFIG_ASPEED_ECC
static void ast2500_sdrammc_ecc_enable(struct dram_info *info, u32 conf_size_mb)
{
struct ast2500_sdrammc_regs *regs = info->regs;
@@ -313,7 +312,6 @@ static void ast2500_sdrammc_ecc_enable(struct dram_info *info, u32 conf_size_mb)
writel(0x400, ®s->ecc_test_ctrl);
printf("ECC enable, ");
}
-#endif
static int ast2500_sdrammc_init_ddr4(struct udevice *dev)
{
@@ -371,14 +369,12 @@ static int ast2500_sdrammc_init_ddr4(struct udevice *dev)
writel(SDRAM_MISC_DDR4_TREFRESH, &info->regs->misc_control);
-#ifdef CONFIG_ASPEED_ECC
if (dev_read_bool(dev, "aspeed,ecc-enabled")) {
u32 ecc_size;
ecc_size = dev_read_u32_default(dev, "aspeed,ecc-size-mb", 0);
ast2500_sdrammc_ecc_enable(info, ecc_size);
}
-#endif
/* Enable all requests except video & display */
writel(SDRAM_REQ_USB20_EHCI1
diff --git a/drivers/ram/aspeed/sdram_ast2600.c b/drivers/ram/aspeed/sdram_ast2600.c
index 2a4d6af57eb3..5f7b160faddf 100644
--- a/drivers/ram/aspeed/sdram_ast2600.c
+++ b/drivers/ram/aspeed/sdram_ast2600.c
@@ -859,7 +859,7 @@ static void ast2600_sdrammc_update_size(struct dram_info *info)
info->info.size = hw_size;
}
-#ifdef CONFIG_ASPEED_ECC
+
static void ast2600_sdrammc_ecc_enable(struct dram_info *info, u32 conf_size_mb)
{
struct ast2600_sdrammc_regs *regs = info->regs;
@@ -890,7 +890,6 @@ static void ast2600_sdrammc_ecc_enable(struct dram_info *info, u32 conf_size_mb)
writel(BIT(31), ®s->intr_ctrl);
writel(0, ®s->intr_ctrl);
}
-#endif
static int ast2600_sdrammc_probe(struct udevice *dev)
{
@@ -988,14 +987,12 @@ L_ast2600_sdramphy_train:
}
#endif
-#ifdef CONFIG_ASPEED_ECC
if (dev_read_bool(dev, "aspeed,ecc-enabled")) {
u32 ecc_size;
ecc_size = dev_read_u32_default(dev, "aspeed,ecc-size-mb", 0);
ast2600_sdrammc_ecc_enable(priv, ecc_size);
}
-#endif
setbits_le32(priv->scu + AST_SCU_HANDSHAKE, SCU_HANDSHAKE_MASK);
clrbits_le32(®s->intr_ctrl, MCR50_RESET_ALL_INTR);
diff --git a/drivers/ram/aspeed/Kconfig b/drivers/ram/aspeed/Kconfig
index 54c7769b5bbe..25238bf28d32 100644
--- a/drivers/ram/aspeed/Kconfig
+++ b/drivers/ram/aspeed/Kconfig
@@ -44,13 +44,6 @@ config ASPEED_BYPASS_SELFTEST
Say Y here to bypass DRAM self test to speed up the boot time
endif
-config ASPEED_ECC
- bool "aspeed SDRAM error correcting code"
- depends on DM && OF_CONTROL && ARCH_ASPEED
- default n
- help
- enable SDRAM ECC function
-
choice
prompt "DDR4 PHY side ODT"
default ASPEED_DDR4_PHY_ODT40
--
2.35.1
More information about the openbmc
mailing list