summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-06-30 13:10:05 +0000
committerJonas Gorski <jogo@openwrt.org>2013-06-30 13:10:05 +0000
commit7d1cd9dfab5a76ca770e749047491dad57af8489 (patch)
tree187a65cdda283b160b34a444488f392951abc1c2 /target/linux
parent6df83c3f8934448ee4912fb6ff8ac600f7be40e6 (diff)
downloadmtk-20170518-7d1cd9dfab5a76ca770e749047491dad57af8489.zip
mtk-20170518-7d1cd9dfab5a76ca770e749047491dad57af8489.tar.gz
mtk-20170518-7d1cd9dfab5a76ca770e749047491dad57af8489.tar.bz2
bcm63xx: Improve CFE version mod patch.
Fix "cfe-" string length copy. Check if there's an extra byte a.b.c-d.e / a.b.c-d.e-f. Add support for Huawei CFE versions ("cfe-vd"). Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/3766/ Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 37101
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch30
-rw-r--r--target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch6
-rw-r--r--target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch2
-rw-r--r--target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch2
9 files changed, 33 insertions, 17 deletions
diff --git a/target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch b/target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch
index 0b4466f..50cb14b 100644
--- a/target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch
+++ b/target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch
@@ -1,11 +1,27 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -837,6 +837,8 @@ void __init board_prom_init(void)
- if (!memcmp(cfe, "cfe-v", 5))
- snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
- cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
-+ else if (!memcmp(cfe, "cfe-", 4))
-+ snprintf(cfe_version, 16, "%s", (char *) &cfe[4]);
- else
+@@ -834,10 +834,20 @@ void __init board_prom_init(void)
+
+ /* dump cfe version */
+ cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
+- if (!memcmp(cfe, "cfe-v", 5))
+- snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
+- cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
+- else
++ if (strstarts(cfe, "cfe-")) {
++ if(cfe[4] == 'v') {
++ if(cfe[5] == 'd')
++ snprintf(cfe_version, 11, "%s", (char *) &cfe[5]);
++ else if (cfe[10] > 0)
++ snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u-%u",
++ cfe[5], cfe[6], cfe[7], cfe[8], cfe[9], cfe[10]);
++ else
++ snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
++ cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
++ } else {
++ snprintf(cfe_version, 12, "%s", (char *) &cfe[4]);
++ }
++ } else
strcpy(cfe_version, "unknown");
printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
+
diff --git a/target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch
index 35feecd..bc7225a 100644
--- a/target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch
+++ b/target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -902,6 +902,8 @@ void __init board_prom_init(void)
+@@ -910,6 +910,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;
diff --git a/target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch b/target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
index 7cae6a9..7c0bd48 100644
--- a/target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
+++ b/target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ehci.h>
-@@ -995,6 +996,7 @@ int __init board_register_devices(void)
+@@ -1003,6 +1004,7 @@ int __init board_register_devices(void)
pr_err(PFX "failed to register fallback SPROM\n");
}
#endif
diff --git a/target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index a20e8b1..34c2ef9 100644
--- a/target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ b/target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -18,7 +18,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
#include <uapi/linux/bcm933xx_hcs.h>
#include <uapi/linux/bcm963xx_tag.h>
-@@ -950,6 +951,7 @@ int __init board_register_devices(void)
+@@ -958,6 +959,7 @@ int __init board_register_devices(void)
{
int button_count = 0;
int led_count = 0;
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
if (board.has_uart0)
bcm63xx_uart_register(0);
-@@ -988,7 +990,8 @@ int __init board_register_devices(void)
+@@ -996,7 +998,8 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
@@ -36,7 +36,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
if (ssb_arch_register_fallback_sprom(
-@@ -1034,5 +1037,9 @@ int __init board_register_devices(void)
+@@ -1042,5 +1045,9 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_keys_device);
}
diff --git a/target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index ccb8dc8..ac37b42 100644
--- a/target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1009,7 +1009,7 @@ int __init board_register_devices(void)
+@@ -1017,7 +1017,7 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);
diff --git a/target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch
index 64c51a4..9016d14 100644
--- a/target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch
@@ -39,7 +39,7 @@
return;
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1039,7 +1039,8 @@ int __init board_register_devices(void)
+@@ -1047,7 +1047,8 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
diff --git a/target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch
index e2a8ccd..6ef9d0f 100644
--- a/target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1040,7 +1040,7 @@ int __init board_register_devices(void)
+@@ -1048,7 +1048,7 @@ int __init board_register_devices(void)
/* register any fixups */
for (i = 0; i < board.has_caldata; i++)
pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
diff --git a/target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index b7f9b2f..1d1bff5 100644
--- a/target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ b/target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
#include <uapi/linux/bcm933xx_hcs.h>
#include <uapi/linux/bcm963xx_tag.h>
-@@ -1038,9 +1039,19 @@ int __init board_register_devices(void)
+@@ -1046,9 +1047,19 @@ int __init board_register_devices(void)
}
/* register any fixups */
diff --git a/target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch
index 4dc77ea..bc5bd3d 100644
--- a/target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch
+++ b/target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch
@@ -100,7 +100,7 @@ Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
};
/*
-@@ -2452,12 +2528,25 @@ void __init board_prom_init(void)
+@@ -2460,12 +2536,25 @@ void __init board_prom_init(void)
bcm63xx_pci_enabled = 1;
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;