summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-09-06 16:27:37 +0000
commit56231056ea784f1cec6450f649b1adaed1f56366 (patch)
tree7b130d72d854cde2bcd3af8b11bd0f7be3dbff6a /target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch
parente1184aaa1a7a5e5eeef8e072bf0ea98c291be22a (diff)
downloadmtk-20170518-56231056ea784f1cec6450f649b1adaed1f56366.zip
mtk-20170518-56231056ea784f1cec6450f649b1adaed1f56366.tar.gz
mtk-20170518-56231056ea784f1cec6450f649b1adaed1f56366.tar.bz2
strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX_<ver>_<board> becomes CONFIG_TARGET_<board>, same for profiles.
SVN-Revision: 8653
Diffstat (limited to 'target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch')
-rw-r--r--target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch b/target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch
new file mode 100644
index 0000000..8e97364
--- /dev/null
+++ b/target/linux/brcm47xx/patches-2.6.22/230-ssb_arch_setup.patch
@@ -0,0 +1,33 @@
+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. */