From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- ...X-allow-building-support-for-more-than-on.patch | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 target/linux/brcm63xx/patches-3.18/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch (limited to 'target/linux/brcm63xx/patches-3.18/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch') diff --git a/target/linux/brcm63xx/patches-3.18/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch b/target/linux/brcm63xx/patches-3.18/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch new file mode 100644 index 0000000..c60f939 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.18/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch @@ -0,0 +1,95 @@ +From 0daf361ea799fba0af5a232036d0f06cea85ad24 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Sat, 21 Jun 2014 12:47:49 +0200 +Subject: [PATCH 42/44] MIPS: BCM63XX: allow building support for more than one + board type + +Use the arguments passed to the kernel to detect being booted with +CFE as the indicator for bcm963xx board support, allowing the +non presence of CFE_EPTSEAL to assume a different board type. + +Signed-off-by: Jonas Gorski +--- + arch/mips/bcm63xx/boards/Kconfig | 7 +++---- + arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +- + arch/mips/bcm63xx/boards/board_common.c | 13 +++++++++++++ + arch/mips/bcm63xx/boards/board_common.h | 6 ++++++ + 4 files changed, 23 insertions(+), 5 deletions(-) + +--- a/arch/mips/bcm63xx/boards/Kconfig ++++ b/arch/mips/bcm63xx/boards/Kconfig +@@ -1,11 +1,10 @@ +-choice +- prompt "Board support" ++menu "Board support" + depends on BCM63XX +- default BOARD_BCM963XX + + config BOARD_BCM963XX + bool "Generic Broadcom 963xx boards" + select SSB ++ default y + help + +-endchoice ++endmenu +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -706,7 +706,7 @@ static const struct board_info __initcon + /* + * early init callback, read nvram data from flash and checksum it + */ +-void __init board_prom_init(void) ++void __init board_bcm963xx_init(void) + { + unsigned int i; + u8 *boot_addr, *cfe; +--- a/arch/mips/bcm63xx/boards/board_common.c ++++ b/arch/mips/bcm63xx/boards/board_common.c +@@ -15,6 +15,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -32,6 +34,8 @@ + #include + #include + ++#include "board_common.h" ++ + #define PFX "board: " + + #define BCM963XX_KEYS_POLL_INTERVAL 20 +@@ -84,6 +88,15 @@ const char *board_get_name(void) + return board.name; + } + ++void __init board_prom_init(void) ++{ ++ /* detect bootloader */ ++ if (fw_arg3 == CFE_EPTSEAL) ++ board_bcm963xx_init(); ++ else ++ panic("unsupported bootloader detected"); ++} ++ + static int (*board_get_mac_address)(u8 mac[ETH_ALEN]); + + /* +--- a/arch/mips/bcm63xx/boards/board_common.h ++++ b/arch/mips/bcm63xx/boards/board_common.h +@@ -6,4 +6,10 @@ + void board_early_setup(const struct board_info *board, + int (*get_mac_address)(u8 mac[ETH_ALEN])); + ++#if defined(CONFIG_BOARD_BCM963XX) ++void board_bcm963xx_init(void); ++#else ++static inline void board_bcm963xx_init(void) { } ++#endif ++ + #endif /* __BOARD_COMMON_H */ -- cgit v1.2.3