Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249632
b: refs/heads/master
c: 755f609
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 51d5624 commit 0c8c1c1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 394 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f602d683ca10704081d49b3223c51608f1945d1
refs/heads/master: 755f609cb3f64c6b5d25979c805fae16c4cc0c33
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ static si_info_t *ai_doattach(si_info_t *sii, uint devid,
}

/* Init nvram from flash if it exists */
nvram_init((void *)&(sii->pub));
nvram_init();

/* Init nvram from sprom/otp if they exist */
if (srom_var_init
Expand Down Expand Up @@ -970,7 +970,7 @@ void ai_detach(si_t *sih)
sii->regs[idx] = NULL;
}

nvram_exit((void *)si_local); /* free up nvram buffers */
nvram_exit(); /* free up nvram buffers */

if (sih->bustype == PCI_BUS) {
if (sii->pch)
Expand Down
13 changes: 4 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmsmac/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
#include <linux/string.h>
#include <bcmdefs.h>
#include <bcmutils.h>
#include <siutils.h>
#include <bcmnvram.h>
#include <sbchipc.h>
#include <bcmsrom.h>
#include <bcmdevs.h>
#include <hndsoc.h>

Expand All @@ -42,7 +40,7 @@ static vars_t *vars;

static char *findvar(char *vars, char *lim, const char *name);

int nvram_init(void *si)
int nvram_init(void)
{

/* Make sure we read nvram in flash just once before freeing the memory */
Expand All @@ -53,7 +51,7 @@ int nvram_init(void *si)
return 0;
}

int nvram_append(void *si, char *varlst, uint varsz)
int nvram_append(char *varlst, uint varsz)
{
uint bufsz = VARS_T_OH;
vars_t *new;
Expand All @@ -71,14 +69,11 @@ int nvram_append(void *si, char *varlst, uint varsz)
return 0;
}

void nvram_exit(void *si)
void nvram_exit(void)
{
vars_t *this, *next;
si_t *sih;

sih = (si_t *) si;
this = vars;

if (this)
kfree(this->vars);

Expand Down Expand Up @@ -175,7 +170,7 @@ int nvram_unset(const char *name)
return 0;
}

int nvram_reset(void *si)
int nvram_reset(void)
{
return 0;
}
Expand Down
25 changes: 4 additions & 21 deletions trunk/drivers/staging/brcm80211/include/bcmnvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,27 @@ struct nvram_header {
u32 config_ncdl; /* ncdl values for memc */
};

/*
* Get default value for an NVRAM variable
*/
extern char *nvram_default_get(const char *name);

/*
* Initialize NVRAM access. May be unnecessary or undefined on certain
* platforms.
*/
extern int nvram_init(void *sih);
extern int nvram_init(void);

/*
* Append a chunk of nvram variables to the global list
*/
extern int nvram_append(void *si, char *vars, uint varsz);
extern int nvram_append(char *vars, uint varsz);

/*
* Check for reset button press for restoring factory defaults.
*/
extern int nvram_reset(void *sih);
extern int nvram_reset(void);

/*
* Disable NVRAM access. May be unnecessary or undefined on certain
* platforms.
*/
extern void nvram_exit(void *sih);
extern void nvram_exit(void);

/*
* Get the value of an NVRAM variable. The pointer returned may be
Expand All @@ -64,12 +59,6 @@ extern void nvram_exit(void *sih);
*/
extern char *nvram_get(const char *name);

/*
* Read the reset GPIO value from the nvram and set the GPIO
* as input
*/
extern int nvram_resetgpio_init(void *sih);

/*
* Get the value of an NVRAM variable.
* @param name name of variable to get
Expand Down Expand Up @@ -139,12 +128,6 @@ extern int nvram_commit(void);
*/
extern int nvram_getall(char *nvram_buf, int count);

/*
* returns the crc value of the nvram
* @param nvh nvram header pointer
*/
u8 nvram_calc_crc(struct nvram_header *nvh);

#endif /* _LANGUAGE_ASSEMBLY */

/* variable access */
Expand Down
Loading

0 comments on commit 0c8c1c1

Please sign in to comment.