Path: blob/master/arch/arm/mach-at91/at91sam9_alt_reset.S
10817 views
/*1* reset AT91SAM9G20 as per errata2*3* (C) BitBox Ltd 20104*5* unless the SDRAM is cleanly shutdown before we hit the6* reset register it can be left driving the data bus and7* killing the chance of a subsequent boot from NAND8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License as published by11* the Free Software Foundation; either version 2 of the License, or12* (at your option) any later version.13*/1415#include <linux/linkage.h>16#include <asm/system.h>17#include <mach/hardware.h>18#include <mach/at91sam9_sdramc.h>19#include <mach/at91_rstc.h>2021.arm2223.globl at91sam9_alt_reset2425at91sam9_alt_reset: mrc p15, 0, r0, c1, c0, 026orr r0, r0, #CR_I27mcr p15, 0, r0, c1, c0, 0 @ enable I-cache2829ldr r0, .at91_va_base_sdramc @ preload constants30ldr r1, .at91_va_base_rstc_cr3132mov r2, #133mov r3, #AT91_SDRAMC_LPCB_POWER_DOWN34ldr r4, =AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST3536.balign 32 @ align to cache line3738str r2, [r0, #AT91_SDRAMC_TR] @ disable SDRAM access39str r3, [r0, #AT91_SDRAMC_LPR] @ power down SDRAM40str r4, [r1] @ reset processor4142b .4344.at91_va_base_sdramc:45.word AT91_VA_BASE_SYS + AT91_SDRAMC046.at91_va_base_rstc_cr:47.word AT91_VA_BASE_SYS + AT91_RSTC_CR484950