From: "Ryan Walklin" <ryan@testtoast.com>
To: "Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Jagan Teki" <jagan@amarulasolutions.com>,
"Andre Przywara" <andre.przywara@arm.com>,
"Tom Rini" <trini@konsulko.com>
Cc: "Chris Morgan" <macromorgan@hotmail.com>,
u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 2/2] sunxi: H616: dram: Improve address wrapping detection
Date: Mon, 10 Mar 2025 15:36:19 +1300 [thread overview]
Message-ID: <10b26205-6798-4ed4-b170-4555265e08ac@app.fastmail.com> (raw)
In-Reply-To: <20250309063143.62859-3-jernej.skrabec@gmail.com>
On Sun, 9 Mar 2025, at 7:31 PM, Jernej Skrabec wrote:
> It turns out that checking just one write is not enough. Due to
> unexplained reasons scan procedure detected double the size. By making
> 16 dword writes and comparisons that never happens.
>
> New procedure is also inverted. Instead of writing two different values
> to base address and some offset and then reading both and comparing
> values, simplify this by writing pattern at the base address and then
> search for this pattern at some offset.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> ---
> arch/arm/mach-sunxi/dram_sun50i_h616.c | 58 +++++++++++++++++++++++++-
> 1 file changed, 56 insertions(+), 2 deletions(-)
Tested with H700 devices with both 1GB (RG35XX-H) and 4GB (RG40XX-V) of LPDDR4; reliable detection with over 50 boots combined on both devices. Previously ~1 in 10 boots would mistakenly incorrectly detect RAM size, in particular 2 or 4 GB RAM on the 1GB device.
Tested-by: Ryan Walklin <ryan@testtoast.com>
Regards,
Ryan
next prev parent reply other threads:[~2025-03-10 2:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 6:31 [PATCH 0/2] sunxi: h616: fix DRAM size detection Jernej Skrabec
2025-03-09 6:31 ` [PATCH 1/2] sunxi: h616: dram: Rework " Jernej Skrabec
2025-03-10 9:16 ` Icenowy Zheng
2025-03-24 1:18 ` Andre Przywara
2025-03-09 6:31 ` [PATCH 2/2] sunxi: H616: dram: Improve address wrapping detection Jernej Skrabec
2025-03-10 2:36 ` Ryan Walklin [this message]
2025-03-25 1:13 ` Andre Przywara
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=10b26205-6798-4ed4-b170-4555265e08ac@app.fastmail.com \
--to=ryan@testtoast.com \
--cc=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=macromorgan@hotmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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