summaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed/head-shmobile.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 13:17:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 13:17:02 -0700
commitd2f3e9eb7c9e12e89f0ac5f0dbc7a9aed0ea925d (patch)
tree0a764312ef38576d610ef844f3ef697a501b6afa /arch/arm/boot/compressed/head-shmobile.S
parent1bda20da20e5c64919efcb507a84e192deed1c60 (diff)
parent2bbc31ef2b398d17016c6438016cc76913990950 (diff)
Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC low-priority fixes from Olof Johansson: "This branch contains a handful of fixes for various platforms that weren't serious enough to be included in late 3.11-rc releases. Most of them are for minor cleanups and cosmetic fixes. There's also a bit of code removal here, one board file removal for clps711x, and removal of some legacy device creation on OMAP2+" * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits) ARM: OMAP2: use 'int' instead of 'unsigned' for variable 'gpmc_irq_start' ARM: OMAP2: remove useless variable 'ret' ARM: OMAP: dma: fix error return code in omap_system_dma_probe() ARM: OMAP2+: fix wrong address when loading PRM_FRAC_INCREMENTOR_DENUMERATOR_RELOAD ARM: OMAP2+: am33xx-restart: trigger warm reset on omap2+ boards ARM: OMAP2: Use a consistent AM33XX SoC option description ARM: OMAP2+: Remove legacy device creation for McPDM and DMIC ARM: clps711x: edb7211: Remove extra iotable_init() call ARM: clps711x: autcpu12: Remove incorrect config checking ARM: clps711x: Drop fortunet board support ARM: clps711x: Remove the special name for the syscon driver ARM: dts: Fix memory node in skeleton64.dtsi ARM: Keystone: Convert device tree file to use IRQ defines ARM: keystone: use #include to include skeleton.dtsi ARM: keystone: Drop the un-necessary dsb from keystone_cpu_smc() ARM: Keystone: No need to preserve r12 across smc call ARM: keystone: remove redundant smp_init_cpus definition ARM: keystone: drop useless HAVE_SCHED_CLOCK ARM: dove: fix missing __init section of dove_mpp_gpio_mode ARM: shmobile: armadillo800eva-reference: fix compiler warning ...
Diffstat (limited to 'arch/arm/boot/compressed/head-shmobile.S')
-rw-r--r--arch/arm/boot/compressed/head-shmobile.S43
1 files changed, 39 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
index e2d636336b7c..e7f80928949c 100644
--- a/arch/arm/boot/compressed/head-shmobile.S
+++ b/arch/arm/boot/compressed/head-shmobile.S
@@ -55,12 +55,47 @@ __tmp_stack:
__continue:
#endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */
- /* Set board ID necessary for boot */
- ldr r7, 1f @ Set machine type register
- mov r8, #0 @ pass null pointer as atag
+ adr r0, dtb_info
+ ldmia r0, {r1, r3, r4, r5, r7}
+
+ sub r0, r0, r1 @ calculate the delta offset
+ add r5, r5, r0 @ _edata
+
+ ldr lr, [r5, #0] @ check if valid DTB is present
+ cmp lr, r3
+ bne 0f
+
+ add r9, r7, #31 @ rounded up to a multiple
+ bic r9, r9, #31 @ ... of 32 bytes
+
+ add r6, r9, r5 @ copy from _edata
+ add r9, r9, r4 @ to MEMORY_START
+
+1: ldmdb r6!, {r0 - r3, r10 - r12, lr}
+ cmp r6, r5
+ stmdb r9!, {r0 - r3, r10 - r12, lr}
+ bhi 1b
+
+ /* Success: Zero board ID, pointer to start of memory for atag/dtb */
+ mov r7, #0
+ mov r8, r4
b 2f
-1 : .long MACH_TYPE
+ .align 2
+dtb_info:
+ .word dtb_info
+#ifndef __ARMEB__
+ .word 0xedfe0dd0 @ sig is 0xd00dfeed big endian
+#else
+ .word 0xd00dfeed
+#endif
+ .word MEMORY_START
+ .word _edata
+ .word 0x4000 @ maximum DTB size
+0:
+ /* Failure: Zero board ID, NULL atag/dtb */
+ mov r7, #0
+ mov r8, #0 @ pass null pointer as atag
2 :
#endif /* CONFIG_ZBOOT_ROM */