aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 12:27:25 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 12:27:25 -0500
commit61a07c80a7cf7333475e7eda9934dac9a8a9c8b9 (patch)
tree82b5d5548d0f03a4e438225ef20adc9653aa7e3d /arch/arm/mach-omap2
parente735aa8a20fdc60439141b7b0c0382a3ce031f3b (diff)
omap2/3/4: Allow booting omap4 with multi-omap configuration
Allow booting omap4 with multi-omap configuration. Tested only on omap2 and omap3, please somebody test on omap4 and ack. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/include/mach/entry-macro.S36
1 files changed, 29 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index fe3c9ad59450..ff25c7e4e606 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -48,14 +48,18 @@ omap_irq_base: .word 0
48 ldr \base, =omap_irq_base @ irq base address 48 ldr \base, =omap_irq_base @ irq base address
49 ldr \base, [\base, #0] @ irq base value 49 ldr \base, [\base, #0] @ irq base value
50 cmp \base, #0 @ already configured? 50 cmp \base, #0 @ already configured?
51 bne 9998f @ nothing to do 51 bne 9997f @ nothing to do
52 52
53 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision 53 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
54 and \tmp, \tmp, #0x000f0000 @ only check architecture 54 and \tmp, \tmp, #0x000f0000 @ only check architecture
55 cmp \tmp, #0x00060000 @ is v6? 55 cmp \tmp, #0x00060000 @ is v6?
56 beq 2400f @ found v6 so it's omap24xx 56 beq 2400f @ found v6 so it's omap24xx
57 cmp \tmp, #0x000f0000 @ is cortex? 57 mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
58 beq 3400f @ found v7 so it's omap34xx 58 and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9
59 cmp \tmp, #0x00000080 @ cortex A-8?
60 beq 3400f @ found A-8 so it's omap34xx
61 cmp \tmp, #0x00000090 @ cortex A-9?
62 beq 4400f @ found A-9 so it's omap44xx
592400: ldr \base, =OMAP2_IRQ_BASE 632400: ldr \base, =OMAP2_IRQ_BASE
60 ldr \tmp, =omap_irq_base 64 ldr \tmp, =omap_irq_base
61 str \base, [\tmp, #0] 65 str \base, [\tmp, #0]
@@ -64,23 +68,41 @@ omap_irq_base: .word 0
64 ldr \tmp, =omap_irq_base 68 ldr \tmp, =omap_irq_base
65 str \base, [\tmp, #0] 69 str \base, [\tmp, #0]
66 b 9b 70 b 9b
679998: 714400: ldr \base, =OMAP4_IRQ_BASE
72 ldr \tmp, =omap_irq_base
73 str \base, [\tmp, #0]
74 b 9b
759997:
68 .endm 76 .endm
69 77
70 /* Check the pending interrupts. Note that base already set */ 78 /* Check the pending interrupts. Note that base already set */
71 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 79 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
80 tst \base, #0x100 @ gic address?
81 bne 4401f @ found gic
82
83 /* Handle omap2 and omap3 */
72 ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ 84 ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
73 cmp \irqnr, #0x0 85 cmp \irqnr, #0x0
74 bne 9999f 86 bne 9998f
75 ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ 87 ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
76 cmp \irqnr, #0x0 88 cmp \irqnr, #0x0
77 bne 9999f 89 bne 9998f
78 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ 90 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
79 cmp \irqnr, #0x0 91 cmp \irqnr, #0x0
809999: 929998:
81 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] 93 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
82 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ 94 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
95 b 9999f
83 96
97 /* Handle omap4 */
984401: ldr \irqstat, [\base, #GIC_CPU_INTACK]
99 ldr \tmp, =1021
100 bic \irqnr, \irqstat, #0x1c00
101 cmp \irqnr, #29
102 cmpcc \irqnr, \irqnr
103 cmpne \irqnr, \tmp
104 cmpcs \irqnr, \irqnr
1059999:
84 .endm 106 .endm
85 107
86 108