[PATCH u-boot v2019.04-aspeed-openbmc 2/2] ram/aspeed: Remove ECC config option

Adriana Kobylak anoo at linux.ibm.com
Wed Aug 31 04:51:47 AEST 2022



> On Aug 17, 2022, at 12:38 AM, Andrew Jeffery <andrew at aj.id.au> wrote:
> 
> 
> 
> On Wed, 17 Aug 2022, at 11:29, Joel Stanley wrote:
>> Always build the code now that it is enabled by device tree.
>> 
>> 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 ca3b54295bf0..f76054d80b68 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, &regs->ecc_test_ctrl);
>> 	printf("ECC enable, ");
>> }
>> -#endif
>> 
>> static int ast2500_sdrammc_init_ddr4(struct dram_info *info)
>> {
>> @@ -370,14 +368,12 @@ static int ast2500_sdrammc_init_ddr4(struct 
>> dram_info *info)
>> 
>> 	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", 0);
>> 		ast2500_sdrammc_ecc_enable(priv, 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 6287c45365dd..7f599ff24d69 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), &regs->intr_ctrl);
>> 	writel(0, &regs->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", 0);
>> 		ast2600_sdrammc_ecc_enable(priv, ecc_size);
>> 	}
>> -#endif
>> 
>> 	setbits_le32(priv->scu + AST_SCU_HANDSHAKE, SCU_HANDSHAKE_MASK);
>> 	clrbits_le32(&regs->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
>> -
> 
> Do we need any config refreshes?

Yeah, the configs/evb-ast2600* have this options and would need to be updated.

> 
> Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220830/82df3c10/attachment.htm>


More information about the openbmc mailing list