X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fbrcm63xx%2Fpatches-3.18%2F364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch;fp=target%2Flinux%2Fbrcm63xx%2Fpatches-3.18%2F364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch;h=0000000000000000000000000000000000000000;hp=74c2846d5fbe4d9fd02bc2ec801a2016f1100dd3;hb=9fdac9b579e6f5dc989e020990a065599434d134;hpb=9a2c2d63e8159543004a8a757ea97325a75e0bc4 diff --git a/target/linux/brcm63xx/patches-3.18/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch b/target/linux/brcm63xx/patches-3.18/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch deleted file mode 100644 index 74c2846d5f..0000000000 --- a/target/linux/brcm63xx/patches-3.18/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 8575548b08e33c9ff4fd540abec09dd177e33682 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Thu, 31 Jul 2014 19:12:33 +0200 -Subject: [PATCH 09/10] MIPS: BCM63XX: allow board files to provide sprom - fixups - -Allow board_info files to supply fixups for the base sproms to adapt -them to the actual used sprom contents in case they do not use the -default ones. - -Signed-off-by: Jonas Gorski ---- - arch/mips/bcm63xx/sprom.c | 14 +++++++++++++- - .../mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 ++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - ---- a/arch/mips/bcm63xx/sprom.c -+++ b/arch/mips/bcm63xx/sprom.c -@@ -883,6 +883,14 @@ static int sprom_extract(struct ssb_spro - return 0; - } - -+void sprom_apply_fixups(u16 *sprom, struct sprom_fixup *fixups, int n) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < n; i++) -+ sprom[fixups[i].offset] = fixups[i].value; -+} -+ - static __initdata u16 template_sprom[220]; - #endif - -@@ -961,8 +969,12 @@ int __init bcm63xx_register_fallback_spr - return -EINVAL; - } - -- if (size > 0) -+ if (size > 0) { -+ sprom_apply_fixups(template_sprom, data->board_fixups, -+ data->num_board_fixups); -+ - sprom_extract(&bcm63xx_sprom, template_sprom, size); -+ } - - memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); - memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); ---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h -@@ -21,9 +21,17 @@ enum sprom_type { - SPROM_BCM4331, - }; - -+struct sprom_fixup { -+ u16 offset; -+ u16 value; -+}; -+ - struct fallback_sprom_data { - u8 mac_addr[ETH_ALEN]; - enum sprom_type type; -+ -+ struct sprom_fixup *board_fixups; -+ unsigned int num_board_fixups; - }; - - int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data);