aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9g45_reset.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-28 13:21:54 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-28 13:21:54 -0800
commit81bc3009e061cfd0e62e03a6761cce39c750b65e (patch)
tree46dffbe307d4275dbcf1da1bf7c01dd06e09bac3 /arch/arm/mach-at91/at91sam9g45_reset.S
parentMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux (diff)
parentMerge branch 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes (diff)
downloadlinux-dev-81bc3009e061cfd0e62e03a6761cce39c750b65e.tar.xz
linux-dev-81bc3009e061cfd0e62e03a6761cce39c750b65e.zip
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
arm-soc fixes for 3.3-rc: AT91 needed reset fixes which resulted in some minor code refactoring, it also adds a feature-removal for one of their platforms for 3.4. The USB patches have been acked by Greg K-H. i.MX and ux500 both have some minor fixes, nothing controversial. * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arch/arm/mach-imx/mach-mx53_ard.c: add missing iounmap ARM: imx: iomux-v1.h: Fix build error due to __init annotation ARM: at91: Fix at91sam9g45 and at91cap9 reset ARM: at91: make rstc soc independent ARM: at91: introduce AT91_SAM9_ALT_RESET to select the at91sam9 alternative reset ARM: at91: merge at91cap9_ddrsdr.h in at91sam9_ddrsdr.h ARM: at91: fix cap9 ddrsdr register ARM/USB: at91/ohci-at91: rename vbus_pin_inverted to vbus_pin_active_low USB: at91: fix clk_get error handling ARM: at91: removal of CAP9 SoC family ARM: at91: fix at91rm9200 soc subtype handling mach-ux500: no MMC_CAP_SD_HIGHSPEED on Snowball mach-ux500: enable ARM errata 764369 mach-ux500: do not override outer.inv_all mach-ux500: musb: now musb is always in OTG mode ARM: imx6: add missing twd_clk for imx6q clock
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_reset.S')
-rw-r--r--arch/arm/mach-at91/at91sam9g45_reset.S40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_reset.S b/arch/arm/mach-at91/at91sam9g45_reset.S
new file mode 100644
index 000000000000..0468be10980b
--- /dev/null
+++ b/arch/arm/mach-at91/at91sam9g45_reset.S
@@ -0,0 +1,40 @@
+/*
+ * reset AT91SAM9G45 as per errata
+ *
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcosoft.com>
+ *
+ * unless the SDRAM is cleanly shutdown before we hit the
+ * reset register it can be left driving the data bus and
+ * killing the chance of a subsequent boot from NAND
+ *
+ * GPLv2 Only
+ */
+
+#include <linux/linkage.h>
+#include <mach/hardware.h>
+#include <mach/at91sam9_ddrsdr.h>
+#include <mach/at91_rstc.h>
+
+ .arm
+
+ .globl at91sam9g45_restart
+
+at91sam9g45_restart:
+ ldr r0, .at91_va_base_sdramc0 @ preload constants
+ ldr r1, =at91_rstc_base
+ ldr r1, [r1]
+
+ mov r2, #1
+ mov r3, #AT91_DDRSDRC_LPCB_POWER_DOWN
+ ldr r4, =AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST
+
+ .balign 32 @ align to cache line
+
+ str r2, [r0, #AT91_DDRSDRC_RTR] @ disable DDR0 access
+ str r3, [r0, #AT91_DDRSDRC_LPR] @ power down DDR0
+ str r4, [r1, #AT91_RSTC_CR] @ reset processor
+
+ b .
+
+.at91_va_base_sdramc0:
+ .word AT91_VA_BASE_SYS + AT91_DDRSDRC0