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>
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++;
}
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);
}
#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
#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