Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
sprom.c File Reference
#include "ssb_private.h"
#include <linux/ctype.h>
#include <linux/slab.h>

Go to the source code of this file.

Functions

ssize_t ssb_attr_sprom_show (struct ssb_bus *bus, char *buf, int(*sprom_read)(struct ssb_bus *bus, u16 *sprom))
 
ssize_t ssb_attr_sprom_store (struct ssb_bus *bus, const char *buf, size_t count, int(*sprom_check_crc)(const u16 *sprom, size_t size), int(*sprom_write)(struct ssb_bus *bus, const u16 *sprom))
 
int ssb_arch_register_fallback_sprom (int(*sprom_callback)(struct ssb_bus *bus, struct ssb_sprom *out))
 
int ssb_fill_sprom_with_fallback (struct ssb_bus *bus, struct ssb_sprom *out)
 
bool ssb_is_sprom_available (struct ssb_bus *bus)
 

Function Documentation

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.

ssize_t ssb_attr_sprom_show ( struct ssb_bus bus,
char buf,
int(*)(struct ssb_bus *bus, u16 *sprom)  sprom_read 
)

Definition at line 67 of file sprom.c.

ssize_t ssb_attr_sprom_store ( struct ssb_bus bus,
const char buf,
size_t  count,
int(*)(const u16 *sprom, size_t size sprom_check_crc,
int(*)(struct ssb_bus *bus, const u16 *sprom)  sprom_write 
)

Definition at line 98 of file sprom.c.

int ssb_fill_sprom_with_fallback ( struct ssb_bus bus,
struct ssb_sprom out 
)

Definition at line 179 of file sprom.c.

bool ssb_is_sprom_available ( struct ssb_bus bus)

Definition at line 188 of file sprom.c.