From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] AM335x: enabling datacache in SPL slows down system?
Date: Thu, 20 Jun 2013 20:51:26 +0200 [thread overview]
Message-ID: <51C34F2E.9040004@myspectrum.nl> (raw)
In-Reply-To: <20130620080523.aba38cb4@mail.altenpts.nl>
Hallo Bas,
On 06/20/2013 10:05 AM, Bas van den Berg wrote:
> I'm trying to optimize the boottime for an AM335x based board. Currently
> we're loading the kernel from SPL directly (falcon mode). Loading the kernel
> from flash to ram takes roughly 3 seconds.
> When doing this from U-boot itself with 'nand read .., it only takes 1.8 seconds.
> It seems that U-boot has data_cache enabled, while SPL did not.
>
> When enabling the data cache with dcache_enable(), loading takes 3.5 seconds,
> so even slower! The enabling itself does not take a significant amount of time.
>
> Anyone have any idea why enabling the data cache slows SPL down?
> Or does U-boot do anything else that I'm missing?
For an am3517 I added the code below to spl_board_init to
enable caches in SPL. It adds the SRAM region to the mmu,
by an obvious hack, but it works. I don't remember by heart
why I change / update gd->tlb_addr. The used address is
somewhere in the end of DRAM.
No guarantees this is related to your issue (or to work at all).
---
Groet,
Jeroen
if (!spl_start_uboot()) {
dram_init_banksize();
/* reserve TLB table (4k) */
gd->tlb_addr = 0x8fff0000;
debug("TLB table at: %08lx\n", gd->tlb_addr);
/* add sram (64k actually, but the cp15 counts in MiBs) */
gd->bd->bi_dram[1].start = CONFIG_SPL_TEXT_BASE;
gd->bd->bi_dram[1].size = (1 << 20);
/* Enable caches */
enable_caches();
}
next prev parent reply other threads:[~2013-06-20 18:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 8:05 [U-Boot] AM335x: enabling datacache in SPL slows down system? Bas van den Berg
2013-06-20 18:51 ` Jeroen Hofstee [this message]
2013-06-21 5:33 ` Wolfgang Denk
2013-06-21 18:46 ` Jeroen Hofstee
2013-06-21 18:56 ` Tom Rini
2013-06-24 8:01 ` Bas van den Berg
2013-06-24 18:17 ` Jeroen Hofstee
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=51C34F2E.9040004@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--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