Changeset 37101


Ignore:
Timestamp:
2013-06-30T15:10:05+02:00 (5 years ago)
Author:
jogo
Message:

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@…>
Patchwork: http://patchwork.openwrt.org/patch/3766/
Signed-off-by: Jonas Gorski <jogo@…>

Location:
trunk/target/linux/brcm63xx/patches-3.9
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm63xx/patches-3.9/309-cfe_version_mod.patch

    r37098 r37101  
    11--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    22+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    3 @@ -837,6 +837,8 @@ void __init board_prom_init(void) 
    4         if (!memcmp(cfe, "cfe-v", 5)) 
    5                 snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u", 
    6                          cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]); 
    7 +       else if (!memcmp(cfe, "cfe-", 4)) 
    8 +               snprintf(cfe_version, 16, "%s", (char *) &cfe[4]); 
    9         else 
     3@@ -834,10 +834,20 @@ void __init board_prom_init(void) 
     4  
     5        /* dump cfe version */ 
     6        cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET; 
     7-       if (!memcmp(cfe, "cfe-v", 5)) 
     8-               snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u", 
     9-                        cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]); 
     10-       else 
     11+       if (strstarts(cfe, "cfe-")) { 
     12+               if(cfe[4] == 'v') { 
     13+                       if(cfe[5] == 'd') 
     14+                               snprintf(cfe_version, 11, "%s", (char *) &cfe[5]); 
     15+                       else if (cfe[10] > 0) 
     16+                               snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u-%u", 
     17+                                        cfe[5], cfe[6], cfe[7], cfe[8], cfe[9], cfe[10]); 
     18+                       else 
     19+                               snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u", 
     20+                                        cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]); 
     21+               } else { 
     22+                       snprintf(cfe_version, 12, "%s", (char *) &cfe[4]); 
     23+               } 
     24+       } else 
    1025                strcpy(cfe_version, "unknown"); 
    1126        printk(KERN_INFO PFX "CFE version: %s\n", cfe_version); 
     27  
  • trunk/target/linux/brcm63xx/patches-3.9/403-6358-enet1-external-mii-clk.patch

    r37098 r37101  
    11--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    22+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    3 @@ -902,6 +902,8 @@ void __init board_prom_init(void) 
     3@@ -910,6 +910,8 @@ void __init board_prom_init(void) 
    44                if (BCMCPU_IS_6348()) 
    55                        val |= GPIO_MODE_6348_G3_EXT_MII | 
  • trunk/target/linux/brcm63xx/patches-3.9/409-MIPS-BCM63XX-add-HS-SPI-platform-device-and-register.patch

    r37098 r37101  
    3838 #include <bcm63xx_dev_spi.h> 
    3939 #include <bcm63xx_dev_usb_ehci.h> 
    40 @@ -995,6 +996,7 @@ int __init board_register_devices(void) 
     40@@ -1003,6 +1004,7 @@ int __init board_register_devices(void) 
    4141                        pr_err(PFX "failed to register fallback SPROM\n"); 
    4242        } 
  • trunk/target/linux/brcm63xx/patches-3.9/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch

    r37098 r37101  
    1919 #include <uapi/linux/bcm933xx_hcs.h> 
    2020 #include <uapi/linux/bcm963xx_tag.h> 
    21 @@ -950,6 +951,7 @@ int __init board_register_devices(void) 
     21@@ -958,6 +959,7 @@ int __init board_register_devices(void) 
    2222 { 
    2323        int button_count = 0; 
     
    2727        if (board.has_uart0) 
    2828                bcm63xx_uart_register(0); 
    29 @@ -988,7 +990,8 @@ int __init board_register_devices(void) 
     29@@ -996,7 +998,8 @@ int __init board_register_devices(void) 
    3030         * do this after registering enet devices 
    3131         */ 
     
    3737                memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN); 
    3838                if (ssb_arch_register_fallback_sprom( 
    39 @@ -1034,5 +1037,9 @@ int __init board_register_devices(void) 
     39@@ -1042,5 +1045,9 @@ int __init board_register_devices(void) 
    4040                platform_device_register(&bcm63xx_gpio_keys_device); 
    4141        } 
  • trunk/target/linux/brcm63xx/patches-3.9/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch

    r37098 r37101  
    1212--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    1313+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    14 @@ -1009,7 +1009,7 @@ int __init board_register_devices(void) 
     14@@ -1017,7 +1017,7 @@ int __init board_register_devices(void) 
    1515        if (board.num_spis) 
    1616                spi_register_board_info(board.spis, board.num_spis); 
  • trunk/target/linux/brcm63xx/patches-3.9/420-BCM63XX-add-endian-check-for-ath9k.patch

    r37098 r37101  
    4040--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    4141+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    42 @@ -1039,7 +1039,8 @@ int __init board_register_devices(void) 
     42@@ -1047,7 +1047,8 @@ int __init board_register_devices(void) 
    4343  
    4444        /* register any fixups */ 
  • trunk/target/linux/brcm63xx/patches-3.9/421-BCM63XX-add-led-pin-for-ath9k.patch

    r37098 r37101  
    11--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    22+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c 
    3 @@ -1040,7 +1040,7 @@ int __init board_register_devices(void) 
     3@@ -1048,7 +1048,7 @@ int __init board_register_devices(void) 
    44        /* register any fixups */ 
    55        for (i = 0; i < board.has_caldata; i++) 
  • trunk/target/linux/brcm63xx/patches-3.9/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch

    r37098 r37101  
    3737 #include <uapi/linux/bcm933xx_hcs.h> 
    3838 #include <uapi/linux/bcm963xx_tag.h> 
    39 @@ -1038,9 +1039,19 @@ int __init board_register_devices(void) 
     39@@ -1046,9 +1047,19 @@ int __init board_register_devices(void) 
    4040        } 
    4141  
  • trunk/target/linux/brcm63xx/patches-3.9/520-bcm63xx-add-support-for-96368MVWG-board.patch

    r37098 r37101  
    101101  
    102102 /* 
    103 @@ -2452,12 +2528,25 @@ void __init board_prom_init(void) 
     103@@ -2460,12 +2536,25 @@ void __init board_prom_init(void) 
    104104                bcm63xx_pci_enabled = 1; 
    105105                if (BCMCPU_IS_6348()) 
Note: See TracChangeset for help on using the changeset viewer.