Detect alternative "cfe-" version bootloaders (found in 963281T_TEF board)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 32643
This commit is contained in:
Florian Fainelli 2012-07-06 22:10:37 +00:00
parent 1f2d5da887
commit bb1488e5e7
16 changed files with 48 additions and 22 deletions

View File

@ -0,0 +1,26 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -724,6 +724,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
strcpy(cfe_version, "unknown");
printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
--- a/drivers/mtd/bcm63xxpart.c
+++ b/drivers/mtd/bcm63xxpart.c
@@ -54,10 +54,10 @@ static int bcm63xx_detect_cfe(struct mtd
if (ret)
return ret;
- if (strncmp("cfe-v", buf, 5) == 0)
+ if (strncmp("cfe-", buf, 4) == 0)
return 0;
- /* very old CFE's do not have the cfe-v string, so check for magic */
+ /* very old CFE's do not have the cfe- string, so check for magic */
ret = mtd_read(master, BCM63XX_CFE_MAGIC_OFFSET, 8, &retlen,
(void *)buf);
buf[retlen] = 0;

View File

@ -53,7 +53,7 @@
};
static struct board_info __initdata board_FAST2404 = {
@@ -821,11 +846,23 @@ static struct platform_device bcm63xx_gp
@@ -823,11 +848,23 @@ static struct platform_device bcm63xx_gp
.dev.platform_data = &bcm63xx_led_data,
};
@ -77,7 +77,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
@@ -868,5 +905,16 @@ int __init board_register_devices(void)
@@ -870,5 +907,16 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -862,6 +862,7 @@ static struct platform_device bcm63xx_gp
@@ -864,6 +864,7 @@ static struct platform_device bcm63xx_gp
int __init board_register_devices(void)
{
int button_count = 0;
@ -8,7 +8,7 @@
if (board.has_uart0)
bcm63xx_uart_register(0);
@@ -900,7 +901,11 @@ int __init board_register_devices(void)
@@ -902,7 +903,11 @@ int __init board_register_devices(void)
bcm63xx_flash_register();

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -899,6 +899,9 @@ int __init board_register_devices(void)
@@ -901,6 +901,9 @@ int __init board_register_devices(void)
bcm63xx_spi_register();

View File

@ -8,7 +8,7 @@
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
@@ -902,6 +903,9 @@ int __init board_register_devices(void)
@@ -904,6 +905,9 @@ int __init board_register_devices(void)
if (board.num_devs)
platform_add_devices(board.devs, board.num_devs);

View File

@ -47,7 +47,7 @@
/*
* early init callback, read nvram data from flash and checksum it
*/
@@ -771,6 +798,11 @@ void __init board_prom_init(void)
@@ -773,6 +800,11 @@ void __init board_prom_init(void)
return;
}

View File

@ -66,7 +66,7 @@ Subject: [PATCH 24/63] MIPS: BCM63XX: register ohci device.
#include <board_bcm963xx.h>
#include <bcm_tag.h>
@@ -914,6 +915,9 @@ int __init board_register_devices(void)
@@ -916,6 +917,9 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);

View File

@ -49,7 +49,7 @@ Subject: [PATCH 26/63] MIPS: BCM63XX: register ehci device.
#include <board_bcm963xx.h>
#include <bcm_tag.h>
@@ -915,6 +916,9 @@ int __init board_register_devices(void)
@@ -917,6 +918,9 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);

View File

@ -1,6 +1,6 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -853,6 +853,8 @@ void __init board_prom_init(void)
@@ -855,6 +855,8 @@ void __init board_prom_init(void)
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G3_EXT_MII |
GPIO_MODE_6348_G0_EXT_MII;

View File

@ -13,7 +13,7 @@ Subject: [PATCH 31/63] bcm63xx_enet: add support for bcm6368 internal ethernet s
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -918,6 +918,10 @@ int __init board_register_devices(void)
@@ -920,6 +920,10 @@ int __init board_register_devices(void)
!board_get_mac_address(board.enet1.mac_addr))
bcm63xx_enet_register(1, &board.enet1);

View File

@ -35,7 +35,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_spi.h>
#include <bcm63xx_dev_usb_ohci.h>
@@ -943,6 +944,7 @@ int __init board_register_devices(void)
@@ -945,6 +946,7 @@ int __init board_register_devices(void)
pr_err(PFX "failed to register fallback SPROM\n");
}
#endif

View File

@ -125,7 +125,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
u32 val;
/* read base address of boot chip select (0)
@@ -784,32 +750,19 @@ void __init board_prom_init(void)
@@ -786,32 +752,19 @@ void __init board_prom_init(void)
strcpy(cfe_version, "unknown");
printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
@ -162,7 +162,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
continue;
/* copy, board desc array is marked initdata */
memcpy(&board, bcm963xx_boards[i], sizeof(board));
@@ -819,7 +772,7 @@ void __init board_prom_init(void)
@@ -821,7 +774,7 @@ void __init board_prom_init(void)
/* bail out if board is not found, will complain later */
if (!board.name[0]) {
char name[17];
@ -171,7 +171,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
name[16] = 0;
printk(KERN_ERR PFX "unknown bcm963xx board: %s\n",
name);
@@ -912,15 +865,15 @@ int __init board_register_devices(void)
@@ -914,15 +867,15 @@ int __init board_register_devices(void)
bcm63xx_pcmcia_register();
if (board.has_enet0 &&
@ -190,7 +190,7 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
bcm63xx_enetsw_register(&board.enetsw);
if (board.has_ehci0)
@@ -936,7 +889,7 @@ int __init board_register_devices(void)
@@ -938,7 +891,7 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST

View File

@ -18,7 +18,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
#define PFX "board_bcm963xx: "
@@ -854,6 +855,7 @@ int __init board_register_devices(void)
@@ -856,6 +857,7 @@ int __init board_register_devices(void)
{
int button_count = 0;
int led_count = 0;
@ -26,7 +26,7 @@ Subject: [PATCH 67/80] BCM63XX: allow providing fixup data in board data
if (board.has_uart0)
bcm63xx_uart_register(0);
@@ -889,7 +891,8 @@ int __init board_register_devices(void)
@@ -891,7 +893,8 @@ int __init board_register_devices(void)
* do this after registering enet devices
*/
#ifdef CONFIG_SSB_PCIHOST
@ -36,7 +36,7 @@ Subject: [PATCH 67/80] 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(
@@ -929,5 +932,9 @@ int __init board_register_devices(void)
@@ -931,5 +934,9 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_keys_device);
}

View File

@ -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
@@ -910,7 +910,7 @@ int __init board_register_devices(void)
@@ -912,7 +912,7 @@ int __init board_register_devices(void)
if (board.num_spis)
spi_register_board_info(board.spis, board.num_spis);

View File

@ -551,7 +551,7 @@
/*
* Register a sane SPROMv2 to make the on-board
* bcm4318 WLAN work
@@ -808,6 +1328,9 @@ void __init board_prom_init(void)
@@ -810,6 +1330,9 @@ void __init board_prom_init(void)
boardid_fixup(boot_addr);
}

View File

@ -102,7 +102,7 @@ Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
};
static void __init nb4_nvram_fixup(void)
@@ -2242,12 +2320,25 @@ void __init board_prom_init(void)
@@ -2244,12 +2322,25 @@ void __init board_prom_init(void)
bcm63xx_pci_enabled = 1;
if (BCMCPU_IS_6348())
val |= GPIO_MODE_6348_G2_PCI;