[PATCH v2 3/9] ram: k3-ddrss: Add comment about ecc_reserved_space
Neha Malcom Francis
n-francis at ti.com
Mon Aug 11 13:44:20 CEST 2025
On 07/08/25 10:00, Kumar, Udit wrote:
>
> On 7/30/2025 7:07 PM, Neha Malcom Francis wrote:
>> The reserved space needed for storing the parity remains the same no
>> matter the size of the region that is being protected. Add this as a
>> comment for better code understanding.
>>
>> Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
>> ---
>> drivers/ram/k3-ddrss/k3-ddrss.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c
>> b/drivers/ram/k3-ddrss/k3-ddrss.c
>> index ee1d9b5998f..a94755c3542 100644
>> --- a/drivers/ram/k3-ddrss/k3-ddrss.c
>> +++ b/drivers/ram/k3-ddrss/k3-ddrss.c
>> @@ -737,6 +737,11 @@ static void
>> k3_ddrss_lpddr4_ecc_calc_reserved_mem(struct k3_ddrss_desc *ddrss)
>> {
>> fdtdec_setup_mem_size_base_lowest();
>> + /*
>> + * For every 512-byte data block, 64 bytes of ECC is stored
>> inline and
>> + * is a reserved region. It remains 1/9th of the total DDR size
>> + * irrespective of the size of the region under protection.
>> + */
>> ddrss->ecc_reserved_space = ddrss->ddr_ram_size;
>
> For every 512-byte data block, 64 bytes of ECC is stored inline and is a
> reserved region
>
> to
> For every 512-bytes data block, 64 bytes are used to store inline ECC
> information into reserved region
>
>
> with little update in comments above, please use
>
> Reviewed-by: Udit Kumar <u-kumar1 at ti.com>
Will make the change, thanks!
>
>
>> do_div(ddrss->ecc_reserved_space, 9);
>>
--
Thanking You
Neha Malcom Francis
More information about the U-Boot
mailing list