diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-12-02 22:24:46 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-12-02 22:24:46 +0000 |
commit | e395433178224ff1e2a6053105d12936b46c7576 (patch) | |
tree | 6fd6e2bb8019d78d1b8a57d63516ebbe3cff47f6 /target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch | |
parent | 621677154f39f2e0b698a558b8b795db84a8e014 (diff) | |
download | master-31e0f0ae-e395433178224ff1e2a6053105d12936b46c7576.tar.gz master-31e0f0ae-e395433178224ff1e2a6053105d12936b46c7576.tar.bz2 master-31e0f0ae-e395433178224ff1e2a6053105d12936b46c7576.zip |
brcm63xx: add linux 4.4 support
Only netboot tested. Flash at your own risk.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 47702
Diffstat (limited to 'target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch b/target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch new file mode 100644 index 0000000000..0c4a9be47d --- /dev/null +++ b/target/linux/brcm63xx/patches-4.4/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch @@ -0,0 +1,66 @@ +From 1cece9f7aca1f0c193edce201f77a87008c5a405 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Tue, 29 Jul 2014 21:58:38 +0200 +Subject: [PATCH 04/10] MIPS: BCM63XX: allow different types of sprom + +Different chips require different sprom contents, so prepare for +supplying the appropriate sprom type. + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + arch/mips/bcm63xx/sprom.c | 13 ++++++++++++- + arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 5 +++++ + 2 files changed, 17 insertions(+), 1 deletion(-) + +--- a/arch/mips/bcm63xx/sprom.c ++++ b/arch/mips/bcm63xx/sprom.c +@@ -22,7 +22,7 @@ + * bcm4318 WLAN work + */ + #ifdef CONFIG_SSB_PCIHOST +-static struct ssb_sprom bcm63xx_sprom = { ++static __initconst struct ssb_sprom bcm63xx_default_sprom = { + .revision = 0x02, + .board_rev = 0x17, + .country_code = 0x0, +@@ -43,6 +43,8 @@ static struct ssb_sprom bcm63xx_sprom = + .boardflags_hi = 0x0000, + }; + ++static struct ssb_sprom bcm63xx_sprom; ++ + int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out) + { + if (bus->bustype == SSB_BUSTYPE_PCI) { +@@ -60,6 +62,15 @@ int __init bcm63xx_register_fallback_spr + int ret = 0; + + #ifdef CONFIG_SSB_PCIHOST ++ switch (data->type) { ++ case SPROM_DEFAULT: ++ memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom, ++ sizeof(bcm63xx_sprom)); ++ break; ++ default: ++ return -EINVAL; ++ } ++ + memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN); + memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN); + memcpy(bcm63xx_sprom.et1mac, 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 +@@ -3,8 +3,13 @@ + + #include <linux/if_ether.h> + ++enum sprom_type { ++ SPROM_DEFAULT, /* default fallback sprom */ ++}; ++ + struct fallback_sprom_data { + u8 mac_addr[ETH_ALEN]; ++ enum sprom_type type; + }; + + int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data); |