mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
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:
@ -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();
|
||||||
|
Reference in New Issue
Block a user