aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ssb/ssb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ssb/ssb.h')
-rw-r--r--include/linux/ssb/ssb.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index a8ca396f810a..9f95afd0e9e3 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -78,6 +78,12 @@ struct ssb_bus_ops {
78 void (*write8)(struct ssb_device *dev, u16 offset, u8 value); 78 void (*write8)(struct ssb_device *dev, u16 offset, u8 value);
79 void (*write16)(struct ssb_device *dev, u16 offset, u16 value); 79 void (*write16)(struct ssb_device *dev, u16 offset, u16 value);
80 void (*write32)(struct ssb_device *dev, u16 offset, u32 value); 80 void (*write32)(struct ssb_device *dev, u16 offset, u32 value);
81#ifdef CONFIG_SSB_BLOCKIO
82 void (*block_read)(struct ssb_device *dev, void *buffer,
83 size_t count, u16 offset, u8 reg_width);
84 void (*block_write)(struct ssb_device *dev, const void *buffer,
85 size_t count, u16 offset, u8 reg_width);
86#endif
81}; 87};
82 88
83 89
@@ -374,6 +380,19 @@ static inline void ssb_write32(struct ssb_device *dev, u16 offset, u32 value)
374{ 380{
375 dev->ops->write32(dev, offset, value); 381 dev->ops->write32(dev, offset, value);
376} 382}
383#ifdef CONFIG_SSB_BLOCKIO
384static inline void ssb_block_read(struct ssb_device *dev, void *buffer,
385 size_t count, u16 offset, u8 reg_width)
386{
387 dev->ops->block_read(dev, buffer, count, offset, reg_width);
388}
389
390static inline void ssb_block_write(struct ssb_device *dev, const void *buffer,
391 size_t count, u16 offset, u8 reg_width)
392{
393 dev->ops->block_write(dev, buffer, count, offset, reg_width);
394}
395#endif /* CONFIG_SSB_BLOCKIO */
377 396
378 397
379/* Translation (routing) bits that need to be ORed to DMA 398/* Translation (routing) bits that need to be ORed to DMA