musb_io.h (cb5629b10d64a8006622ce3a52bc887d91057d69) | musb_io.h (7c925546427a0428b84bc5ba1f28b3698e492072) |
---|---|
1/* 2 * MUSB OTG driver register I/O 3 * 4 * Copyright 2005 Mentor Graphics Corporation 5 * Copyright (C) 2005-2006 by Texas Instruments 6 * Copyright (C) 2006-2007 Nokia Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 60 unchanged lines hidden (view full) --- 69 70static inline void musb_writew(void __iomem *addr, unsigned offset, u16 data) 71 { __raw_writew(data, addr + offset); } 72 73static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data) 74 { __raw_writel(data, addr + offset); } 75 76 | 1/* 2 * MUSB OTG driver register I/O 3 * 4 * Copyright 2005 Mentor Graphics Corporation 5 * Copyright (C) 2005-2006 by Texas Instruments 6 * Copyright (C) 2006-2007 Nokia Corporation 7 * 8 * This program is free software; you can redistribute it and/or --- 60 unchanged lines hidden (view full) --- 69 70static inline void musb_writew(void __iomem *addr, unsigned offset, u16 data) 71 { __raw_writew(data, addr + offset); } 72 73static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data) 74 { __raw_writel(data, addr + offset); } 75 76 |
77#ifdef CONFIG_USB_TUSB6010 | 77#ifdef CONFIG_USB_MUSB_TUSB6010 |
78 79/* 80 * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum. 81 */ 82static inline u8 musb_readb(const void __iomem *addr, unsigned offset) 83{ 84 u16 tmp; 85 u8 val; --- 23 unchanged lines hidden (view full) --- 109#else 110 111static inline u8 musb_readb(const void __iomem *addr, unsigned offset) 112 { return __raw_readb(addr + offset); } 113 114static inline void musb_writeb(void __iomem *addr, unsigned offset, u8 data) 115 { __raw_writeb(data, addr + offset); } 116 | 78 79/* 80 * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum. 81 */ 82static inline u8 musb_readb(const void __iomem *addr, unsigned offset) 83{ 84 u16 tmp; 85 u8 val; --- 23 unchanged lines hidden (view full) --- 109#else 110 111static inline u8 musb_readb(const void __iomem *addr, unsigned offset) 112 { return __raw_readb(addr + offset); } 113 114static inline void musb_writeb(void __iomem *addr, unsigned offset, u8 data) 115 { __raw_writeb(data, addr + offset); } 116 |
117#endif /* CONFIG_USB_TUSB6010 */ | 117#endif /* CONFIG_USB_MUSB_TUSB6010 */ |
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); } --- 16 unchanged lines hidden --- | 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); } --- 16 unchanged lines hidden --- |