usb: musb: read MUSB_POWER register only when required.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 30 Oct 2012 18:52:23 +0000 (19:52 +0100)
committerFelipe Balbi <balbi@ti.com>
Wed, 31 Oct 2012 13:20:40 +0000 (15:20 +0200)
commitb11e94d03726c5dbee0d9a841a025313504e90f4
tree1c0b0f9dd296ca4580ad87b5d041b4a832f83d5c
parent4b0de6f38362960460d3693f122c6abe6bb0704b
usb: musb: read MUSB_POWER register only when required.

This is part of the workaround for AM35x advisory Advisory 1.1.20.
The advisory says that the IPSS bridge can't handle 8 & 16 bit read
access. An 8bit read access to MUSB_POWER results in an 32bit read
access which also reads INTRTX and therefore may lose interrupts.
This patch tries to minimize reads to MUSB_POWER and perform them only
when required.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c