diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-08 13:44:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-08 13:44:21 -0400 |
commit | c0c33addcba2ce753b4e2746db99feaae2f82a85 (patch) | |
tree | dab480183ac0e64bfe9250e1f294705d1a424c78 /include/linux/bcma | |
parent | ffbc03bc75b39c7bd412e7cc6d2185c11b0ffedd (diff) | |
parent | 931749bf78b969c54de9bbc67cf29b13a40bb73b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'include/linux/bcma')
-rw-r--r-- | include/linux/bcma/bcma.h | 25 | ||||
-rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 08763e4e848f..6ff080eac0b2 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/bcma/bcma_driver_chipcommon.h> | 7 | #include <linux/bcma/bcma_driver_chipcommon.h> |
8 | #include <linux/bcma/bcma_driver_pci.h> | 8 | #include <linux/bcma/bcma_driver_pci.h> |
9 | #include <linux/ssb/ssb.h> /* SPROM sharing */ | ||
9 | 10 | ||
10 | #include "bcma_regs.h" | 11 | #include "bcma_regs.h" |
11 | 12 | ||
@@ -31,6 +32,12 @@ struct bcma_host_ops { | |||
31 | void (*write8)(struct bcma_device *core, u16 offset, u8 value); | 32 | void (*write8)(struct bcma_device *core, u16 offset, u8 value); |
32 | void (*write16)(struct bcma_device *core, u16 offset, u16 value); | 33 | void (*write16)(struct bcma_device *core, u16 offset, u16 value); |
33 | void (*write32)(struct bcma_device *core, u16 offset, u32 value); | 34 | void (*write32)(struct bcma_device *core, u16 offset, u32 value); |
35 | #ifdef CONFIG_BCMA_BLOCKIO | ||
36 | void (*block_read)(struct bcma_device *core, void *buffer, | ||
37 | size_t count, u16 offset, u8 reg_width); | ||
38 | void (*block_write)(struct bcma_device *core, const void *buffer, | ||
39 | size_t count, u16 offset, u8 reg_width); | ||
40 | #endif | ||
34 | /* Agent ops */ | 41 | /* Agent ops */ |
35 | u32 (*aread32)(struct bcma_device *core, u16 offset); | 42 | u32 (*aread32)(struct bcma_device *core, u16 offset); |
36 | void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); | 43 | void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); |
@@ -117,6 +124,8 @@ struct bcma_device { | |||
117 | struct bcma_device_id id; | 124 | struct bcma_device_id id; |
118 | 125 | ||
119 | struct device dev; | 126 | struct device dev; |
127 | struct device *dma_dev; | ||
128 | unsigned int irq; | ||
120 | bool dev_registered; | 129 | bool dev_registered; |
121 | 130 | ||
122 | u8 core_index; | 131 | u8 core_index; |
@@ -179,6 +188,10 @@ struct bcma_bus { | |||
179 | 188 | ||
180 | struct bcma_drv_cc drv_cc; | 189 | struct bcma_drv_cc drv_cc; |
181 | struct bcma_drv_pci drv_pci; | 190 | struct bcma_drv_pci drv_pci; |
191 | |||
192 | /* We decided to share SPROM struct with SSB as long as we do not need | ||
193 | * any hacks for BCMA. This simplifies drivers code. */ | ||
194 | struct ssb_sprom sprom; | ||
182 | }; | 195 | }; |
183 | 196 | ||
184 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) | 197 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) |
@@ -208,6 +221,18 @@ void bcma_write32(struct bcma_device *core, u16 offset, u32 value) | |||
208 | { | 221 | { |
209 | core->bus->ops->write32(core, offset, value); | 222 | core->bus->ops->write32(core, offset, value); |
210 | } | 223 | } |
224 | #ifdef CONFIG_BCMA_BLOCKIO | ||
225 | extern inline void bcma_block_read(struct bcma_device *core, void *buffer, | ||
226 | size_t count, u16 offset, u8 reg_width) | ||
227 | { | ||
228 | core->bus->ops->block_read(core, buffer, count, offset, reg_width); | ||
229 | } | ||
230 | extern inline void bcma_block_write(struct bcma_device *core, const void *buffer, | ||
231 | size_t count, u16 offset, u8 reg_width) | ||
232 | { | ||
233 | core->bus->ops->block_write(core, buffer, count, offset, reg_width); | ||
234 | } | ||
235 | #endif | ||
211 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) | 236 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) |
212 | { | 237 | { |
213 | return core->bus->ops->aread32(core, offset); | 238 | return core->bus->ops->aread32(core, offset); |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 083c3b6cd5ce..9c5b69fc985a 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -244,6 +244,7 @@ | |||
244 | #define BCMA_CC_REGCTL_DATA 0x065C | 244 | #define BCMA_CC_REGCTL_DATA 0x065C |
245 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | 245 | #define BCMA_CC_PLLCTL_ADDR 0x0660 |
246 | #define BCMA_CC_PLLCTL_DATA 0x0664 | 246 | #define BCMA_CC_PLLCTL_DATA 0x0664 |
247 | #define BCMA_CC_SPROM 0x0830 /* SPROM beginning */ | ||
247 | 248 | ||
248 | /* Data for the PMU, if available. | 249 | /* Data for the PMU, if available. |
249 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 250 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |