X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/374bb82f67f49829cb443fe95a11d88c83675be4..bd215a1b5795a5f21b3181086aded22502fb624d:/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch diff --git a/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch b/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch index f63deacdd..495a0bff2 100644 --- a/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch +++ b/target/linux/brcm47xx/patches-2.6.37/033-bcm47xx-register-fallback-callback.patch @@ -1,6 +1,14 @@ --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c -@@ -23,7 +23,7 @@ +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2005 Broadcom Corporation + * Copyright (C) 2006 Felix Fietkau ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -23,7 +24,7 @@ static char nvram_buf[NVRAM_SPACE]; /* Probe for NVRAM header */ @@ -11,19 +19,27 @@ struct nvram_header *header; --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c -@@ -156,6 +156,22 @@ static void bcm47xx_fill_sprom(struct ss +@@ -3,6 +3,7 @@ + * Copyright (C) 2006 Felix Fietkau + * Copyright (C) 2006 Michael Buesch + * Copyright (C) 2010 Waldemar Brodkorb ++ * Copyright (C) 2010-2011 Hauke Mehrtens + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -156,6 +157,22 @@ static void bcm47xx_fill_sprom(struct ss } } -+int bcm47xx_get_sprom(struct ssb_bus *bus) ++int bcm47xx_get_sprom(struct ssb_bus *bus, struct ssb_sprom *out) +{ + char prefix[10]; + + if (bus->bustype == SSB_BUSTYPE_PCI) { -+ snprintf(prefix, sizeof(prefix), "pci/%x/%x/", ++ snprintf(prefix, sizeof(prefix), "pci/%u/%u/", + bus->host_pci->bus->number + 1, + PCI_SLOT(bus->host_pci->devfn)); -+ bcm47xx_fill_sprom(&bus->sprom, prefix); ++ bcm47xx_fill_sprom(out, prefix); + return 0; + } else { + printk(KERN_WARNING "bcm47xx: unable to fill SPROM for given bustype.\n"); @@ -34,7 +50,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus, struct ssb_init_invariants *iv) { -@@ -212,6 +228,11 @@ void __init plat_mem_setup(void) +@@ -212,6 +229,11 @@ void __init plat_mem_setup(void) char buf[100]; struct ssb_mipscore *mcore;