Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360031
b: refs/heads/master
c: 111bd98
h: refs/heads/master
i:
  360029: 818ae87
  360027: 21fb505
  360023: 33ecb5f
  360015: e632661
  359999: a50f5d2
v: v3
  • Loading branch information
Hauke Mehrtens authored and John Crispin committed Feb 15, 2013
1 parent 4b48f79 commit b010cb1
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 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: f36738ddfeea02867b393e7f34da0cec48bafc54
refs/heads/master: 111bd981e2216827aab95503596501ab71bc7a7d
6 changes: 3 additions & 3 deletions trunk/arch/mips/bcm47xx/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/addrspace.h>
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>
#include <asm/mach-bcm47xx/bcm47xx.h>

static char nvram_buf[NVRAM_SPACE];
Expand Down Expand Up @@ -159,7 +159,7 @@ static int nvram_init(void)
return -ENXIO;
}

int nvram_getenv(char *name, char *val, size_t val_len)
int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len)
{
char *var, *value, *end, *eq;
int err;
Expand Down Expand Up @@ -189,4 +189,4 @@ int nvram_getenv(char *name, char *val, size_t val_len)
}
return -ENOENT;
}
EXPORT_SYMBOL(nvram_getenv);
EXPORT_SYMBOL(bcm47xx_nvram_getenv);
6 changes: 3 additions & 3 deletions trunk/arch/mips/bcm47xx/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <asm/reboot.h>
#include <asm/time.h>
#include <bcm47xx.h>
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>

union bcm47xx_bus bcm47xx_bus;
EXPORT_SYMBOL(bcm47xx_bus);
Expand Down Expand Up @@ -115,7 +115,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
bcm47xx_fill_sprom(&iv->sprom, NULL, false);

if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
if (bcm47xx_nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10);

return 0;
Expand All @@ -138,7 +138,7 @@ static void __init bcm47xx_register_ssb(void)
panic("Failed to initialize SSB bus (err %d)", err);

mcore = &bcm47xx_bus.ssb.mipscore;
if (nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
if (bcm47xx_nvram_getenv("kernel_args", buf, sizeof(buf)) >= 0) {
if (strstr(buf, "console=ttyS1")) {
struct ssb_serial_port port;

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/mips/bcm47xx/sprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

#include <bcm47xx.h>
#include <nvram.h>
#include <bcm47xx_nvram.h>

static void create_key(const char *prefix, const char *postfix,
const char *name, char *buf, int len)
Expand All @@ -50,10 +50,10 @@ static int get_nvram_var(const char *prefix, const char *postfix,

create_key(prefix, postfix, name, key, sizeof(key));

err = nvram_getenv(key, buf, len);
err = bcm47xx_nvram_getenv(key, buf, len);
if (fallback && err == -ENOENT && prefix) {
create_key(NULL, postfix, name, key, sizeof(key));
err = nvram_getenv(key, buf, len);
err = bcm47xx_nvram_getenv(key, buf, len);
}
return err;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ static void nvram_read_macaddr(const char *prefix, const char *name,
if (err < 0)
return;

nvram_parse_macaddr(buf, *val);
bcm47xx_nvram_parse_macaddr(buf, *val);
}

static void nvram_read_alpha2(const char *prefix, const char *name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* option) any later version.
*/

#ifndef __NVRAM_H
#define __NVRAM_H
#ifndef __BCM47XX_NVRAM_H
#define __BCM47XX_NVRAM_H

#include <linux/types.h>
#include <linux/kernel.h>
Expand All @@ -32,9 +32,9 @@ struct nvram_header {
#define NVRAM_MAX_VALUE_LEN 255
#define NVRAM_MAX_PARAM_LEN 64

extern int nvram_getenv(char *name, char *val, size_t val_len);
extern int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len);

static inline void nvram_parse_macaddr(char *buf, u8 macaddr[6])
static inline void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6])
{
if (strchr(buf, ':'))
sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0],
Expand All @@ -48,4 +48,4 @@ static inline void nvram_parse_macaddr(char *buf, u8 macaddr[6])
printk(KERN_WARNING "Can not parse mac address: %s\n", buf);
}

#endif
#endif /* __BCM47XX_NVRAM_H */
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/bcm47xxpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>

/* 10 parts were found on sflash on Netgear WNDR4500 */
#define BCM47XXPART_MAX_PARTS 12
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static void b44_set_flow_ctrl(struct b44 *bp, u32 local, u32 remote)
}

#ifdef CONFIG_BCM47XX
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>
static void b44_wap54g10_workaround(struct b44 *bp)
{
char buf[20];
Expand All @@ -393,7 +393,7 @@ static void b44_wap54g10_workaround(struct b44 *bp)
* see https://dev.openwrt.org/ticket/146
* check and reset bit "isolate"
*/
if (nvram_getenv("boardnum", buf, sizeof(buf)) < 0)
if (bcm47xx_nvram_getenv("boardnum", buf, sizeof(buf)) < 0)
return;
if (simple_strtoul(buf, NULL, 0) == 2) {
err = __b44_readphy(bp, 0, MII_BMCR, &val);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ssb/driver_chipcommon_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/delay.h>
#include <linux/export.h>
#ifdef CONFIG_BCM47XX
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>
#endif

#include "ssb_private.h"
Expand Down Expand Up @@ -322,7 +322,7 @@ static void ssb_pmu_pll_init(struct ssb_chipcommon *cc)
if (bus->bustype == SSB_BUSTYPE_SSB) {
#ifdef CONFIG_BCM47XX
char buf[20];
if (nvram_getenv("xtalfreq", buf, sizeof(buf)) >= 0)
if (bcm47xx_nvram_getenv("xtalfreq", buf, sizeof(buf)) >= 0)
crystalfreq = simple_strtoul(buf, NULL, 0);
#endif
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/ssb/ssb_driver_gige.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev)
}

#ifdef CONFIG_BCM47XX
#include <asm/mach-bcm47xx/nvram.h>
#include <bcm47xx_nvram.h>
/* Get the device MAC address */
static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
{
char buf[20];
if (nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0)
if (bcm47xx_nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0)
return;
nvram_parse_macaddr(buf, macaddr);
bcm47xx_nvram_parse_macaddr(buf, macaddr);
}
#else
static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
Expand Down

0 comments on commit b010cb1

Please sign in to comment.