Fix AT91SAM9G20 reset
PATCH 1/1 Fix AT91SAM9G20 reset
Fix AT91SAM9G20 reset as per the errata in the data sheet.
If the SDRAM is not cleanly shutdown before reset it can be left driving the bus, which then stops the bootloader booting from NAND.
Signed-off-by Peter Horton <[email protected]>
--
arch/arm/mach-at91/Makefile +1 -1
@@ -16,7 +16,7 @@ obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o -obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o +obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9g20_reset.o obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
arch/arm/mach-at91/at91sam9260.c +7 -1
@@ -25,6 +25,8 @@#include "generic.h" #include "clock.h" +extern void at91sam9g20_reset (void ); +static struct map_desc at91sam9260_io_desc[]__initdata = { { .virtual =AT91_VA_BASE_SYS ,
@@ -327,7 +329,11 @@else iotable_init (at91sam9260_sram_desc,ARRAY_SIZE (at91sam9260_sram_desc)); - at91_arch_reset = at91sam9260_reset; +if (cpu_is_at91sam9g20 ()) + at91_arch_reset = at91sam9g20_reset; +else + at91_arch_reset = at91sam9260_reset; + pm_power_off = at91sam9260_poweroff; at91_extern_irq = (1 <<AT91SAM9260_ID_IRQ0 ) | (1 <<AT91SAM9260_ID_IRQ1 ) | (1 <<AT91SAM9260_ID_IRQ2 );
arch/arm/mach-at91/at91sam9g20_reset.S new file +50 -0
50 lines not on this page · raw message