diff options
Diffstat (limited to 'drivers/usb/musb/musbhsdma.h')
-rw-r--r-- | drivers/usb/musb/musbhsdma.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h index 613f95a058f..f763d62f151 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, | |||
102 | 102 | ||
103 | static inline u32 musb_read_hsdma_count(void __iomem *mbase, u8 bchannel) | 103 | static inline u32 musb_read_hsdma_count(void __iomem *mbase, u8 bchannel) |
104 | { | 104 | { |
105 | u32 count = musb_readw(mbase, | 105 | return musb_readl(mbase, |
106 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH)); | 106 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH)); |
107 | |||
108 | count = count << 16; | ||
109 | |||
110 | count |= musb_readw(mbase, | ||
111 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW)); | ||
112 | |||
113 | return count; | ||
114 | } | 107 | } |
115 | 108 | ||
116 | static inline void musb_write_hsdma_count(void __iomem *mbase, | 109 | static inline void musb_write_hsdma_count(void __iomem *mbase, |
117 | u8 bchannel, u32 len) | 110 | u8 bchannel, u32 len) |
118 | { | 111 | { |
119 | musb_writew(mbase, | 112 | musb_writel(mbase, |
120 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_LOW), | ||
121 | ((u16)((u32) len & 0xFFFF))); | ||
122 | musb_writew(mbase, | ||
123 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH), | 113 | MUSB_HSDMA_CHANNEL_OFFSET(bchannel, MUSB_HSDMA_COUNT_HIGH), |
124 | ((u16)(((u32) len >> 16) & 0xFFFF))); | 114 | len); |
125 | } | 115 | } |
126 | 116 | ||
127 | #endif /* CONFIG_BLACKFIN */ | 117 | #endif /* CONFIG_BLACKFIN */ |