summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musbhsdma.h
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-03-12 11:29:13 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 00:21:32 +0400
commitddb495d4d81dee4fdd96ae397d60ddefd65204c6 (patch)
tree377411bdbd9d73e1f5ed3384107071d88a69b1c4 /drivers/usb/musb/musbhsdma.h
parentca4b2532fb0e2d62370d9825147ffa9b9d9e3880 (diff)
downloadlinux-ddb495d4d81dee4fdd96ae397d60ddefd65204c6.tar.xz
usb: musb: hsdma: use musb_read/writel
... and simplify the was we read/write from/to DMA COUNT register. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musbhsdma.h')
-rw-r--r--drivers/usb/musb/musbhsdma.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h
index 613f95a058f7..f763d62f151c 100644
--- a/drivers/usb/musb/musbhsdma.h
+++ b/drivers/usb/musb/musbhsdma.h
@@ -102,26 +102,16 @@ static inline void musb_write_hsdma_addr(void __iomem *mbase,
static inline u32 musb_read_hsdma_count(void __iomem *mbase, u8 bchannel)
{
- u32 count = musb_readw(mbase,
+ return musb_readl(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH));
-
- count = count << 16;
-
- count |= musb_readw(mbase,
- MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW));
-
- return count;
}
static inline void musb_write_hsdma_count(void __iomem *mbase,
u8 bchannel, u32 len)
{
- musb_writew(mbase,
- MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW),
- ((u16)((u32) len & 0xFFFF)));
- musb_writew(mbase,
+ musb_writel(mbase,
MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH),
- ((u16)(((u32) len >> 16) & 0xFFFF)));
+ len);
}
#endif /* CONFIG_BLACKFIN */