Walk around RX underflow hardware issue in 32-bit SPORT RX reading
PATCH 1/1 Walk around RX underflow hardware issue in 32-bit SPORT RX reading
Disable local interrupts in 32-bit reading from SPORT RX MMR to walk around the RX underflow hardware issue when this reading is interrupted by the other IRQ.
Signed-off-by Sonic Zhang <[email protected]>
--- drivers/serial/bfin_sport_uart.h | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-)
drivers/serial/bfin_sport_uart.h +14 -1
@@ -43,7 +43,20 @@#define SPORT_GET_TFSDIV (sport) bfin_read16(((sport)->port.membase + OFFSET_TFSDIV))#define SPORT_GET_TX (sport) bfin_read16(((sport)->port.membase + OFFSET_TX))#define SPORT_GET_RX (sport) bfin_read16(((sport)->port.membase + OFFSET_RX)) -#define SPORT_GET_RX32 (sport) bfin_read32(((sport)->port.membase + OFFSET_RX)) +/* +* Disable local interrupt to walk around the fake RX underflow error +* when do 32-bit reading from RX fifois interrupted by other interrupt. +* This is a possible hardware anomaly. After it is logged officially, +* the official anomaly id should be listed bellow. +*/ +#define SPORT_GET_RX32 (sport) \ +({ \ + unsigned int __ret; \ + local_irq_disable(); \ + __ret = bfin_read32(((sport)->port.membase + OFFSET_RX)); \ + local_irq_enable(); \ + __ret; \ +})#define SPORT_GET_RCR1 (sport) bfin_read16(((sport)->port.membase + OFFSET_RCR1))#define SPORT_GET_RCR2 (sport) bfin_read16(((sport)->port.membase + OFFSET_RCR2))#define SPORT_GET_RCLKDIV (sport) bfin_read16(((sport)->port.membase + OFFSET_RCLKDIV))
Signature · 1 line
1.6.0
Quoted 3 lines · sonic zhang
Disable local interrupts in 32-bit reading from SPORT RX MMR to walk around the RX underflow hardware issue when this reading is interrupted by the other IRQ.
ive cleaned up the code in svn, so if you want to grab the updated version for sending out.
Signed-off-by Mike Frysinger <[email protected]>
-mike