diff options
| -rw-r--r-- | arch/mips/bcm63xx/boards/board_bcm963xx.c | 14 | ||||
| -rw-r--r-- | include/uapi/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/bcm933xx_hcs.h | 24 |
3 files changed, 37 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 | |||
| 33 | static struct board_info board; | 37 | static 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)) |
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index ab5d4992e568..ba1c11ab0d11 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -62,6 +62,7 @@ header-y += auxvec.h | |||
| 62 | header-y += ax25.h | 62 | header-y += ax25.h |
| 63 | header-y += b1lli.h | 63 | header-y += b1lli.h |
| 64 | header-y += baycom.h | 64 | header-y += baycom.h |
| 65 | header-y += bcm933xx_hcs.h | ||
| 65 | header-y += bfs_fs.h | 66 | header-y += bfs_fs.h |
| 66 | header-y += binfmts.h | 67 | header-y += binfmts.h |
| 67 | header-y += blkpg.h | 68 | header-y += blkpg.h |
diff --git a/include/uapi/linux/bcm933xx_hcs.h b/include/uapi/linux/bcm933xx_hcs.h new file mode 100644 index 000000000000..d22821831549 --- /dev/null +++ b/include/uapi/linux/bcm933xx_hcs.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Broadcom Cable Modem firmware format | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef __BCM933XX_HCS_H | ||
| 6 | #define __BCM933XX_HCS_H | ||
| 7 | |||
| 8 | #include <linux/types.h> | ||
| 9 | |||
| 10 | struct bcm_hcs { | ||
| 11 | __u16 magic; | ||
| 12 | __u16 control; | ||
| 13 | __u16 rev_maj; | ||
| 14 | __u16 rev_min; | ||
| 15 | __u32 build_date; | ||
| 16 | __u32 filelen; | ||
| 17 | __u32 ldaddress; | ||
| 18 | char filename[64]; | ||
| 19 | __u16 hcs; | ||
| 20 | __u16 her_znaet_chto; | ||
| 21 | __u32 crc; | ||
| 22 | }; | ||
| 23 | |||
| 24 | #endif /* __BCM933XX_HCS */ | ||
