]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: STI STI_DR handling fixup
authorPaul Mundt <paul.mundt@nokia.com>
Fri, 10 Feb 2006 11:14:58 +0000 (13:14 +0200)
committerPaul Mundt <paul.mundt@nokia.com>
Fri, 10 Feb 2006 11:14:58 +0000 (13:14 +0200)
OMAP1 was using STI_DR instead of STI_RX_DR, which was causing problems
in the RX path. OMAP2 has a consolidated XTI_TRACESELECT, the logic for
trace clearing is the logical inverse of the OMAP1 STI_DR, so fix that
while we're at it.

Signed-off-by: Mikko K. Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: Paul Mundt <paul.mundt@nokia.com>
arch/arm/plat-omap/sti/sti-fifo.c
arch/arm/plat-omap/sti/sti.c
include/asm-arm/arch-omap/sti.h

index 1824417a599f0aa9664b502d47b2bad2be191bdc..4069d9b2d3905a22fb1a3b9ecc3bc1e5786d54ab 100644 (file)
@@ -77,7 +77,7 @@ static void sti_fifo_irq(unsigned long arg)
        while (!(sti_readl(STI_RX_STATUS) & STI_RXFIFO_EMPTY)) {
                unsigned int pos = sti_buf_pos(sti_crb->datalen);
 
-               sti_crb->buf[pos] = sti_readl(STI_DR);
+               sti_crb->buf[pos] = sti_readl(STI_RX_DR);
                sti_crb->datalen++;
        }
 
index 5226e95bffb5470df54751f461a017f1b4e5e83c..7b04e3899e81e915713912ce1bbed86a5627cff4 100644 (file)
@@ -262,8 +262,16 @@ static void __sti_trace_disable(int event)
        u32 tmp;
 
        tmp = sti_readl(STI_DR);
-       tmp |= event;
-       tmp &= ~sti_kern_mask;
+
+       if (cpu_is_omap16xx()) {
+               tmp |= event;
+               tmp &= ~sti_kern_mask;
+       } else if (cpu_is_omap24xx()) {
+               tmp &= ~event;
+               tmp |= sti_kern_mask;
+       } else
+               BUG();
+
        sti_writel(tmp, STI_DR);
 }
 
index f42f6e5e907a18f54de73c2200473d21bda28f15..e5a383d813bd28a7284047dff7eff03ca437f182 100644 (file)
@@ -16,6 +16,7 @@
 #define STI_IRQCLREN           0x20
 #define STI_ER                 0x24
 #define STI_DR                 0x28
+#define STI_RX_DR              0x2c
 #define STI_RX_STATUS          0x30
 #define STI_CLK_CTRL           0x34
 #define STI_IOBOTT0            0x4c
@@ -102,7 +103,8 @@ enum {
 #define STI_RX_STATUS          XTI_SYSSTATUS
 #define STI_IRQCLREN           STI_IRQSETEN
 #define STI_ER                 XTI_TRACESELECT
-#define STI_DR                 XTI_RXDATA
+#define STI_DR                 XTI_TRACESELECT
+#define STI_RX_DR              XTI_RXDATA
 #define STI_CLK_CTRL           XTI_SCLKCRTL
 #define STI_SERIAL_CFG         XTI_SCONFIG