4 #include <linux/device.h>
5 #include <linux/list.h>
6 #include <linux/types.h>
204 #ifdef CONFIG_SSB_BLOCKIO
214 #define SSB_DEV_CHIPCOMMON 0x800
215 #define SSB_DEV_ILINE20 0x801
216 #define SSB_DEV_SDRAM 0x803
217 #define SSB_DEV_PCI 0x804
218 #define SSB_DEV_MIPS 0x805
219 #define SSB_DEV_ETHERNET 0x806
220 #define SSB_DEV_V90 0x807
221 #define SSB_DEV_USB11_HOSTDEV 0x808
222 #define SSB_DEV_ADSL 0x809
223 #define SSB_DEV_ILINE100 0x80A
224 #define SSB_DEV_IPSEC 0x80B
225 #define SSB_DEV_PCMCIA 0x80D
226 #define SSB_DEV_INTERNAL_MEM 0x80E
227 #define SSB_DEV_MEMC_SDRAM 0x80F
228 #define SSB_DEV_EXTIF 0x811
229 #define SSB_DEV_80211 0x812
230 #define SSB_DEV_MIPS_3302 0x816
231 #define SSB_DEV_USB11_HOST 0x817
232 #define SSB_DEV_USB11_DEV 0x818
233 #define SSB_DEV_USB20_HOST 0x819
234 #define SSB_DEV_USB20_DEV 0x81A
235 #define SSB_DEV_SDIO_HOST 0x81B
236 #define SSB_DEV_ROBOSWITCH 0x81C
237 #define SSB_DEV_PARA_ATA 0x81D
238 #define SSB_DEV_SATA_XORDMA 0x81E
239 #define SSB_DEV_ETHERNET_GBIT 0x81F
240 #define SSB_DEV_PCIE 0x820
241 #define SSB_DEV_MIMO_PHY 0x821
242 #define SSB_DEV_SRAM_CTRLR 0x822
243 #define SSB_DEV_MINI_MACPHY 0x823
244 #define SSB_DEV_ARM_1176 0x824
245 #define SSB_DEV_ARM_7TDMI 0x825
246 #define SSB_DEV_ARM_CM3 0x82A
249 #define SSB_VENDOR_BROADCOM 0x4243
318 #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv)
321 #define ssb_driver_register(drv) \
322 __ssb_driver_register(drv, THIS_MODULE)
337 #define SSB_BOARDVENDOR_BCM 0x14E4
338 #define SSB_BOARDVENDOR_DELL 0x1028
339 #define SSB_BOARDVENDOR_HP 0x0E11
341 #define SSB_BOARD_BCM94306MP 0x0418
342 #define SSB_BOARD_BCM4309G 0x0421
343 #define SSB_BOARD_BCM4306CB 0x0417
344 #define SSB_BOARD_BCM4309MP 0x040C
345 #define SSB_BOARD_MP4318 0x044A
346 #define SSB_BOARD_BU4306 0x0416
347 #define SSB_BOARD_BU4309 0x040A
349 #define SSB_CHIPPACK_BCM4712S 1
350 #define SSB_CHIPPACK_BCM4712M 2
351 #define SSB_CHIPPACK_BCM4712L 0
392 #ifdef CONFIG_SSB_SPROM
394 struct mutex sprom_mutex;
432 #ifdef CONFIG_SSB_EMBEDDED
439 #ifdef CONFIG_SSB_DEBUG
442 int power_warn_count;
470 unsigned long baseaddr,
472 #ifdef CONFIG_SSB_PCIHOST
473 extern int ssb_bus_pcibus_register(
struct ssb_bus *bus,
476 #ifdef CONFIG_SSB_PCMCIAHOST
477 extern int ssb_bus_pcmciabus_register(
struct ssb_bus *bus,
478 struct pcmcia_device *pcmcia_dev,
479 unsigned long baseaddr);
481 #ifdef CONFIG_SSB_SDIOHOST
482 extern int ssb_bus_sdiobus_register(
struct ssb_bus *bus,
484 unsigned int quirks);
496 int (*sprom_callback)(
struct ssb_bus *bus,
520 return dev->
ops->read8(dev, offset);
524 return dev->
ops->read16(dev, offset);
528 return dev->
ops->read32(dev, offset);
532 dev->
ops->write8(dev, offset, value);
534 static inline void ssb_write16(
struct ssb_device *dev,
u16 offset,
u16 value)
536 dev->
ops->write16(dev, offset, value);
538 static inline void ssb_write32(
struct ssb_device *dev,
u16 offset,
u32 value)
540 dev->
ops->write32(dev, offset, value);
542 #ifdef CONFIG_SSB_BLOCKIO
546 dev->
ops->block_read(dev, buffer, count, offset, reg_width);
549 static inline void ssb_block_write(
struct ssb_device *dev,
const void *buffer,
550 size_t count,
u16 offset,
u8 reg_width)
552 dev->
ops->block_write(dev, buffer, count, offset, reg_width);
564 #define SSB_DMA_TRANSLATION_MASK 0xC0000000
565 #define SSB_DMA_TRANSLATION_SHIFT 30
569 #ifdef CONFIG_SSB_DEBUG
571 "unsupported bustype %d\n", dev->
bus->bustype);
575 #ifdef CONFIG_SSB_PCIHOST
620 #ifdef CONFIG_SSB_EMBEDDED