diff options
| -rw-r--r-- | arch/mips/bcm47xx/setup.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index b1aee33efd11..2c6bdade3f13 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | #include <asm/reboot.h> | 32 | #include <asm/reboot.h> |
| 33 | #include <asm/time.h> | 33 | #include <asm/time.h> |
| 34 | #include <bcm47xx.h> | 34 | #include <bcm47xx.h> |
| 35 | #include <asm/fw/cfe/cfe_api.h> | ||
| 36 | #include <asm/mach-bcm47xx/nvram.h> | 35 | #include <asm/mach-bcm47xx/nvram.h> |
| 37 | 36 | ||
| 38 | struct ssb_bus ssb_bcm47xx; | 37 | struct ssb_bus ssb_bcm47xx; |
| @@ -82,42 +81,33 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, | |||
| 82 | /* Fill boardinfo structure */ | 81 | /* Fill boardinfo structure */ |
| 83 | memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo)); | 82 | memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo)); |
| 84 | 83 | ||
| 85 | if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 || | 84 | if (nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0) |
| 86 | nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0) | ||
| 87 | iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); | 85 | iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); |
| 88 | if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 || | 86 | if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0) |
| 89 | nvram_getenv("boardtype", buf, sizeof(buf)) >= 0) | ||
| 90 | iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); | 87 | iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); |
| 91 | if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 || | 88 | if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0) |
| 92 | nvram_getenv("boardrev", buf, sizeof(buf)) >= 0) | ||
| 93 | iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0); | 89 | iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0); |
| 94 | 90 | ||
| 95 | /* Fill sprom structure */ | 91 | /* Fill sprom structure */ |
| 96 | memset(&(iv->sprom), 0, sizeof(struct ssb_sprom)); | 92 | memset(&(iv->sprom), 0, sizeof(struct ssb_sprom)); |
| 97 | iv->sprom.revision = 3; | 93 | iv->sprom.revision = 3; |
| 98 | 94 | ||
| 99 | if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 || | 95 | if (nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0) |
| 100 | nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0) | ||
| 101 | str2eaddr(buf, iv->sprom.et0mac); | 96 | str2eaddr(buf, iv->sprom.et0mac); |
| 102 | 97 | ||
| 103 | if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 || | 98 | if (nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0) |
| 104 | nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0) | ||
| 105 | str2eaddr(buf, iv->sprom.et1mac); | 99 | str2eaddr(buf, iv->sprom.et1mac); |
| 106 | 100 | ||
| 107 | if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 || | 101 | if (nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) |
| 108 | nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) | ||
| 109 | iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0); | 102 | iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0); |
| 110 | 103 | ||
| 111 | if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 || | 104 | if (nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) |
| 112 | nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) | ||
| 113 | iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0); | 105 | iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0); |
| 114 | 106 | ||
| 115 | if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 || | 107 | if (nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0) |
| 116 | nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0) | ||
| 117 | iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10); | 108 | iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10); |
| 118 | 109 | ||
| 119 | if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 || | 110 | if (nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0) |
| 120 | nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0) | ||
| 121 | iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10); | 111 | iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10); |
| 122 | 112 | ||
| 123 | return 0; | 113 | return 0; |
