aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bcma
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-05-19 21:27:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 15:12:28 -0400
commit9d75ef0f8f6d2e31ed940b3057a42a25f07076fb (patch)
tree712c09addf9f229bf25593e6f9f8a8d7d6d94859 /include/linux/bcma
parent505fb019d4924e425bb1024eb603a7bc7fe7fe63 (diff)
bcma: host pci: implement block R/W operations
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/bcma')
-rw-r--r--include/linux/bcma/bcma.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 8b0cef9fd69..27a27a79bea 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -31,6 +31,12 @@ struct bcma_host_ops {
31 void (*write8)(struct bcma_device *core, u16 offset, u8 value); 31 void (*write8)(struct bcma_device *core, u16 offset, u8 value);
32 void (*write16)(struct bcma_device *core, u16 offset, u16 value); 32 void (*write16)(struct bcma_device *core, u16 offset, u16 value);
33 void (*write32)(struct bcma_device *core, u16 offset, u32 value); 33 void (*write32)(struct bcma_device *core, u16 offset, u32 value);
34#ifdef CONFIG_BCMA_BLOCKIO
35 void (*block_read)(struct bcma_device *core, void *buffer,
36 size_t count, u16 offset, u8 reg_width);
37 void (*block_write)(struct bcma_device *core, const void *buffer,
38 size_t count, u16 offset, u8 reg_width);
39#endif
34 /* Agent ops */ 40 /* Agent ops */
35 u32 (*aread32)(struct bcma_device *core, u16 offset); 41 u32 (*aread32)(struct bcma_device *core, u16 offset);
36 void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); 42 void (*awrite32)(struct bcma_device *core, u16 offset, u32 value);
@@ -210,6 +216,18 @@ void bcma_write32(struct bcma_device *core, u16 offset, u32 value)
210{ 216{
211 core->bus->ops->write32(core, offset, value); 217 core->bus->ops->write32(core, offset, value);
212} 218}
219#ifdef CONFIG_BCMA_BLOCKIO
220extern inline void bcma_block_read(struct bcma_device *core, void *buffer,
221 size_t count, u16 offset, u8 reg_width)
222{
223 core->bus->ops->block_read(core, buffer, count, offset, reg_width);
224}
225extern inline void bcma_block_write(struct bcma_device *core, const void *buffer,
226 size_t count, u16 offset, u8 reg_width)
227{
228 core->bus->ops->block_write(core, buffer, count, offset, reg_width);
229}
230#endif
213extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) 231extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset)
214{ 232{
215 return core->bus->ops->aread32(core, offset); 233 return core->bus->ops->aread32(core, offset);