mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Teresa Remmet <t.remmet@phytec.de>,
	barebox@lists.infradead.org, Lucas Stach <lst@pengutronix.de>
Cc: upstream@phytec.de
Subject: Re: [PATCH] arm: imx: mmdc_size: Increase row_max for imx8m
Date: Mon, 20 Jun 2022 14:02:29 +0200	[thread overview]
Message-ID: <134ee58e-b58e-4551-d834-c4d115f91d99@pengutronix.de> (raw)
In-Reply-To: <20220520142337.993417-1-t.remmet@phytec.de>

Hello,

On 20.05.22 16:23, Teresa Remmet wrote:
> As DDRC_ADDRMAP7_ROW_B16 and DDRC_ADDRMAP7_ROW_B17 are used
> now for the row size calculation we need to increase row_max to 18.
> 
> For LPDDR4 this only works in combination with ram timings
> created with recent configuration spreadsheet versions.
> With older versions the register DDRC_ADDRMAP7 may not be set and
> calculation will lead to wrong results even with this patch.
> 
> Fixes: dad2b5636bd8 ("ARM: imx: Add imx8 support for 18 bit SDRAM row size handle")
> Signed-off-by: Teresa Remmet <t.remmet@phytec.de>

I have an out-of-tree i.MX8MM board with LPDDR4 that reported a correct size of 1G
prior to this patch and now it reports 4G. DDRC_ADDRMAP7 is not explicitly initialized,
but it's being read as zero, so the calculation seems to still be broken..

> ---
>  arch/arm/mach-imx/esdctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
> index 8dd0ddbbc965..b070ebc62a45 100644
> --- a/arch/arm/mach-imx/esdctl.c
> +++ b/arch/arm/mach-imx/esdctl.c
> @@ -488,7 +488,7 @@ static resource_size_t imx8m_ddrc_sdram_size(void __iomem *ddrc)
>  
>  	return imx_ddrc_sdram_size(ddrc, addrmap,
>  				   12, ARRAY_AND_SIZE(col_b),
> -				   16, ARRAY_AND_SIZE(row_b),
> +				   18, ARRAY_AND_SIZE(row_b),
>  				   reduced_adress_space, true);
>  }
>  


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  parent reply	other threads:[~2022-06-20 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 14:23 Teresa Remmet
2022-05-24  7:10 ` Sascha Hauer
2022-06-20 12:02 ` Ahmad Fatoum [this message]
2022-06-20 12:27   ` Teresa Remmet
2022-06-20 12:38     ` Ahmad Fatoum
2022-06-20 12:47       ` Teresa Remmet
2022-06-20 13:19         ` Ahmad Fatoum
2022-06-21 12:59           ` Teresa Remmet

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=134ee58e-b58e-4551-d834-c4d115f91d99@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=lst@pengutronix.de \
    --cc=t.remmet@phytec.de \
    --cc=upstream@phytec.de \
    --subject='Re: [PATCH] arm: imx: mmdc_size: Increase row_max for imx8m' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox