diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-10-13 02:04:37 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-10-13 02:04:37 +0000 |
commit | 769ee01960e4241017ab9f9f760fc51c1141bf90 (patch) | |
tree | f8ddc195e04df211113ec270e7871014d0516fed /target/linux/brcm47xx/files/arch/mips | |
parent | 6ea62735e2c27c0f2181dfcab6ddd97691cec4ff (diff) |
add patches for 2.6.23 on brcm47xx (not enabled yet)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9279 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/files/arch/mips')
-rw-r--r-- | target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c index f7687d4dd..106d8f54d 100644 --- a/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c +++ b/target/linux/brcm47xx/files/arch/mips/bcm947xx/setup.c @@ -31,6 +31,7 @@ #include <linux/serial.h> #include <linux/serial_core.h> #include <linux/serial_reg.h> +#include <linux/serial_8250.h> #include <asm/bootinfo.h> #include <asm/time.h> #include <asm/reboot.h> @@ -107,13 +108,27 @@ static void bcm47xx_fill_sprom_nvram(struct ssb_sprom *sprom) 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. */ |