aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm47xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/bcm47xx')
-rw-r--r--arch/mips/bcm47xx/bcm47xx_private.h6
-rw-r--r--arch/mips/bcm47xx/irq.c8
-rw-r--r--arch/mips/bcm47xx/nvram.c155
-rw-r--r--arch/mips/bcm47xx/setup.c91
-rw-r--r--arch/mips/bcm47xx/sprom.c82
5 files changed, 211 insertions, 131 deletions
diff --git a/arch/mips/bcm47xx/bcm47xx_private.h b/arch/mips/bcm47xx/bcm47xx_private.h
index f1cc9d0495d8..ea909a56a3ee 100644
--- a/arch/mips/bcm47xx/bcm47xx_private.h
+++ b/arch/mips/bcm47xx/bcm47xx_private.h
@@ -6,12 +6,18 @@
6/* prom.c */ 6/* prom.c */
7void __init bcm47xx_prom_highmem_init(void); 7void __init bcm47xx_prom_highmem_init(void);
8 8
9/* sprom.c */
10void bcm47xx_sprom_register_fallbacks(void);
11
9/* buttons.c */ 12/* buttons.c */
10int __init bcm47xx_buttons_register(void); 13int __init bcm47xx_buttons_register(void);
11 14
12/* leds.c */ 15/* leds.c */
13void __init bcm47xx_leds_register(void); 16void __init bcm47xx_leds_register(void);
14 17
18/* setup.c */
19void __init bcm47xx_bus_setup(void);
20
15/* workarounds.c */ 21/* workarounds.c */
16void __init bcm47xx_workarounds(void); 22void __init bcm47xx_workarounds(void);
17 23
diff --git a/arch/mips/bcm47xx/irq.c b/arch/mips/bcm47xx/irq.c
index e0585b76ec19..21b4497f09be 100644
--- a/arch/mips/bcm47xx/irq.c
+++ b/arch/mips/bcm47xx/irq.c
@@ -22,6 +22,8 @@
22 * 675 Mass Ave, Cambridge, MA 02139, USA. 22 * 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24 24
25#include "bcm47xx_private.h"
26
25#include <linux/types.h> 27#include <linux/types.h>
26#include <linux/interrupt.h> 28#include <linux/interrupt.h>
27#include <linux/irq.h> 29#include <linux/irq.h>
@@ -65,6 +67,12 @@ DEFINE_HWx_IRQDISPATCH(7)
65 67
66void __init arch_init_irq(void) 68void __init arch_init_irq(void)
67{ 69{
70 /*
71 * This is the first arch callback after mm_init (we can use kmalloc),
72 * so let's finish bus initialization now.
73 */
74 bcm47xx_bus_setup();
75
68#ifdef CONFIG_BCM47XX_BCMA 76#ifdef CONFIG_BCM47XX_BCMA
69 if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) { 77 if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
70 bcma_write32(bcm47xx_bus.bcma.bus.drv_mips.core, 78 bcma_write32(bcm47xx_bus.bcma.bus.drv_mips.core,
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
index 2bed73a684ae..c5c381c43f17 100644
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -13,24 +13,35 @@
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/ssb/ssb.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/string.h> 17#include <linux/string.h>
19#include <asm/addrspace.h> 18#include <linux/mtd/mtd.h>
20#include <bcm47xx_nvram.h> 19#include <bcm47xx_nvram.h>
21#include <asm/mach-bcm47xx/bcm47xx.h> 20
21#define NVRAM_MAGIC 0x48534C46 /* 'FLSH' */
22#define NVRAM_SPACE 0x8000
23
24#define FLASH_MIN 0x00020000 /* Minimum flash size */
25
26struct nvram_header {
27 u32 magic;
28 u32 len;
29 u32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:31 sdram_init */
30 u32 config_refresh; /* 0:15 sdram_config, 16:31 sdram_refresh */
31 u32 config_ncdl; /* ncdl values for memc */
32};
22 33
23static char nvram_buf[NVRAM_SPACE]; 34static char nvram_buf[NVRAM_SPACE];
24static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000}; 35static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
25 36
26static u32 find_nvram_size(u32 end) 37static u32 find_nvram_size(void __iomem *end)
27{ 38{
28 struct nvram_header *header; 39 struct nvram_header __iomem *header;
29 int i; 40 int i;
30 41
31 for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) { 42 for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) {
32 header = (struct nvram_header *)KSEG1ADDR(end - nvram_sizes[i]); 43 header = (struct nvram_header *)(end - nvram_sizes[i]);
33 if (header->magic == NVRAM_HEADER) 44 if (header->magic == NVRAM_MAGIC)
34 return nvram_sizes[i]; 45 return nvram_sizes[i];
35 } 46 }
36 47
@@ -38,36 +49,40 @@ static u32 find_nvram_size(u32 end)
38} 49}
39 50
40/* Probe for NVRAM header */ 51/* Probe for NVRAM header */
41static int nvram_find_and_copy(u32 base, u32 lim) 52static int nvram_find_and_copy(void __iomem *iobase, u32 lim)
42{ 53{
43 struct nvram_header *header; 54 struct nvram_header __iomem *header;
44 int i; 55 int i;
45 u32 off; 56 u32 off;
46 u32 *src, *dst; 57 u32 *src, *dst;
47 u32 size; 58 u32 size;
48 59
60 if (nvram_buf[0]) {
61 pr_warn("nvram already initialized\n");
62 return -EEXIST;
63 }
64
49 /* TODO: when nvram is on nand flash check for bad blocks first. */ 65 /* TODO: when nvram is on nand flash check for bad blocks first. */
50 off = FLASH_MIN; 66 off = FLASH_MIN;
51 while (off <= lim) { 67 while (off <= lim) {
52 /* Windowed flash access */ 68 /* Windowed flash access */
53 size = find_nvram_size(base + off); 69 size = find_nvram_size(iobase + off);
54 if (size) { 70 if (size) {
55 header = (struct nvram_header *)KSEG1ADDR(base + off - 71 header = (struct nvram_header *)(iobase + off - size);
56 size);
57 goto found; 72 goto found;
58 } 73 }
59 off <<= 1; 74 off <<= 1;
60 } 75 }
61 76
62 /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ 77 /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
63 header = (struct nvram_header *) KSEG1ADDR(base + 4096); 78 header = (struct nvram_header *)(iobase + 4096);
64 if (header->magic == NVRAM_HEADER) { 79 if (header->magic == NVRAM_MAGIC) {
65 size = NVRAM_SPACE; 80 size = NVRAM_SPACE;
66 goto found; 81 goto found;
67 } 82 }
68 83
69 header = (struct nvram_header *) KSEG1ADDR(base + 1024); 84 header = (struct nvram_header *)(iobase + 1024);
70 if (header->magic == NVRAM_HEADER) { 85 if (header->magic == NVRAM_MAGIC) {
71 size = NVRAM_SPACE; 86 size = NVRAM_SPACE;
72 goto found; 87 goto found;
73 } 88 }
@@ -94,71 +109,73 @@ found:
94 return 0; 109 return 0;
95} 110}
96 111
97#ifdef CONFIG_BCM47XX_SSB 112/*
98static int nvram_init_ssb(void) 113 * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
114 * subsystem to access flash. We can't even use platform device / driver to
115 * store memory offset.
116 * To handle this we provide following symbol. It's supposed to be called as
117 * soon as we get info about flash device, before any NVRAM entry is needed.
118 */
119int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
99{ 120{
100 struct ssb_mipscore *mcore = &bcm47xx_bus.ssb.mipscore; 121 void __iomem *iobase;
101 u32 base; 122 int err;
102 u32 lim;
103
104 if (mcore->pflash.present) {
105 base = mcore->pflash.window;
106 lim = mcore->pflash.window_size;
107 } else {
108 pr_err("Couldn't find supported flash memory\n");
109 return -ENXIO;
110 }
111 123
112 return nvram_find_and_copy(base, lim); 124 iobase = ioremap_nocache(base, lim);
113} 125 if (!iobase)
114#endif 126 return -ENOMEM;
115 127
116#ifdef CONFIG_BCM47XX_BCMA 128 err = nvram_find_and_copy(iobase, lim);
117static int nvram_init_bcma(void) 129
118{ 130 iounmap(iobase);
119 struct bcma_drv_cc *cc = &bcm47xx_bus.bcma.bus.drv_cc;
120 u32 base;
121 u32 lim;
122
123#ifdef CONFIG_BCMA_NFLASH
124 if (cc->nflash.boot) {
125 base = BCMA_SOC_FLASH1;
126 lim = BCMA_SOC_FLASH1_SZ;
127 } else
128#endif
129 if (cc->pflash.present) {
130 base = cc->pflash.window;
131 lim = cc->pflash.window_size;
132#ifdef CONFIG_BCMA_SFLASH
133 } else if (cc->sflash.present) {
134 base = cc->sflash.window;
135 lim = cc->sflash.size;
136#endif
137 } else {
138 pr_err("Couldn't find supported flash memory\n");
139 return -ENXIO;
140 }
141 131
142 return nvram_find_and_copy(base, lim); 132 return err;
143} 133}
144#endif
145 134
146static int nvram_init(void) 135static int nvram_init(void)
147{ 136{
148 switch (bcm47xx_bus_type) { 137#ifdef CONFIG_MTD
149#ifdef CONFIG_BCM47XX_SSB 138 struct mtd_info *mtd;
150 case BCM47XX_BUS_TYPE_SSB: 139 struct nvram_header header;
151 return nvram_init_ssb(); 140 size_t bytes_read;
152#endif 141 int err, i;
153#ifdef CONFIG_BCM47XX_BCMA 142
154 case BCM47XX_BUS_TYPE_BCMA: 143 mtd = get_mtd_device_nm("nvram");
155 return nvram_init_bcma(); 144 if (IS_ERR(mtd))
156#endif 145 return -ENODEV;
146
147 for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) {
148 loff_t from = mtd->size - nvram_sizes[i];
149
150 if (from < 0)
151 continue;
152
153 err = mtd_read(mtd, from, sizeof(header), &bytes_read,
154 (uint8_t *)&header);
155 if (!err && header.magic == NVRAM_MAGIC) {
156 u8 *dst = (uint8_t *)nvram_buf;
157 size_t len = header.len;
158
159 if (header.len > NVRAM_SPACE) {
160 pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
161 header.len, NVRAM_SPACE);
162 len = NVRAM_SPACE;
163 }
164
165 err = mtd_read(mtd, from, len, &bytes_read, dst);
166 if (err)
167 return err;
168 memset(dst + bytes_read, 0x0, NVRAM_SPACE - bytes_read);
169
170 return 0;
171 }
157 } 172 }
173#endif
174
158 return -ENXIO; 175 return -ENXIO;
159} 176}
160 177
161int bcm47xx_nvram_getenv(char *name, char *val, size_t val_len) 178int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len)
162{ 179{
163 char *var, *value, *end, *eq; 180 char *var, *value, *end, *eq;
164 int err; 181 int err;
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index c00585d915bc..e43b5046cb30 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -102,23 +102,6 @@ static void bcm47xx_machine_halt(void)
102} 102}
103 103
104#ifdef CONFIG_BCM47XX_SSB 104#ifdef CONFIG_BCM47XX_SSB
105static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
106{
107 char prefix[10];
108
109 if (bus->bustype == SSB_BUSTYPE_PCI) {
110 memset(out, 0, sizeof(struct ssb_sprom));
111 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
112 bus->host_pci->bus->number + 1,
113 PCI_SLOT(bus->host_pci->devfn));
114 bcm47xx_fill_sprom(out, prefix, false);
115 return 0;
116 } else {
117 printk(KERN_WARNING "bcm47xx: unable to fill SPROM for given bustype.\n");
118 return -EINVAL;
119 }
120}
121
122static int bcm47xx_get_invariants(struct ssb_bus *bus, 105static int bcm47xx_get_invariants(struct ssb_bus *bus,
123 struct ssb_init_invariants *iv) 106 struct ssb_init_invariants *iv)
124{ 107{
@@ -144,11 +127,6 @@ static void __init bcm47xx_register_ssb(void)
144 char buf[100]; 127 char buf[100];
145 struct ssb_mipscore *mcore; 128 struct ssb_mipscore *mcore;
146 129
147 err = ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb);
148 if (err)
149 printk(KERN_WARNING "bcm47xx: someone else already registered"
150 " a ssb SPROM callback handler (err %d)\n", err);
151
152 err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE, 130 err = ssb_bus_ssbbus_register(&(bcm47xx_bus.ssb), SSB_ENUM_BASE,
153 bcm47xx_get_invariants); 131 bcm47xx_get_invariants);
154 if (err) 132 if (err)
@@ -171,56 +149,21 @@ static void __init bcm47xx_register_ssb(void)
171#endif 149#endif
172 150
173#ifdef CONFIG_BCM47XX_BCMA 151#ifdef CONFIG_BCM47XX_BCMA
174static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
175{
176 char prefix[10];
177 struct bcma_device *core;
178
179 switch (bus->hosttype) {
180 case BCMA_HOSTTYPE_PCI:
181 memset(out, 0, sizeof(struct ssb_sprom));
182 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
183 bus->host_pci->bus->number + 1,
184 PCI_SLOT(bus->host_pci->devfn));
185 bcm47xx_fill_sprom(out, prefix, false);
186 return 0;
187 case BCMA_HOSTTYPE_SOC:
188 memset(out, 0, sizeof(struct ssb_sprom));
189 core = bcma_find_core(bus, BCMA_CORE_80211);
190 if (core) {
191 snprintf(prefix, sizeof(prefix), "sb/%u/",
192 core->core_index);
193 bcm47xx_fill_sprom(out, prefix, true);
194 } else {
195 bcm47xx_fill_sprom(out, NULL, false);
196 }
197 return 0;
198 default:
199 pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
200 return -EINVAL;
201 }
202}
203
204static void __init bcm47xx_register_bcma(void) 152static void __init bcm47xx_register_bcma(void)
205{ 153{
206 int err; 154 int err;
207 155
208 err = bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma);
209 if (err)
210 pr_warn("bcm47xx: someone else already registered a bcma SPROM callback handler (err %d)\n", err);
211
212 err = bcma_host_soc_register(&bcm47xx_bus.bcma); 156 err = bcma_host_soc_register(&bcm47xx_bus.bcma);
213 if (err) 157 if (err)
214 panic("Failed to register BCMA bus (err %d)", err); 158 panic("Failed to register BCMA bus (err %d)", err);
215
216 err = bcma_host_soc_init(&bcm47xx_bus.bcma);
217 if (err)
218 panic("Failed to initialize BCMA bus (err %d)", err);
219
220 bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
221} 159}
222#endif 160#endif
223 161
162/*
163 * Memory setup is done in the early part of MIPS's arch_mem_init. It's supposed
164 * to detect memory and record it with add_memory_region.
165 * Any extra initializaion performed here must not use kmalloc or bootmem.
166 */
224void __init plat_mem_setup(void) 167void __init plat_mem_setup(void)
225{ 168{
226 struct cpuinfo_mips *c = &current_cpu_data; 169 struct cpuinfo_mips *c = &current_cpu_data;
@@ -229,6 +172,7 @@ void __init plat_mem_setup(void)
229 printk(KERN_INFO "bcm47xx: using bcma bus\n"); 172 printk(KERN_INFO "bcm47xx: using bcma bus\n");
230#ifdef CONFIG_BCM47XX_BCMA 173#ifdef CONFIG_BCM47XX_BCMA
231 bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; 174 bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
175 bcm47xx_sprom_register_fallbacks();
232 bcm47xx_register_bcma(); 176 bcm47xx_register_bcma();
233 bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id); 177 bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
234#ifdef CONFIG_HIGHMEM 178#ifdef CONFIG_HIGHMEM
@@ -239,6 +183,7 @@ void __init plat_mem_setup(void)
239 printk(KERN_INFO "bcm47xx: using ssb bus\n"); 183 printk(KERN_INFO "bcm47xx: using ssb bus\n");
240#ifdef CONFIG_BCM47XX_SSB 184#ifdef CONFIG_BCM47XX_SSB
241 bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; 185 bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
186 bcm47xx_sprom_register_fallbacks();
242 bcm47xx_register_ssb(); 187 bcm47xx_register_ssb();
243 bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id); 188 bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id);
244#endif 189#endif
@@ -247,6 +192,28 @@ void __init plat_mem_setup(void)
247 _machine_restart = bcm47xx_machine_restart; 192 _machine_restart = bcm47xx_machine_restart;
248 _machine_halt = bcm47xx_machine_halt; 193 _machine_halt = bcm47xx_machine_halt;
249 pm_power_off = bcm47xx_machine_halt; 194 pm_power_off = bcm47xx_machine_halt;
195}
196
197/*
198 * This finishes bus initialization doing things that were not possible without
199 * kmalloc. Make sure to call it late enough (after mm_init).
200 */
201void __init bcm47xx_bus_setup(void)
202{
203#ifdef CONFIG_BCM47XX_BCMA
204 if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA) {
205 int err;
206
207 err = bcma_host_soc_init(&bcm47xx_bus.bcma);
208 if (err)
209 panic("Failed to initialize BCMA bus (err %d)", err);
210
211 bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo,
212 NULL);
213 }
214#endif
215
216 /* With bus initialized we can access NVRAM and detect the board */
250 bcm47xx_board_detect(); 217 bcm47xx_board_detect();
251 mips_set_machine_name(bcm47xx_board_get_name()); 218 mips_set_machine_name(bcm47xx_board_get_name());
252} 219}
diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c
index 41226b68de3d..2eff7fe99c6b 100644
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -136,6 +136,20 @@ static void nvram_read_leddc(const char *prefix, const char *name,
136 *leddc_off_time = (val >> 16) & 0xff; 136 *leddc_off_time = (val >> 16) & 0xff;
137} 137}
138 138
139static void bcm47xx_nvram_parse_macaddr(char *buf, u8 macaddr[6])
140{
141 if (strchr(buf, ':'))
142 sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0],
143 &macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4],
144 &macaddr[5]);
145 else if (strchr(buf, '-'))
146 sscanf(buf, "%hhx-%hhx-%hhx-%hhx-%hhx-%hhx", &macaddr[0],
147 &macaddr[1], &macaddr[2], &macaddr[3], &macaddr[4],
148 &macaddr[5]);
149 else
150 pr_warn("Can not parse mac address: %s\n", buf);
151}
152
139static void nvram_read_macaddr(const char *prefix, const char *name, 153static void nvram_read_macaddr(const char *prefix, const char *name,
140 u8 val[6], bool fallback) 154 u8 val[6], bool fallback)
141{ 155{
@@ -801,3 +815,71 @@ void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo,
801 nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0, true); 815 nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0, true);
802} 816}
803#endif 817#endif
818
819#if defined(CONFIG_BCM47XX_SSB)
820static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
821{
822 char prefix[10];
823
824 if (bus->bustype == SSB_BUSTYPE_PCI) {
825 memset(out, 0, sizeof(struct ssb_sprom));
826 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
827 bus->host_pci->bus->number + 1,
828 PCI_SLOT(bus->host_pci->devfn));
829 bcm47xx_fill_sprom(out, prefix, false);
830 return 0;
831 } else {
832 pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
833 return -EINVAL;
834 }
835}
836#endif
837
838#if defined(CONFIG_BCM47XX_BCMA)
839static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
840{
841 char prefix[10];
842 struct bcma_device *core;
843
844 switch (bus->hosttype) {
845 case BCMA_HOSTTYPE_PCI:
846 memset(out, 0, sizeof(struct ssb_sprom));
847 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
848 bus->host_pci->bus->number + 1,
849 PCI_SLOT(bus->host_pci->devfn));
850 bcm47xx_fill_sprom(out, prefix, false);
851 return 0;
852 case BCMA_HOSTTYPE_SOC:
853 memset(out, 0, sizeof(struct ssb_sprom));
854 core = bcma_find_core(bus, BCMA_CORE_80211);
855 if (core) {
856 snprintf(prefix, sizeof(prefix), "sb/%u/",
857 core->core_index);
858 bcm47xx_fill_sprom(out, prefix, true);
859 } else {
860 bcm47xx_fill_sprom(out, NULL, false);
861 }
862 return 0;
863 default:
864 pr_warn("bcm47xx: unable to fill SPROM for given bustype.\n");
865 return -EINVAL;
866 }
867}
868#endif
869
870/*
871 * On bcm47xx we need to register SPROM fallback handler very early, so we can't
872 * use anything like platform device / driver for this.
873 */
874void bcm47xx_sprom_register_fallbacks(void)
875{
876#if defined(CONFIG_BCM47XX_SSB)
877 if (ssb_arch_register_fallback_sprom(&bcm47xx_get_sprom_ssb))
878 pr_warn("Failed to registered ssb SPROM handler\n");
879#endif
880
881#if defined(CONFIG_BCM47XX_BCMA)
882 if (bcma_arch_register_fallback_sprom(&bcm47xx_get_sprom_bcma))
883 pr_warn("Failed to registered bcma SPROM handler\n");
884#endif
885}