public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Kumar, Udit" <u-kumar1@ti.com>
To: Neha Malcom Francis <n-francis@ti.com>, <trini@konsulko.com>,
	<bb@ti.com>,  <w.egorov@phytec.de>, <s-k6@ti.com>,
	<marek.vasut+renesas@mailbox.org>, <sabiya.d@ti.com>
Cc: <u-boot@lists.denx.de>
Subject: Re: [PATCH 2/8] ram: k3-ddrss: Use DDR address instead of system address for ecc_regions
Date: Tue, 28 Jan 2025 11:16:14 +0530	[thread overview]
Message-ID: <824fba8d-b231-449f-aebb-cd28ff47504f@ti.com> (raw)
In-Reply-To: <20250127142217.1757300-3-n-francis@ti.com>


On 1/27/2025 7:52 PM, Neha Malcom Francis wrote:
> Let ecc_regions[x].start reflect the start of the ECC region in terms of
> DDR addressing rather than system addressing. This will make it easier
> to extend the usage of the same ecc_regions structure for multi-DDR
> systems as well.
>
> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
> ---
>   drivers/ram/k3-ddrss/k3-ddrss.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
> index 05ea61bbfe9..24932cd837c 100644
> --- a/drivers/ram/k3-ddrss/k3-ddrss.c
> +++ b/drivers/ram/k3-ddrss/k3-ddrss.c
> @@ -730,7 +730,7 @@ static void k3_ddrss_lpddr4_ecc_init(struct k3_ddrss_desc *ddrss)
>   	u32 val;
>   
>   	/* Only Program region 0 which covers full ddr space */
> -	k3_ddrss_set_ecc_range_r0(base, ecc_region_start - ddrss->ddr_bank_base[0], ecc_range);
> +	k3_ddrss_set_ecc_range_r0(base, ecc_region_start, ecc_range);
>   
>   	/* Enable ECC, RMW, WR_ALLOC */
>   	writel(DDRSS_ECC_CTRL_REG_ECC_EN | DDRSS_ECC_CTRL_REG_RMW_EN |
> @@ -799,7 +799,7 @@ static int k3_ddrss_probe(struct udevice *dev)
>   		k3_ddrss_lpddr4_ecc_calc_reserved_mem(ddrss);
>   
>   		/* Always configure one region that covers full DDR space */
> -		ddrss->ecc_regions[0].start = ddrss->ddr_bank_base[0];
> +		ddrss->ecc_regions[0].start = ddrss->ddr_bank_base[0] - ddrss->ddr_bank_base[0];

you will get start as zero, here , if this is what you need just set to 
zero


>   		ddrss->ecc_regions[0].range = ddrss->ddr_ram_size - ddrss->ecc_reserved_space;
>   		k3_ddrss_lpddr4_ecc_init(ddrss);
>   	}

  reply	other threads:[~2025-01-28  5:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 14:22 [PATCH 0/8] ram: k3-ddrss: Support partial inline ECC Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 1/8] k3-ddr.c: Remove unwanted header files Neha Malcom Francis
2025-01-28  5:02   ` Wadim Egorov
2025-01-28  5:19     ` Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 2/8] ram: k3-ddrss: Use DDR address instead of system address for ecc_regions Neha Malcom Francis
2025-01-28  5:46   ` Kumar, Udit [this message]
2025-01-27 14:22 ` [PATCH 3/8] ram: k3-ddrss: Add comment about ecc_reserved_space Neha Malcom Francis
2025-01-28  5:47   ` Kumar, Udit
2025-01-27 14:22 ` [PATCH 4/8] ram: k3-ddrss: Add support for a partial inline ECC region Neha Malcom Francis
2025-01-28  5:13   ` Wadim Egorov
2025-01-28  5:21     ` Neha Malcom Francis
2025-01-28  5:53   ` Kumar, Udit
2025-01-28  6:35     ` Neha Malcom Francis
2025-01-30  7:10     ` Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 5/8] ram: k3-ddrss: Add CONFIG_K3_MULTI_DDR Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 6/8] ram: k3-ddrss: Add support for number of controllers under MSMC Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 7/8] ram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions Neha Malcom Francis
2025-01-27 14:22 ` [PATCH 8/8] ram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems Neha Malcom Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=824fba8d-b231-449f-aebb-cd28ff47504f@ti.com \
    --to=u-kumar1@ti.com \
    --cc=bb@ti.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=n-francis@ti.com \
    --cc=s-k6@ti.com \
    --cc=sabiya.d@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=w.egorov@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox