aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_io.h
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2008-12-02 14:33:46 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-07 13:00:07 -0500
commit2c557a4a98be67ea54dfd0e8497050a24b7311c6 (patch)
treee7b69c33b150824c2b21c2ff5c36a56c5a63af2d /drivers/usb/musb/musb_io.h
parentd426e60dbf6aa2c3199e37a59c6d134eb204d628 (diff)
USB: musb: add Blackfin version low level register accessing helper functions
add Blackfin version low level register accessing helper functions Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_io.h')
-rw-r--r--drivers/usb/musb/musb_io.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
index 223f0a514094..15f057722b64 100644
--- a/drivers/usb/musb/musb_io.h
+++ b/drivers/usb/musb/musb_io.h
@@ -56,6 +56,8 @@ static inline void writesb(const void __iomem *addr, const void *buf, int len)
56 56
57#endif 57#endif
58 58
59#ifndef CONFIG_BLACKFIN
60
59/* NOTE: these offsets are all in bytes */ 61/* NOTE: these offsets are all in bytes */
60 62
61static inline u16 musb_readw(const void __iomem *addr, unsigned offset) 63static inline u16 musb_readw(const void __iomem *addr, unsigned offset)
@@ -114,4 +116,26 @@ static inline void musb_writeb(void __iomem *addr, unsigned offset, u8 data)
114 116
115#endif /* CONFIG_USB_TUSB6010 */ 117#endif /* CONFIG_USB_TUSB6010 */
116 118
119#else
120
121static inline u8 musb_readb(const void __iomem *addr, unsigned offset)
122 { return (u8) (bfin_read16(addr + offset)); }
123
124static inline u16 musb_readw(const void __iomem *addr, unsigned offset)
125 { return bfin_read16(addr + offset); }
126
127static inline u32 musb_readl(const void __iomem *addr, unsigned offset)
128 { return (u32) (bfin_read16(addr + offset)); }
129
130static inline void musb_writeb(void __iomem *addr, unsigned offset, u8 data)
131 { bfin_write16(addr + offset, (u16) data); }
132
133static inline void musb_writew(void __iomem *addr, unsigned offset, u16 data)
134 { bfin_write16(addr + offset, data); }
135
136static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data)
137 { bfin_write16(addr + offset, (u16) data); }
138
139#endif /* CONFIG_BLACKFIN */
140
117#endif 141#endif