projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bcm53xx: sprom: prepare to support other hosttype-s
[openwrt/openwrt.git]
/
target
/
linux
/
bcm53xx
/
files
/
drivers
/
misc
/
bcm47xx-sprom.c
diff --git
a/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c
b/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c
index 4970a5b460e81276873e71d8329f0acfb89cb100..6b3ab96749774cfd6c569a703e0a3de0bf62e0a2 100644
(file)
--- a/
target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c
+++ b/
target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c
@@
-673,7
+673,14
@@
static int bcm47xx_sprom_init(struct bcma_bus *bus, struct ssb_sprom *out)
if (!nvram_dev)
return -ENOMEM;
if (!nvram_dev)
return -ENOMEM;
- fill.prefix = of_get_property(np, "prefix", NULL);
+ switch (bus->hosttype) {
+ case BCMA_HOSTTYPE_SOC:
+ fill.prefix = of_get_property(np, "prefix", NULL);
+ break;
+ default:
+ pr_err("Unable to fill SPROM for given hosttype.\n");
+ return -EINVAL;
+ }
fill.fallback = false;
fill.getenv = bcm47xx_sprom_getenv;
fill.fallback = false;
fill.getenv = bcm47xx_sprom_getenv;