<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 17, 2022, at 12:38 AM, Andrew Jeffery <<a href="mailto:andrew@aj.id.au" class="">andrew@aj.id.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On Wed, 17 Aug 2022, at 11:29, Joel Stanley wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Always build the code now that it is enabled by device tree.<br class=""><br class="">Signed-off-by: Joel Stanley <<a href="mailto:joel@jms.id.au" class="">joel@jms.id.au</a>><br class="">---<br class="">drivers/ram/aspeed/sdram_ast2500.c | 4 ----<br class="">drivers/ram/aspeed/sdram_ast2600.c | 5 +----<br class="">drivers/ram/aspeed/Kconfig | 7 -------<br class="">3 files changed, 1 insertion(+), 15 deletions(-)<br class=""><br class="">diff --git a/drivers/ram/aspeed/sdram_ast2500.c<span class="Apple-converted-space"> </span><br class="">b/drivers/ram/aspeed/sdram_ast2500.c<br class="">index ca3b54295bf0..f76054d80b68 100644<br class="">--- a/drivers/ram/aspeed/sdram_ast2500.c<br class="">+++ b/drivers/ram/aspeed/sdram_ast2500.c<br class="">@@ -278,7 +278,6 @@ static void ast2500_sdrammc_calc_size(struct<span class="Apple-converted-space"> </span><br class="">dram_info *info)<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span><< SDRAM_CONF_CAP_SHIFT));<br class="">}<br class=""><br class="">-#ifdef CONFIG_ASPEED_ECC<br class="">static void ast2500_sdrammc_ecc_enable(struct dram_info *info, u32<span class="Apple-converted-space"> </span><br class="">conf_size_mb)<br class="">{<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>struct ast2500_sdrammc_regs *regs = info->regs;<br class="">@@ -313,7 +312,6 @@ static void ast2500_sdrammc_ecc_enable(struct<span class="Apple-converted-space"> </span><br class="">dram_info *info, u32 conf_size_mb)<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>writel(0x400, ®s->ecc_test_ctrl);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>printf("ECC enable, ");<br class="">}<br class="">-#endif<br class=""><br class="">static int ast2500_sdrammc_init_ddr4(struct dram_info *info)<br class="">{<br class="">@@ -370,14 +368,12 @@ static int ast2500_sdrammc_init_ddr4(struct<span class="Apple-converted-space"> </span><br class="">dram_info *info)<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>writel(SDRAM_MISC_DDR4_TREFRESH, &info->regs->misc_control);<br class=""><br class="">-#ifdef CONFIG_ASPEED_ECC<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>if (dev_read_bool(dev, "aspeed,ecc-enabled")) {<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>u32 ecc_size;<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>ecc_size = dev_read_u32_default(dev, "aspeed,ecc-size", 0);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>ast2500_sdrammc_ecc_enable(priv, ecc_size);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>}<br class="">-#endif<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>/* Enable all requests except video & display */<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>writel(SDRAM_REQ_USB20_EHCI1<br class="">diff --git a/drivers/ram/aspeed/sdram_ast2600.c<span class="Apple-converted-space"> </span><br class="">b/drivers/ram/aspeed/sdram_ast2600.c<br class="">index 6287c45365dd..7f599ff24d69 100644<br class="">--- a/drivers/ram/aspeed/sdram_ast2600.c<br class="">+++ b/drivers/ram/aspeed/sdram_ast2600.c<br class="">@@ -859,7 +859,7 @@ static void ast2600_sdrammc_update_size(struct<span class="Apple-converted-space"> </span><br class="">dram_info *info)<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>info->info.size = hw_size;<br class="">}<br class="">-#ifdef CONFIG_ASPEED_ECC<br class="">+<br class="">static void ast2600_sdrammc_ecc_enable(struct dram_info *info, u32<span class="Apple-converted-space"> </span><br class="">conf_size_mb)<br class="">{<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>struct ast2600_sdrammc_regs *regs = info->regs;<br class="">@@ -890,7 +890,6 @@ static void ast2600_sdrammc_ecc_enable(struct<span class="Apple-converted-space"> </span><br class="">dram_info *info, u32 conf_size_mb)<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>writel(BIT(31), ®s->intr_ctrl);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>writel(0, ®s->intr_ctrl);<br class="">}<br class="">-#endif<br class=""><br class="">static int ast2600_sdrammc_probe(struct udevice *dev)<br class="">{<br class="">@@ -988,14 +987,12 @@ L_ast2600_sdramphy_train:<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>}<br class="">#endif<br class=""><br class="">-#ifdef CONFIG_ASPEED_ECC<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>if (dev_read_bool(dev, "aspeed,ecc-enabled")) {<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>u32 ecc_size;<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>ecc_size = dev_read_u32_default(dev, "aspeed,ecc-size", 0);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;"> </span>ast2600_sdrammc_ecc_enable(priv, ecc_size);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>}<br class="">-#endif<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>setbits_le32(priv->scu + AST_SCU_HANDSHAKE, SCU_HANDSHAKE_MASK);<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>clrbits_le32(®s->intr_ctrl, MCR50_RESET_ALL_INTR);<br class="">diff --git a/drivers/ram/aspeed/Kconfig b/drivers/ram/aspeed/Kconfig<br class="">index 54c7769b5bbe..25238bf28d32 100644<br class="">--- a/drivers/ram/aspeed/Kconfig<br class="">+++ b/drivers/ram/aspeed/Kconfig<br class="">@@ -44,13 +44,6 @@ config ASPEED_BYPASS_SELFTEST<br class=""><span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> Say Y here to bypass DRAM self test to speed up the boot time<br class="">endif<br class=""><br class="">-config ASPEED_ECC<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span>bool "aspeed SDRAM error correcting code"<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span>depends on DM && OF_CONTROL && ARCH_ASPEED<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span>default n<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span>help<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-converted-space"> </span> enable SDRAM ECC function<br class="">-<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Do we need any config refreshes?</span><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><div><br class=""></div>Yeah, the configs/evb-ast2600* have this options and would need to be updated.</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><br style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: AvenirNext-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Andrew</span></div></blockquote></div><br class=""></body></html>