1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-12 17:21:30 +03:00
openwrt-xburst/target/linux/brcm47xx-2.6/patches-2.6.22/230-ssb_arch_setup.patch
noz 77c9f26cec Merge SSB driver from tree at bu3sch.de, pulled 24/6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7732 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-06-25 19:51:09 +00:00

34 lines
1.1 KiB
Diff

Index: linux-2.6.22-rc5/arch/mips/bcm947xx/setup.c
===================================================================
--- linux-2.6.22-rc5.orig/arch/mips/bcm947xx/setup.c 2007-06-24 19:51:21.000000000 +0100
+++ linux-2.6.22-rc5/arch/mips/bcm947xx/setup.c 2007-06-24 20:26:12.000000000 +0100
@@ -107,13 +107,27 @@
sprom->r1.et1phyaddr = simple_strtoul(s, NULL, 10);
}
+static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv)
+{
+ char *s;
+
+ // TODO
+ //iv->boardinfo.vendor =
+ if ((s = nvram_get("boardtype")))
+ iv->boardinfo.type = (u16)simple_strtoul(s, NULL, 0);
+ if ((s = nvram_get("boardrev")))
+ iv->boardinfo.rev = (u16)simple_strtoul(s, NULL, 0);
+ bcm47xx_fill_sprom(&iv->sprom);
+ return 0;
+}
+
void __init plat_mem_setup(void)
{
int i, err;
char *s;
struct ssb_mipscore *mcore;
- err = ssb_bus_ssbbus_register(&ssb, SSB_ENUM_BASE, bcm47xx_fill_sprom);
+ err = ssb_bus_ssbbus_register(&ssb, SSB_ENUM_BASE, bcm47xx_get_invariants);
if (err) {
const char *msg = "Failed to initialize SSB bus (err %d)\n";
cfe_printk(msg, err); /* Make sure the message gets out of the box. */