aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc/kernel/head.S
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-03-26 11:18:44 -0400
committerIngo Molnar <mingo@kernel.org>2012-03-26 11:19:03 -0400
commit7fd52392c56361a40f0c630a82b36b95ca31eac6 (patch)
tree14091de24c6b28ea4cae9826f98aeedb7be091f5 /arch/openrisc/kernel/head.S
parentb01c3a0010aabadf745f3e7fdb9cab682e0a28a2 (diff)
parente22057c8599373e5caef0bc42bdb95d2a361ab0d (diff)
Merge branch 'linus' into perf/urgent
Merge reason: we need to fix a non-trivial merge conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/openrisc/kernel/head.S')
-rw-r--r--arch/openrisc/kernel/head.S17
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S
index c75018d22644..1088b5fca3bd 100644
--- a/arch/openrisc/kernel/head.S
+++ b/arch/openrisc/kernel/head.S
@@ -26,6 +26,7 @@
26#include <asm/cache.h> 26#include <asm/cache.h>
27#include <asm/spr_defs.h> 27#include <asm/spr_defs.h>
28#include <asm/asm-offsets.h> 28#include <asm/asm-offsets.h>
29#include <linux/of_fdt.h>
29 30
30#define tophys(rd,rs) \ 31#define tophys(rd,rs) \
31 l.movhi rd,hi(-KERNELBASE) ;\ 32 l.movhi rd,hi(-KERNELBASE) ;\
@@ -440,6 +441,9 @@ _dispatch_do_ipage_fault:
440 __HEAD 441 __HEAD
441 .global _start 442 .global _start
442_start: 443_start:
444 /* save kernel parameters */
445 l.or r25,r0,r3 /* pointer to fdt */
446
443 /* 447 /*
444 * ensure a deterministic start 448 * ensure a deterministic start
445 */ 449 */
@@ -471,7 +475,6 @@ _start:
471 CLEAR_GPR(r22) 475 CLEAR_GPR(r22)
472 CLEAR_GPR(r23) 476 CLEAR_GPR(r23)
473 CLEAR_GPR(r24) 477 CLEAR_GPR(r24)
474 CLEAR_GPR(r25)
475 CLEAR_GPR(r26) 478 CLEAR_GPR(r26)
476 CLEAR_GPR(r27) 479 CLEAR_GPR(r27)
477 CLEAR_GPR(r28) 480 CLEAR_GPR(r28)
@@ -565,6 +568,18 @@ enable_mmu:
565 // reset the simulation counters 568 // reset the simulation counters
566 l.nop 5 569 l.nop 5
567 570
571 /* check fdt header magic word */
572 l.lwz r3,0(r25) /* load magic from fdt into r3 */
573 l.movhi r4,hi(OF_DT_HEADER)
574 l.ori r4,r4,lo(OF_DT_HEADER)
575 l.sfeq r3,r4
576 l.bf _fdt_found
577 l.nop
578 /* magic number mismatch, set fdt pointer to null */
579 l.or r25,r0,r0
580_fdt_found:
581 /* pass fdt pointer to or32_early_setup in r3 */
582 l.or r3,r0,r25
568 LOAD_SYMBOL_2_GPR(r24, or32_early_setup) 583 LOAD_SYMBOL_2_GPR(r24, or32_early_setup)
569 l.jalr r24 584 l.jalr r24
570 l.nop 585 l.nop