From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Subject: [PATCH 5/9] omap2/3/4: Allow booting omap4 with multi-omap configuration
Date: Fri, 29 Jan 2010 18:01:34 -0800 [thread overview]
Message-ID: <20100130020134.10590.76835.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100130020036.10590.78028.stgit@baageli.muru.com>
Allow booting omap4 with multi-omap configuration.
Tested only on omap2 and omap3, please somebody test
on omap4 and ack.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/include/mach/entry-macro.S | 36 +++++++++++++++++++-----
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 fe3c9ad..ff25c7e 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
ldr \base, =omap_irq_base @ irq base address
ldr \base, [\base, #0] @ irq base value
cmp \base, #0 @ already configured?
- bne 9998f @ nothing to do
+ bne 9997f @ nothing to do
mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
and \tmp, \tmp, #0x000f0000 @ only check architecture
cmp \tmp, #0x00060000 @ is v6?
beq 2400f @ found v6 so it's omap24xx
- cmp \tmp, #0x000f0000 @ is cortex?
- beq 3400f @ found v7 so it's omap34xx
+ mrc p15, 0, \tmp, c0, c0, 0 @ get processor revision
+ and \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9
+ cmp \tmp, #0x00000080 @ cortex A-8?
+ beq 3400f @ found A-8 so it's omap34xx
+ cmp \tmp, #0x00000090 @ cortex A-9?
+ beq 4400f @ found A-9 so it's omap44xx
2400: ldr \base, =OMAP2_IRQ_BASE
ldr \tmp, =omap_irq_base
str \base, [\tmp, #0]
@@ -64,23 +68,41 @@ omap_irq_base: .word 0
ldr \tmp, =omap_irq_base
str \base, [\tmp, #0]
b 9b
-9998:
+4400: ldr \base, =OMAP4_IRQ_BASE
+ ldr \tmp, =omap_irq_base
+ str \base, [\tmp, #0]
+ b 9b
+9997:
.endm
/* Check the pending interrupts. Note that base already set */
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
+ tst \base, #0x100 @ gic address?
+ bne 4401f @ found gic
+
+ /* Handle omap2 and omap3 */
ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
cmp \irqnr, #0x0
- bne 9999f
+ bne 9998f
ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
cmp \irqnr, #0x0
- bne 9999f
+ bne 9998f
ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
cmp \irqnr, #0x0
-9999:
+9998:
ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
+ b 9999f
+ /* Handle omap4 */
+4401: ldr \irqstat, [\base, #GIC_CPU_INTACK]
+ ldr \tmp, =1021
+ bic \irqnr, \irqstat, #0x1c00
+ cmp \irqnr, #29
+ cmpcc \irqnr, \irqnr
+ cmpne \irqnr, \tmp
+ cmpcs \irqnr, \irqnr
+9999:
.endm
next prev parent reply other threads:[~2010-01-30 2:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 2:01 [PATCH 0/9] Initial multi-omap support for omap4 Tony Lindgren
2010-01-30 2:01 ` [PATCH 1/9] omap: Move multi-omap ifdeffery into it's own header file Tony Lindgren
2010-01-30 2:01 ` [PATCH 2/9] omap2/3/4: Clean up defines for entry-macro.S Tony Lindgren
2010-01-30 2:01 ` [PATCH 3/9] omap4: Use get_irqnr_preamble Tony Lindgren
2010-01-30 2:01 ` [PATCH 4/9] omap2/3/4: Clean up entry-macro.s for adding support for omap4 multiboot Tony Lindgren
2010-01-30 2:01 ` Tony Lindgren [this message]
2010-01-30 2:01 ` [PATCH 6/9] omap3/4: Fix compile for multi-omap for clkops_noncore_dpll_ops Tony Lindgren
2010-02-01 20:20 ` Paul Walmsley
2010-01-30 2:01 ` [PATCH 7/9] omap: Fix gpio.c for multi-omap for omap4 Tony Lindgren
2010-01-30 2:01 ` [PATCH 8/9] omap2/3/4: Fix mach-omap2/serial.c for multiboot Tony Lindgren
2010-01-30 2:01 ` [PATCH 9/9] omap2/3/4: Add omap4 into omap3_defconfnig Tony Lindgren
2010-01-30 11:09 ` [PATCH 0/9] Initial multi-omap support for omap4 Shilimkar, Santosh
2010-01-30 16:18 ` Tony Lindgren
2010-01-30 12:51 ` Shilimkar, Santosh
2010-01-30 16:24 ` Tony Lindgren
2010-01-30 17:54 ` Shilimkar, Santosh
2010-02-01 19:11 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100130020134.10590.76835.stgit@baageli.muru.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox