Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
sprom.c File Reference
#include <bcm47xx.h>
#include <nvram.h>

Go to the source code of this file.

Macros

#define NVRAM_READ_VAL(type)
 

Functions

void bcm47xx_fill_sprom_ethernet (struct ssb_sprom *sprom, const char *prefix)
 
void bcm47xx_fill_sprom (struct ssb_sprom *sprom, const char *prefix)
 

Macro Definition Documentation

#define NVRAM_READ_VAL (   type)
Value:
static void nvram_read_ ## type (const char *prefix, \
const char *postfix, const char *name, \
type *val, type allset) \
{ \
char buf[100]; \
char key[40]; \
int err; \
type var; \
\
create_key(prefix, postfix, name, key, sizeof(key)); \
\
err = nvram_getenv(key, buf, sizeof(buf)); \
if (err < 0) \
return; \
err = kstrto ## type (buf, 0, &var); \
if (err) { \
pr_warn("can not parse nvram name %s with value %s" \
" got %i", key, buf, err); \
return; \
} \
if (allset && var == allset) \
return; \
*val = var; \
}

Definition at line 45 of file sprom.c.

Function Documentation

void bcm47xx_fill_sprom ( struct ssb_sprom sprom,
const char prefix 
)

Definition at line 558 of file sprom.c.

void bcm47xx_fill_sprom_ethernet ( struct ssb_sprom sprom,
const char prefix 
)

Definition at line 544 of file sprom.c.