Commit 48fc6307 authored by Paul Mundt's avatar Paul Mundt

ARM: OMAP: STI STI_DR handling fixup

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: default avatarMikko K. Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: default avatarPaul Mundt <paul.mundt@nokia.com>
parent 6064893a
...@@ -77,7 +77,7 @@ static void sti_fifo_irq(unsigned long arg) ...@@ -77,7 +77,7 @@ static void sti_fifo_irq(unsigned long arg)
while (!(sti_readl(STI_RX_STATUS) & STI_RXFIFO_EMPTY)) { while (!(sti_readl(STI_RX_STATUS) & STI_RXFIFO_EMPTY)) {
unsigned int pos = sti_buf_pos(sti_crb->datalen); 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++; sti_crb->datalen++;
} }
......
...@@ -262,8 +262,16 @@ static void __sti_trace_disable(int event) ...@@ -262,8 +262,16 @@ static void __sti_trace_disable(int event)
u32 tmp; u32 tmp;
tmp = sti_readl(STI_DR); tmp = sti_readl(STI_DR);
if (cpu_is_omap16xx()) {
tmp |= event; tmp |= event;
tmp &= ~sti_kern_mask; tmp &= ~sti_kern_mask;
} else if (cpu_is_omap24xx()) {
tmp &= ~event;
tmp |= sti_kern_mask;
} else
BUG();
sti_writel(tmp, STI_DR); sti_writel(tmp, STI_DR);
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#define STI_IRQCLREN 0x20 #define STI_IRQCLREN 0x20
#define STI_ER 0x24 #define STI_ER 0x24
#define STI_DR 0x28 #define STI_DR 0x28
#define STI_RX_DR 0x2c
#define STI_RX_STATUS 0x30 #define STI_RX_STATUS 0x30
#define STI_CLK_CTRL 0x34 #define STI_CLK_CTRL 0x34
#define STI_IOBOTT0 0x4c #define STI_IOBOTT0 0x4c
...@@ -102,7 +103,8 @@ enum { ...@@ -102,7 +103,8 @@ enum {
#define STI_RX_STATUS XTI_SYSSTATUS #define STI_RX_STATUS XTI_SYSSTATUS
#define STI_IRQCLREN STI_IRQSETEN #define STI_IRQCLREN STI_IRQSETEN
#define STI_ER XTI_TRACESELECT #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_CLK_CTRL XTI_SCLKCRTL
#define STI_SERIAL_CFG XTI_SCONFIG #define STI_SERIAL_CFG XTI_SCONFIG
......
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