The original checking is wrong, it basically compares memory address
end = r->start + r->range;
with memory size:
if (end > (ddr_ram_size - ecc_res))
so the if() condition would be always true. This causes the ECC config
never take input from the devicetree.
Fixes: f43f710122 ("ram: k3-ddrss: Add support for a partial inline ECC region")
Signed-off-by: Bin Liu <b-liu@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>