From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] ls2080: Disable dcache during ddr init
Date: Fri, 13 May 2016 09:28:38 -0700 [thread overview]
Message-ID: <573600B6.1010107@nxp.com> (raw)
In-Reply-To: <1463142095-182586-3-git-send-email-agraf@suse.de>
On 05/13/2016 05:21 AM, Alexander Graf wrote:
> While trying something completely different I saw the DDR probe hang on
> boot reliably depending on how big my code ended up. Adding simple "nop"
> instructions in my code (completely unrelated) flow made the DDR probe
> work again.
>
> So we're accessing some RAM - probably the page table - and rely on the
> cache to give us a correct view of the world while DRAM gets initialized.
>
> This patch just disables dcache while we're initializing the memory controller,
> resolving all system hangs for me so far.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
>
> ---
>
> I guess the "real" solution would be to find out what exactly gets accessed in
> such a case and then just map whatever it is into SRAM. Or maybe qixis_reset
> doesn't fully reset something in the cache tolopogy and that wants to get
> flushed out when we don't have ram yet? I don't know...
> ---
> board/freescale/ls2080a/ddr.c | 2 ++
> board/freescale/ls2080aqds/ddr.c | 2 ++
> board/freescale/ls2080ardb/ddr.c | 2 ++
> 3 files changed, 6 insertions(+)
>
> diff --git a/board/freescale/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
> index 1827ddc..a02aa64 100644
> --- a/board/freescale/ls2080a/ddr.c
> +++ b/board/freescale/ls2080a/ddr.c
> @@ -165,7 +165,9 @@ phys_size_t initdram(int board_type)
> puts("Initializing DDR....");
>
> puts("using SPD\n");
> + dcache_disable();
> dram_size = fsl_ddr_sdram();
> + set_sctlr(get_sctlr() | (CR_C|CR_M));
Alex,
I can't agree with the proposed change. Having dcache has major speed boost
during initializing, especially when we run it on an emulator. As you suggested
in the note, the root cause needs to be identified. Qixis_reset has nothing to
do with cache. It is a board-level FPGA control.
York
next prev parent reply other threads:[~2016-05-13 16:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 12:21 [U-Boot] [PATCH 0/5] LS2080ARDB: Enable EFI boot support Alexander Graf
2016-05-13 12:21 ` [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting U-Boot Alexander Graf
2016-05-18 12:29 ` Prabhakar Kushwaha
2016-05-27 14:27 ` Alexander Graf
2016-06-07 1:28 ` Prabhakar Kushwaha
2016-06-19 21:58 ` Alexander Graf
2016-06-20 6:24 ` Alexander Graf
2016-05-13 12:21 ` [U-Boot] [PATCH 2/5] ls2080: Disable dcache during ddr init Alexander Graf
2016-05-13 16:28 ` York Sun [this message]
2016-05-13 19:43 ` Alexander Graf
2016-05-18 12:17 ` Prabhakar Kushwaha
2016-05-13 12:21 ` [U-Boot] [PATCH 3/5] efi_loader: AArch64: Run EFI payloads in EL2 if U-Boot runs in EL3 Alexander Graf
2016-05-13 12:21 ` [U-Boot] [PATCH 4/5] ls2080ardb: Reserve DP-DDR RAM Alexander Graf
2016-05-13 12:21 ` [U-Boot] [PATCH 5/5] ls2080ardb: Convert to distro boot Alexander Graf
2016-05-13 14:26 ` Stuart Yoder
2016-05-13 14:31 ` Alexander Graf
2016-05-13 16:21 ` York Sun
2016-05-13 17:03 ` Alexander Graf
2016-05-13 17:05 ` York Sun
2016-05-13 19:36 ` Alexander Graf
2016-05-13 19:52 ` York Sun
2016-05-14 21:21 ` Bhupesh Sharma
2016-05-16 6:58 ` Amit Tomer
2016-05-16 7:38 ` Alexander Graf
2016-05-16 12:04 ` Bhupesh Sharma
2016-05-16 12:21 ` Alexander Graf
2016-05-16 13:23 ` Bhupesh Sharma
2016-05-16 13:49 ` Peter Newton
2016-05-13 19:42 ` [U-Boot] [PATCH v2 " Alexander Graf
2016-05-15 20:33 ` [U-Boot] [PATCH v3 " Alexander Graf
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=573600B6.1010107@nxp.com \
--to=york.sun@nxp.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