summaryrefslogtreecommitdiff
path: root/target/linux/bcm53xx/files
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-02-16 16:10:05 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-02-16 16:10:05 +0000
commit4c98253648c0b4a364dce28d69f04219bc8bc4d9 (patch)
treeb22d11fcd688ca204d4e7e1c4ddb9c9b6e5131b7 /target/linux/bcm53xx/files
parent29130d39e3f002b684d4fdbcb3dff4ecc202be2c (diff)
downloadmtk-20170518-4c98253648c0b4a364dce28d69f04219bc8bc4d9.zip
mtk-20170518-4c98253648c0b4a364dce28d69f04219bc8bc4d9.tar.gz
mtk-20170518-4c98253648c0b4a364dce28d69f04219bc8bc4d9.tar.bz2
bcm53xx: sprom: prepare to support other hosttype-s
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44463
Diffstat (limited to 'target/linux/bcm53xx/files')
-rw-r--r--target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c b/target/linux/bcm53xx/files/drivers/misc/bcm47xx-sprom.c
index 4970a5b..6b3ab96 100644
--- 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;
- 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;