aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ssb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ssb')
-rw-r--r--include/linux/ssb/ssb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 20add65215af..860d28c6d149 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -72,8 +72,10 @@ struct ssb_device;
72/* Lowlevel read/write operations on the device MMIO. 72/* Lowlevel read/write operations on the device MMIO.
73 * Internal, don't use that outside of ssb. */ 73 * Internal, don't use that outside of ssb. */
74struct ssb_bus_ops { 74struct ssb_bus_ops {
75 u8 (*read8)(struct ssb_device *dev, u16 offset);
75 u16 (*read16)(struct ssb_device *dev, u16 offset); 76 u16 (*read16)(struct ssb_device *dev, u16 offset);
76 u32 (*read32)(struct ssb_device *dev, u16 offset); 77 u32 (*read32)(struct ssb_device *dev, u16 offset);
78 void (*write8)(struct ssb_device *dev, u16 offset, u8 value);
77 void (*write16)(struct ssb_device *dev, u16 offset, u16 value); 79 void (*write16)(struct ssb_device *dev, u16 offset, u16 value);
78 void (*write32)(struct ssb_device *dev, u16 offset, u32 value); 80 void (*write32)(struct ssb_device *dev, u16 offset, u32 value);
79}; 81};
@@ -344,6 +346,10 @@ void ssb_device_disable(struct ssb_device *dev, u32 core_specific_flags);
344 346
345 347
346/* Device MMIO register read/write functions. */ 348/* Device MMIO register read/write functions. */
349static inline u8 ssb_read8(struct ssb_device *dev, u16 offset)
350{
351 return dev->ops->read8(dev, offset);
352}
347static inline u16 ssb_read16(struct ssb_device *dev, u16 offset) 353static inline u16 ssb_read16(struct ssb_device *dev, u16 offset)
348{ 354{
349 return dev->ops->read16(dev, offset); 355 return dev->ops->read16(dev, offset);
@@ -352,6 +358,10 @@ static inline u32 ssb_read32(struct ssb_device *dev, u16 offset)
352{ 358{
353 return dev->ops->read32(dev, offset); 359 return dev->ops->read32(dev, offset);
354} 360}
361static inline void ssb_write8(struct ssb_device *dev, u16 offset, u8 value)
362{
363 dev->ops->write8(dev, offset, value);
364}
355static inline void ssb_write16(struct ssb_device *dev, u16 offset, u16 value) 365static inline void ssb_write16(struct ssb_device *dev, u16 offset, u16 value)
356{ 366{
357 dev->ops->write16(dev, offset, value); 367 dev->ops->write16(dev, offset, value);