diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-11-22 12:25:52 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-11-22 12:25:52 +0000 |
commit | 37c5bb66ffbb79036ae454caafa3572b00b6db11 (patch) | |
tree | 70b85f5abc54149ddaf466c78465e1a7e538df72 /target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch | |
parent | e2cc653b5c9e5df1b88bdeb62aeefff80dbf3ac7 (diff) | |
download | master-187ad058-37c5bb66ffbb79036ae454caafa3572b00b6db11.tar.gz master-187ad058-37c5bb66ffbb79036ae454caafa3572b00b6db11.tar.bz2 master-187ad058-37c5bb66ffbb79036ae454caafa3572b00b6db11.zip |
brcm63xx: move board compatible strings into a table
Move compatible strings from board structs into separate table. This
allows for several board compatibles to match to the same board in case
e.g. only the flash size / partitions differ.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43341 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch deleted file mode 100644 index 190f77a1b6..0000000000 --- a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch +++ /dev/null @@ -1,61 +0,0 @@ -From b9bc4eb19007fd35b57a10c4dfd442dd518ee345 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski <jogo@openwrt.org> -Date: Thu, 26 Jun 2014 12:51:00 +0200 -Subject: [PATCH 47/48] MIPS: BCM63XX: add support for matching the board_info - by dtb - -Allow using the passed dtb's compatible property to match board_info -structs instead of nvram's boardname field, which is not unique anyway. - -Signed-off-by: Jonas Gorski <jogo@openwrt.org> ---- - arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++-- - arch/mips/bcm63xx/boards/board_common.c | 13 +++++++++++++ - arch/mips/bcm63xx/boards/board_common.h | 3 +++ - 3 files changed, 18 insertions(+), 2 deletions(-) - ---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c -+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -785,9 +785,9 @@ void __init board_bcm963xx_init(void) - } else { - board_name = bcm63xx_nvram_get_name(); - } -- /* find board by name */ -+ /* find board by name/compat */ - for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) { -- if (strncmp(board_name, bcm963xx_boards[i]->name, 16)) -+ if (!board_is_compatible(bcm963xx_boards[i], board_name)) - continue; - /* copy, board desc array is marked initdata */ - board_early_setup(bcm963xx_boards[i], ---- a/arch/mips/bcm63xx/boards/board_common.c -+++ b/arch/mips/bcm63xx/boards/board_common.c -@@ -281,3 +281,16 @@ int __init board_register_devices(void) - - return 0; - } -+ -+int __init board_is_compatible(const struct board_info *board, -+ const char *board_name) -+{ -+#ifdef CONFIG_OF -+ if (initial_boot_params) { -+ unsigned long dt_root = of_get_flat_dt_root(); -+ -+ return of_flat_dt_is_compatible(dt_root, board->of_board_id); -+ } -+#endif -+ return !strncmp(board_name, board->name, 16); -+} ---- a/arch/mips/bcm63xx/boards/board_common.h -+++ b/arch/mips/bcm63xx/boards/board_common.h -@@ -6,6 +6,9 @@ - void board_early_setup(const struct board_info *board, - int (*get_mac_address)(u8 mac[ETH_ALEN])); - -+int board_is_compatible(const struct board_info *board, -+ const char *board_name); -+ - #if defined(CONFIG_BOARD_BCM963XX) - void board_bcm963xx_init(void); - #else |