1 #include <machine/asm.h>
2 #include <arm/at91/at91_rstreg.h>
3 #include <arm/at91/at91sam9g20reg.h>
6 #define SDRAM_TR (AT91SAM9G20_BASE + \
7 AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_TR)
8 #define SDRAM_LPR (AT91SAM9G20_BASE + \
9 AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_LPR)
10 #define RSTC_RCR (AT91SAM9G20_BASE + \
11 AT91SAM9G20_RSTC_BASE + RST_CR)
14 * From AT91SAM9G20 Datasheet errata 44:3.5:
16 * When User Reset occurs durring SDRAM read acces, eh SDRAM clock is turned
17 * off while data are ready to be read on the data bus. The SDRAM maintains
18 * the data until the clock restarts.
20 * If the User reset is programed to assert a general reset, the data
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) */