1 #include <machine/asm.h>
2 #include <arm/at91/at91_rstreg.h>
3 #include <arm/at91/at91reg.h>
4 #include <arm/at91/at91sam9g20reg.h>
7 #define SDRAM_TR (AT91_BASE + \
8 AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_TR)
9 #define SDRAM_LPR (AT91_BASE + \
10 AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_LPR)
11 #define RSTC_RCR (AT91_BASE + \
12 AT91SAM9G20_RSTC_BASE + RST_CR)
15 * From AT91SAM9G20 Datasheet errata 44:3.5:
17 * When User Reset occurs durring SDRAM read acces, eh SDRAM clock is turned
18 * off while data are ready to be read on the data bus. The SDRAM maintains
19 * the data until the clock restarts.
21 * If the User reset is programed to assert a general reset, the data
22 * maintained by the SDRAM leads to a data bus conflict and adversly affects
23 * the boot memories connected to the EBI:
24 * + NAND Flash boot functionality, if the system boots out of internal ROM.
25 * + NOR Flash boot, if the system boots on an external memory connected to
28 * Assembly code is mandatory for the following sequnce as ARM
29 * instructions need to be piplined.
33 ENTRY(cpu_reset_sam9g20)
40 /* Change Refresh to block all data access */
45 /* Prepare power down command */
49 /* Prepare proc_reset and periph reset */
53 /* perform power down command */
56 /* Perfom proc_reset and periph reset (in the ARM pipeline) */