Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
ssb.h File Reference
#include <linux/device.h>
#include <linux/list.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/pci.h>
#include <linux/mod_devicetable.h>
#include <linux/dma-mapping.h>
#include <linux/ssb/ssb_regs.h>
#include <linux/ssb/ssb_driver_chipcommon.h>
#include <linux/ssb/ssb_driver_mips.h>
#include <linux/ssb/ssb_driver_extif.h>
#include <linux/ssb/ssb_driver_pci.h>

Go to the source code of this file.

Data Structures

struct  ssb_sprom_core_pwr_info
 
struct  ssb_sprom
 
struct  ssb_boardinfo
 
struct  ssb_bus_ops
 
struct  __ssb_dev_wrapper
 
struct  ssb_device
 
struct  ssb_driver
 
struct  ssb_bus
 
struct  ssb_init_invariants
 

Macros

#define SSB_DEV_CHIPCOMMON   0x800
 
#define SSB_DEV_ILINE20   0x801
 
#define SSB_DEV_SDRAM   0x803
 
#define SSB_DEV_PCI   0x804
 
#define SSB_DEV_MIPS   0x805
 
#define SSB_DEV_ETHERNET   0x806
 
#define SSB_DEV_V90   0x807
 
#define SSB_DEV_USB11_HOSTDEV   0x808
 
#define SSB_DEV_ADSL   0x809
 
#define SSB_DEV_ILINE100   0x80A
 
#define SSB_DEV_IPSEC   0x80B
 
#define SSB_DEV_PCMCIA   0x80D
 
#define SSB_DEV_INTERNAL_MEM   0x80E
 
#define SSB_DEV_MEMC_SDRAM   0x80F
 
#define SSB_DEV_EXTIF   0x811
 
#define SSB_DEV_80211   0x812
 
#define SSB_DEV_MIPS_3302   0x816
 
#define SSB_DEV_USB11_HOST   0x817
 
#define SSB_DEV_USB11_DEV   0x818
 
#define SSB_DEV_USB20_HOST   0x819
 
#define SSB_DEV_USB20_DEV   0x81A
 
#define SSB_DEV_SDIO_HOST   0x81B
 
#define SSB_DEV_ROBOSWITCH   0x81C
 
#define SSB_DEV_PARA_ATA   0x81D
 
#define SSB_DEV_SATA_XORDMA   0x81E
 
#define SSB_DEV_ETHERNET_GBIT   0x81F
 
#define SSB_DEV_PCIE   0x820
 
#define SSB_DEV_MIMO_PHY   0x821
 
#define SSB_DEV_SRAM_CTRLR   0x822
 
#define SSB_DEV_MINI_MACPHY   0x823
 
#define SSB_DEV_ARM_1176   0x824
 
#define SSB_DEV_ARM_7TDMI   0x825
 
#define SSB_DEV_ARM_CM3   0x82A
 
#define SSB_VENDOR_BROADCOM   0x4243
 
#define drv_to_ssb_drv(_drv)   container_of(_drv, struct ssb_driver, drv)
 
#define ssb_driver_register(drv)   __ssb_driver_register(drv, THIS_MODULE)
 
#define SSB_BOARDVENDOR_BCM   0x14E4 /* Broadcom */
 
#define SSB_BOARDVENDOR_DELL   0x1028 /* Dell */
 
#define SSB_BOARDVENDOR_HP   0x0E11 /* HP */
 
#define SSB_BOARD_BCM94306MP   0x0418
 
#define SSB_BOARD_BCM4309G   0x0421
 
#define SSB_BOARD_BCM4306CB   0x0417
 
#define SSB_BOARD_BCM4309MP   0x040C
 
#define SSB_BOARD_MP4318   0x044A
 
#define SSB_BOARD_BU4306   0x0416
 
#define SSB_BOARD_BU4309   0x040A
 
#define SSB_CHIPPACK_BCM4712S   1 /* Small 200pin 4712 */
 
#define SSB_CHIPPACK_BCM4712M   2 /* Medium 225pin 4712 */
 
#define SSB_CHIPPACK_BCM4712L   0 /* Large 340pin 4712 */
 
#define SSB_DMA_TRANSLATION_MASK   0xC0000000
 
#define SSB_DMA_TRANSLATION_SHIFT   30
 

Typedefs

typedef int(* ssb_invariants_func_t )(struct ssb_bus *bus, struct ssb_init_invariants *iv)
 

Enumerations

enum  ssb_bustype { SSB_BUSTYPE_SSB, SSB_BUSTYPE_PCI, SSB_BUSTYPE_PCMCIA, SSB_BUSTYPE_SDIO }
 
enum  ssb_quirks { SSB_QUIRK_SDIO_READ_AFTER_WRITE32 = (1 << 0) }
 

Functions

void ssb_set_devtypedata (struct ssb_device *dev, void *data)
 
int __ssb_driver_register (struct ssb_driver *drv, struct module *owner)
 
void ssb_driver_unregister (struct ssb_driver *drv)
 
int ssb_bus_ssbbus_register (struct ssb_bus *bus, unsigned long baseaddr, ssb_invariants_func_t get_invariants)
 
void ssb_bus_unregister (struct ssb_bus *bus)
 
bool ssb_is_sprom_available (struct ssb_bus *bus)
 
int ssb_arch_register_fallback_sprom (int(*sprom_callback)(struct ssb_bus *bus, struct ssb_sprom *out))
 
int ssb_bus_suspend (struct ssb_bus *bus)
 
int ssb_bus_resume (struct ssb_bus *bus)
 
u32 ssb_clockspeed (struct ssb_bus *bus)
 
int ssb_device_is_enabled (struct ssb_device *dev)
 
void ssb_device_enable (struct ssb_device *dev, u32 core_specific_flags)
 
void ssb_device_disable (struct ssb_device *dev, u32 core_specific_flags)
 
u32 ssb_dma_translation (struct ssb_device *dev)
 
int ssb_bus_may_powerdown (struct ssb_bus *bus)
 
int ssb_bus_powerup (struct ssb_bus *bus, bool dynamic_pctl)
 
void ssb_commit_settings (struct ssb_bus *bus)
 
u32 ssb_admatch_base (u32 adm)
 
u32 ssb_admatch_size (u32 adm)
 

Macro Definition Documentation

#define drv_to_ssb_drv (   _drv)    container_of(_drv, struct ssb_driver, drv)

Definition at line 318 of file ssb.h.

#define SSB_BOARD_BCM4306CB   0x0417

Definition at line 343 of file ssb.h.

#define SSB_BOARD_BCM4309G   0x0421

Definition at line 342 of file ssb.h.

#define SSB_BOARD_BCM4309MP   0x040C

Definition at line 344 of file ssb.h.

#define SSB_BOARD_BCM94306MP   0x0418

Definition at line 341 of file ssb.h.

#define SSB_BOARD_BU4306   0x0416

Definition at line 346 of file ssb.h.

#define SSB_BOARD_BU4309   0x040A

Definition at line 347 of file ssb.h.

#define SSB_BOARD_MP4318   0x044A

Definition at line 345 of file ssb.h.

#define SSB_BOARDVENDOR_BCM   0x14E4 /* Broadcom */

Definition at line 337 of file ssb.h.

#define SSB_BOARDVENDOR_DELL   0x1028 /* Dell */

Definition at line 338 of file ssb.h.

#define SSB_BOARDVENDOR_HP   0x0E11 /* HP */

Definition at line 339 of file ssb.h.

#define SSB_CHIPPACK_BCM4712L   0 /* Large 340pin 4712 */

Definition at line 351 of file ssb.h.

#define SSB_CHIPPACK_BCM4712M   2 /* Medium 225pin 4712 */

Definition at line 350 of file ssb.h.

#define SSB_CHIPPACK_BCM4712S   1 /* Small 200pin 4712 */

Definition at line 349 of file ssb.h.

#define SSB_DEV_80211   0x812

Definition at line 229 of file ssb.h.

#define SSB_DEV_ADSL   0x809

Definition at line 222 of file ssb.h.

#define SSB_DEV_ARM_1176   0x824

Definition at line 244 of file ssb.h.

#define SSB_DEV_ARM_7TDMI   0x825

Definition at line 245 of file ssb.h.

#define SSB_DEV_ARM_CM3   0x82A

Definition at line 246 of file ssb.h.

#define SSB_DEV_CHIPCOMMON   0x800

Definition at line 214 of file ssb.h.

#define SSB_DEV_ETHERNET   0x806

Definition at line 219 of file ssb.h.

#define SSB_DEV_ETHERNET_GBIT   0x81F

Definition at line 239 of file ssb.h.

#define SSB_DEV_EXTIF   0x811

Definition at line 228 of file ssb.h.

#define SSB_DEV_ILINE100   0x80A

Definition at line 223 of file ssb.h.

#define SSB_DEV_ILINE20   0x801

Definition at line 215 of file ssb.h.

#define SSB_DEV_INTERNAL_MEM   0x80E

Definition at line 226 of file ssb.h.

#define SSB_DEV_IPSEC   0x80B

Definition at line 224 of file ssb.h.

#define SSB_DEV_MEMC_SDRAM   0x80F

Definition at line 227 of file ssb.h.

#define SSB_DEV_MIMO_PHY   0x821

Definition at line 241 of file ssb.h.

#define SSB_DEV_MINI_MACPHY   0x823

Definition at line 243 of file ssb.h.

#define SSB_DEV_MIPS   0x805

Definition at line 218 of file ssb.h.

#define SSB_DEV_MIPS_3302   0x816

Definition at line 230 of file ssb.h.

#define SSB_DEV_PARA_ATA   0x81D

Definition at line 237 of file ssb.h.

#define SSB_DEV_PCI   0x804

Definition at line 217 of file ssb.h.

#define SSB_DEV_PCIE   0x820

Definition at line 240 of file ssb.h.

#define SSB_DEV_PCMCIA   0x80D

Definition at line 225 of file ssb.h.

#define SSB_DEV_ROBOSWITCH   0x81C

Definition at line 236 of file ssb.h.

#define SSB_DEV_SATA_XORDMA   0x81E

Definition at line 238 of file ssb.h.

#define SSB_DEV_SDIO_HOST   0x81B

Definition at line 235 of file ssb.h.

#define SSB_DEV_SDRAM   0x803

Definition at line 216 of file ssb.h.

#define SSB_DEV_SRAM_CTRLR   0x822

Definition at line 242 of file ssb.h.

#define SSB_DEV_USB11_DEV   0x818

Definition at line 232 of file ssb.h.

#define SSB_DEV_USB11_HOST   0x817

Definition at line 231 of file ssb.h.

#define SSB_DEV_USB11_HOSTDEV   0x808

Definition at line 221 of file ssb.h.

#define SSB_DEV_USB20_DEV   0x81A

Definition at line 234 of file ssb.h.

#define SSB_DEV_USB20_HOST   0x819

Definition at line 233 of file ssb.h.

#define SSB_DEV_V90   0x807

Definition at line 220 of file ssb.h.

#define SSB_DMA_TRANSLATION_MASK   0xC0000000

Definition at line 564 of file ssb.h.

#define SSB_DMA_TRANSLATION_SHIFT   30

Definition at line 565 of file ssb.h.

#define ssb_driver_register (   drv)    __ssb_driver_register(drv, THIS_MODULE)

Definition at line 321 of file ssb.h.

#define SSB_VENDOR_BROADCOM   0x4243

Definition at line 249 of file ssb.h.

Typedef Documentation

typedef int(* ssb_invariants_func_t)(struct ssb_bus *bus, struct ssb_init_invariants *iv)

Definition at line 462 of file ssb.h.

Enumeration Type Documentation

Enumerator:
SSB_BUSTYPE_SSB 
SSB_BUSTYPE_PCI 
SSB_BUSTYPE_PCMCIA 
SSB_BUSTYPE_SDIO 

Definition at line 329 of file ssb.h.

enum ssb_quirks
Enumerator:
SSB_QUIRK_SDIO_READ_AFTER_WRITE32 

Definition at line 446 of file ssb.h.

Function Documentation

int __ssb_driver_register ( struct ssb_driver drv,
struct module owner 
)

Definition at line 925 of file main.c.

u32 ssb_admatch_base ( u32  adm)

Definition at line 1373 of file main.c.

u32 ssb_admatch_size ( u32  adm)

Definition at line 1397 of file main.c.

int ssb_arch_register_fallback_sprom ( int(*)(struct ssb_bus *bus, struct ssb_sprom *out sprom_callback)

ssb_arch_register_fallback_sprom - Registers a method providing a fallback SPROM if no SPROM is found.

: The callback function.

With this function the architecture implementation may register a callback handler which fills the SPROM data structure. The fallback is only used for PCI based SSB devices, where no valid SPROM can be found in the shadow registers.

This function is useful for weird architectures that have a half-assed SSB device hardwired to their PCI bus.

Note that it does only work with PCI attached SSB devices. PCMCIA devices currently don't use this fallback. Architectures must provide the SPROM for native SSB devices anyway, so the fallback also isn't used for native devices.

This function is available for architecture code, only. So it is not exported.

Definition at line 169 of file sprom.c.

int ssb_bus_may_powerdown ( struct ssb_bus bus)

Definition at line 1286 of file main.c.

int ssb_bus_powerup ( struct ssb_bus bus,
bool  dynamic_pctl 
)

Definition at line 1319 of file main.c.

int ssb_bus_resume ( struct ssb_bus bus)

Definition at line 177 of file main.c.

int ssb_bus_ssbbus_register ( struct ssb_bus bus,
unsigned long  baseaddr,
ssb_invariants_func_t  get_invariants 
)

Definition at line 907 of file main.c.

int ssb_bus_suspend ( struct ssb_bus bus)

Definition at line 203 of file main.c.

void ssb_bus_unregister ( struct ssb_bus bus)

Definition at line 438 of file main.c.

u32 ssb_clockspeed ( struct ssb_bus bus)

Definition at line 1075 of file main.c.

void ssb_commit_settings ( struct ssb_bus bus)

Definition at line 1357 of file main.c.

void ssb_device_disable ( struct ssb_device dev,
u32  core_specific_flags 
)

Definition at line 1209 of file main.c.

void ssb_device_enable ( struct ssb_device dev,
u32  core_specific_flags 
)

Definition at line 1152 of file main.c.

int ssb_device_is_enabled ( struct ssb_device dev)

Definition at line 1127 of file main.c.

u32 ssb_dma_translation ( struct ssb_device dev)

Definition at line 1264 of file main.c.

void ssb_driver_unregister ( struct ssb_driver drv)

Definition at line 935 of file main.c.

bool ssb_is_sprom_available ( struct ssb_bus bus)

Definition at line 188 of file sprom.c.

void ssb_set_devtypedata ( struct ssb_device dev,
void data 
)

Definition at line 941 of file main.c.