aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-06-18 12:55:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-07-01 09:10:53 -0400
commitd753601a2a5ff67bbc96ce6512a16305bfd293e7 (patch)
treec1c0b4822966bedbafe90df2876123085905e470 /arch/mips
parent7b9334215f53135fb9cbdf0b44833cbc8e7d57b2 (diff)
MIPS: BCM63XX: recognize Cable Modem firmware format
Add the firmware header format which is used by Broadcom Cable Modem SoCs such as the BCM3368 SoC. We export the bcm_hcs firmware format structure because it is used by user-land tools to create firmware images for these SoCs and will later be used by a corresponding MTD parser. Signed-off-by: Florian Fainelli <florian@openwrt.org> Cc: linux-mips@linux-mips.org Cc: cernekee@gmail.com Cc: jogo@openwrt.org Patchwork: https://patchwork.linux-mips.org/patch/5496/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm63xx/boards/board_bcm963xx.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index a9505c4867e8..46eabb9aff51 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -28,8 +28,12 @@
28#include <bcm63xx_dev_usb_usbd.h> 28#include <bcm63xx_dev_usb_usbd.h>
29#include <board_bcm963xx.h> 29#include <board_bcm963xx.h>
30 30
31#include <uapi/linux/bcm933xx_hcs.h>
32
31#define PFX "board_bcm963xx: " 33#define PFX "board_bcm963xx: "
32 34
35#define HCS_OFFSET_128K 0x20000
36
33static struct board_info board; 37static struct board_info board;
34 38
35/* 39/*
@@ -722,8 +726,9 @@ void __init board_prom_init(void)
722 unsigned int i; 726 unsigned int i;
723 u8 *boot_addr, *cfe; 727 u8 *boot_addr, *cfe;
724 char cfe_version[32]; 728 char cfe_version[32];
725 char *board_name; 729 char *board_name = NULL;
726 u32 val; 730 u32 val;
731 struct bcm_hcs *hcs;
727 732
728 /* read base address of boot chip select (0) 733 /* read base address of boot chip select (0)
729 * 6328/6362 do not have MPI but boot from a fixed address 734 * 6328/6362 do not have MPI but boot from a fixed address
@@ -747,7 +752,12 @@ void __init board_prom_init(void)
747 752
748 bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET); 753 bcm63xx_nvram_init(boot_addr + BCM963XX_NVRAM_OFFSET);
749 754
750 board_name = bcm63xx_nvram_get_name(); 755 if (BCMCPU_IS_3368()) {
756 hcs = (struct bcm_hcs *)boot_addr;
757 board_name = hcs->filename;
758 } else {
759 board_name = bcm63xx_nvram_get_name();
760 }
751 /* find board by name */ 761 /* find board by name */
752 for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) { 762 for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
753 if (strncmp(board_name, bcm963xx_boards[i]->name, 16)) 763 if (strncmp(board_name, bcm963xx_boards[i]->name, 16))