1 From: Gabor Juhos <juhosg@freemail.hu>
2 Date: Sat, 2 Dec 2017 19:15:29 +0100
3 Subject: [PATCH] MIPS: ath79: fix board detection with newer RouterBOOT versions
5 Recent RouterBOOT version (at least version 3.41 on RB911G-5HPacD)
6 use "Board=" kernel parameter instead of "board=" to pass the board
7 name to the kernel. Due to this change the board detection code is
8 not working on the devices shipped with the new RouterBOOT version.
9 Because the kernel is unable to identify these boards they become
10 unusable despite that they are supported by the current code.
12 Update the prom_init code to convert the 'Board' kernel parameter to
13 'board'. After this change, the board detection works also with the
14 new RouterBOOT versions.
16 Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
18 --- a/arch/mips/ath79/prom.c
19 +++ b/arch/mips/ath79/prom.c
20 @@ -104,6 +104,7 @@ static int __init ath79_prom_init_myload
21 void __init prom_init(void)
26 if (ath79_prom_init_myloader())
28 @@ -137,6 +138,15 @@ void __init prom_init(void)
33 + * RouterBOOT uses "Board" kernel parameter instead of "board" since
34 + * version 3.41 (or so). Replace the first character of the parameter
35 + * to keep board detection working.
37 + c = strstr(arcs_cmdline, "Board=");
41 if (strstr(arcs_cmdline, "board=750Gr3") ||
42 strstr(arcs_cmdline, "board=750i") ||
43 strstr(arcs_cmdline, "board=750-hb") ||