[PATCH u-boot v2019.04-aspeed-openbmc 1/2] aspeed/sdram: Use device tree to configure ECC

Dhananjay Phadke dphadke at linux.microsoft.com
Wed Aug 17 13:04:13 AEST 2022


On 8/16/2022 6:59 PM, Joel Stanley wrote:
> Instead of configuring ECC based on the build config, use a device tree
> property to selectively enable ECC at runtime.
> 
> There are two properties:
> 
>    aspeed,ecc-enabled;
>    aspeed,ecc-size = "512";
> 
> The enabled property is a boolean that enables ECC if it is present.
> 
> The size is the number of MB that should be covered by ECC. Setting it
> to zero, or omitting it, defaults the ECC size to "auto detect".

What's the use case for enabling ECC only on part of the DRAM or not
using max possible DRAM space?

Couldn't this be just simple update based on what DTS memory node has?

/* Update available size */
info->info.size = (((info->info.size / 9) * 8) >> 20) << 20;

Regards,
Dhananjay


More information about the openbmc mailing list