]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
usb: musb: hsdma: use musb_read/writel
authorFelipe Balbi <felipe.balbi@nokia.com>
Fri, 12 Mar 2010 08:29:13 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 May 2010 20:21:32 +0000 (13:21 -0700)
... 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>
drivers/usb/musb/musbhsdma.h

index 613f95a058f7c5ed9c9ed597ecd1949b0f9d1e74..f763d62f151c394676ed67b35b8f66b8ae71fd73 100644 (file)
@@ -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 */