Fix "cfe-" string length copy.
Add last byte on "cfe-v" versions 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 <[email protected]> --- V4: Split patch into version print and detection. diff --git a/target/linux/brcm63xx/patches-3.8/309-cfe_version_mod.patch b/target/linux/brcm63xx/patches-3.8/309-cfe_version_mod.patch index f350d21..58dd9d5 100644 --- a/target/linux/brcm63xx/patches-3.8/309-cfe_version_mod.patch +++ b/target/linux/brcm63xx/patches-3.8/309-cfe_version_mod.patch @@ -1,11 +1,19 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -798,6 +798,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]); +@@ -795,9 +795,13 @@ 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]); ++ if (!memcmp(cfe, "cfe-vd", 6)) ++ snprintf(cfe_version, 11, "%s", (char *) &cfe[5]); ++ else if (!memcmp(cfe, "cfe-v", 5)) ++ 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 if (!memcmp(cfe, "cfe-", 4)) -+ snprintf(cfe_version, 16, "%s", (char *) &cfe[4]); ++ 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.8/403-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-3.8/403-6358-enet1-external-mii-clk.patch index 4ead53f..0b0a004 100644 --- a/target/linux/brcm63xx/patches-3.8/403-6358-enet1-external-mii-clk.patch +++ b/target/linux/brcm63xx/patches-3.8/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 -@@ -859,6 +859,8 @@ void __init board_prom_init(void) +@@ -861,6 +861,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.8/407-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch b/target/linux/brcm63xx/patches-3.8/407-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch index c9abd0a..4a6a50b 100644 --- a/target/linux/brcm63xx/patches-3.8/407-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch +++ b/target/linux/brcm63xx/patches-3.8/407-bcm63xx_enet-add-support-for-bcm6368-internal-ethern.patch @@ -17,7 +17,7 @@ Signed-off-by: Jonas Gorski <[email protected]> --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -924,6 +924,10 @@ int __init board_register_devices(void) +@@ -926,6 +926,10 @@ int __init board_register_devices(void) !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr)) bcm63xx_enet_register(1, &board.enet1); diff --git a/target/linux/brcm63xx/patches-3.8/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch b/target/linux/brcm63xx/patches-3.8/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch index 48774a3..71e7275 100644 --- a/target/linux/brcm63xx/patches-3.8/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch +++ b/target/linux/brcm63xx/patches-3.8/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch @@ -37,7 +37,7 @@ Signed-off-by: Jonas Gorski <[email protected]> #include <bcm63xx_dev_pcmcia.h> #include <bcm63xx_dev_spi.h> #include <bcm63xx_dev_usb_ehci.h> -@@ -952,6 +953,7 @@ int __init board_register_devices(void) +@@ -954,6 +955,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.8/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.8/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch index 06d0b1b..a37175d 100644 --- a/target/linux/brcm63xx/patches-3.8/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch +++ b/target/linux/brcm63xx/patches-3.8/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/bcm963xx_tag.h> -@@ -907,6 +908,7 @@ int __init board_register_devices(void) +@@ -909,6 +910,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); -@@ -945,7 +947,8 @@ int __init board_register_devices(void) +@@ -947,7 +949,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( -@@ -987,5 +990,9 @@ int __init board_register_devices(void) +@@ -989,5 +992,9 @@ int __init board_register_devices(void) platform_device_register(&bcm63xx_gpio_keys_device); } diff --git a/target/linux/brcm63xx/patches-3.8/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch b/target/linux/brcm63xx/patches-3.8/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch index 70026f1..0b407c4 100644 --- a/target/linux/brcm63xx/patches-3.8/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch +++ b/target/linux/brcm63xx/patches-3.8/415-MIPS-BCM63XX-store-the-flash-type-in-global-variable.patch @@ -96,7 +96,7 @@ Subject: [PATCH 38/59] MIPS: BCM63XX: store the flash type in global variable case BCM63XX_FLASH_TYPE_PARALLEL: /* read base address of boot chip select (0) */ val = bcm_mpi_readl(MPI_CSBASE_REG(0)); -@@ -152,7 +165,7 @@ int __init bcm63xx_flash_register(void) +@@ -154,7 +167,7 @@ int __init bcm63xx_flash_register(void) return -ENODEV; default: pr_err("flash detection failed for BCM%x: %d\n", diff --git a/target/linux/brcm63xx/patches-3.8/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.8/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch index 590ce83..2333404 100644 --- a/target/linux/brcm63xx/patches-3.8/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch +++ b/target/linux/brcm63xx/patches-3.8/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 -@@ -966,7 +966,7 @@ int __init board_register_devices(void) +@@ -968,7 +968,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.8/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.8/420-BCM63XX-add-endian-check-for-ath9k.patch index bdcb3e0..929de1a 100644 --- a/target/linux/brcm63xx/patches-3.8/420-BCM63XX-add-endian-check-for-ath9k.patch +++ b/target/linux/brcm63xx/patches-3.8/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 -@@ -992,7 +992,8 @@ int __init board_register_devices(void) +@@ -994,7 +994,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.8/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.8/421-BCM63XX-add-led-pin-for-ath9k.patch index 4f77179..a902fae 100644 --- a/target/linux/brcm63xx/patches-3.8/421-BCM63XX-add-led-pin-for-ath9k.patch +++ b/target/linux/brcm63xx/patches-3.8/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 -@@ -993,7 +993,7 @@ int __init board_register_devices(void) +@@ -995,7 +995,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.8/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.8/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch index 69d9223..ab20253 100644 --- a/target/linux/brcm63xx/patches-3.8/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch +++ b/target/linux/brcm63xx/patches-3.8/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/bcm963xx_tag.h> -@@ -991,9 +992,19 @@ int __init board_register_devices(void) +@@ -993,9 +994,19 @@ int __init board_register_devices(void) } /* register any fixups */ diff --git a/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch index c3b2c16..d5df5c3 100644 --- a/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch +++ b/target/linux/brcm63xx/patches-3.8/520-bcm63xx-add-support-for-96368MVWG-board.patch @@ -100,7 +100,7 @@ Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board. }; /* -@@ -2409,12 +2485,25 @@ void __init board_prom_init(void) +@@ -2411,12 +2487,25 @@ void __init board_prom_init(void) bcm63xx_pci_enabled = 1; if (BCMCPU_IS_6348()) val |= GPIO_MODE_6348_G2_PCI; _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
