sun7i: Put the CPU in smp mode when starting (the non spl) u-boot

If the CPU is left in AMP mode, all its caches are disabled. This fixes the
circa 8 second delay when uncompressing the Linux uImage on boot.

Thanks to Maxime Ripard for pointing out this bit needs to be set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Hans de Goede
2013-08-11 12:38:03 +02:00
parent c0f3b94d7c
commit 645e90151a

View File

@ -101,6 +101,14 @@ void reset_cpu(ulong addr)
/* do some early init */ /* do some early init */
void s_init(void) void s_init(void)
{ {
#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I
/* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
asm volatile(
"mrc p15, 0, r0, c1, c0, 1\n"
"orr r0, r0, #0x40\n"
"mcr p15, 0, r0, c1, c0, 1\n");
#endif
watchdog_init(); watchdog_init();
clock_init(); clock_init();
gpio_init(); gpio_init();