platform specific patches don't belong here
[openwrt.git] / target / linux / brcm47xx / patches-2.6.36 / 010-MIPS-BCM47xx-Do-not-read-config-from-CFE.patch
1 From 12b15e5d5914d174e3411d0f0b3fd55dc1b5e55a Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sat, 27 Nov 2010 00:34:02 +0100
4 Subject: [PATCH 1/6] MIPS: BCM47xx: Do not read config from CFE
5
6 The config options read out here are not stored in CFE, but only in
7 NVRAM on the devices. Remove reading from CFE and only access the NVRAM.
8 Reading out CFE does not harm, but is useless here.
9
10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 ---
12 arch/mips/bcm47xx/setup.c | 28 +++++++++-------------------
13 1 files changed, 9 insertions(+), 19 deletions(-)
14
15 --- a/arch/mips/bcm47xx/setup.c
16 +++ b/arch/mips/bcm47xx/setup.c
17 @@ -32,7 +32,6 @@
18 #include <asm/reboot.h>
19 #include <asm/time.h>
20 #include <bcm47xx.h>
21 -#include <asm/fw/cfe/cfe_api.h>
22 #include <asm/mach-bcm47xx/nvram.h>
23
24 struct ssb_bus ssb_bcm47xx;
25 @@ -82,42 +81,33 @@ static int bcm47xx_get_invariants(struct
26 /* Fill boardinfo structure */
27 memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
28
29 - if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 ||
30 - nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
31 + if (nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0)
32 iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
33 - if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 ||
34 - nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
35 + if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
36 iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
37 - if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 ||
38 - nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
39 + if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
40 iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
41
42 /* Fill sprom structure */
43 memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
44 iv->sprom.revision = 3;
45
46 - if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 ||
47 - nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
48 + if (nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
49 str2eaddr(buf, iv->sprom.et0mac);
50
51 - if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 ||
52 - nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
53 + if (nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
54 str2eaddr(buf, iv->sprom.et1mac);
55
56 - if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 ||
57 - nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
58 + if (nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
59 iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
60
61 - if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 ||
62 - nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
63 + if (nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
64 iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
65
66 - if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 ||
67 - nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
68 + if (nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
69 iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
70
71 - if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 ||
72 - nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
73 + if (nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
74 iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
75
76 return 0;
This page took 0.050308 seconds and 5 git commands to generate.