Commit 124bd47d authored by Dave Jiang's avatar Dave Jiang Committed by Russell King

[ARM PATCH] 2035/1: 2033/3 - IOP3xx patch submission (3/6)

Patch from Dave Jiang

arch/arm/kernel changes
parent 66fd03e1
...@@ -411,8 +411,16 @@ ...@@ -411,8 +411,16 @@
.macro addruart,rx .macro addruart,rx
mov \rx, #0xfe000000 @ physical mov \rx, #0xfe000000 @ physical
#if defined(CONFIG_ARCH_IQ80321) #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244)
orr \rx, \rx, #0x00800000 @ location of the UART orr \rx, \rx, #0x00800000 @ location of the UART
#elif defined(CONFIG_ARCH_IOP331)
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
moveq \rx, #0x000fe000 @ Physical Base
movne \rx, #0
orr \rx, \rx, #0xfe000000
orr \rx, \rx, #0x00f00000 @ Virtual Base
orr \rx, \rx, #0x00001700 @ location of the UART
#else #else
#error Unknown IOP3XX implementation #error Unknown IOP3XX implementation
#endif #endif
...@@ -430,7 +438,7 @@ ...@@ -430,7 +438,7 @@
.endm .endm
.macro waituart,rd,rx .macro waituart,rd,rx
#ifndef CONFIG_ARCH_IQ80321 #if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331)
1001: ldrb \rd, [\rx, #0x6] 1001: ldrb \rd, [\rx, #0x6]
tst \rd, #0x10 tst \rd, #0x10
beq 1001b beq 1001b
......
...@@ -584,6 +584,39 @@ ENTRY(soft_irq_mask) ...@@ -584,6 +584,39 @@ ENTRY(soft_irq_mask)
.macro irq_prio_table .macro irq_prio_table
.endm .endm
#elif defined(CONFIG_ARCH_IOP331)
.macro disable_fiq
.endm
/*
* Note: only deal with normal interrupts, not FIQ
*/
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
mov \irqnr, #0
mrc p6, 0, \irqstat, c4, c0, 0 @ Read IINTSRC0
cmp \irqstat, #0
bne 1002f
mrc p6, 0, \irqstat, c5, c0, 0 @ Read IINTSRC1
cmp \irqstat, #0
beq 1001f
clz \irqnr, \irqstat
/*
* mov \base, #31
* subs \irqnr,\base,\irqnr
*/
rsbs \irqnr,\irqnr,#31 @ recommend by RMK
add \irqnr,\irqnr,#IRQ_IOP331_XINT8
b 1001f
1002: clz \irqnr, \irqstat
mov \base, #31
subs \irqnr,\base,\irqnr
add \irqnr,\irqnr,#IRQ_IOP331_DMA0_EOT
1001:
.endm
.macro irq_prio_table
.endm
#elif defined(CONFIG_ARCH_PXA) #elif defined(CONFIG_ARCH_PXA)
.macro disable_fiq .macro disable_fiq
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment