OpenWrt – Blame information for rev 3
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From 83131acbfb59760a19f3711c09526e191c8aad54 Mon Sep 17 00:00:00 2001 |
2 | From: Jonas Gorski <jogo@openwrt.org> |
||
3 | Date: Tue, 29 Jul 2014 21:52:56 +0200 |
||
4 | Subject: [PATCH 03/10] MIPS: BCM63XX: make fallback sprom optional |
||
5 | |||
6 | Some devices do not provide enough mac addresses to populate wifi in |
||
7 | addition to ethernet. |
||
8 | |||
9 | Use having pci enabled as a rough heuristic which boards should have it |
||
10 | enabled. |
||
11 | |||
12 | Signed-off-by: Jonas Gorski <jogo@openwrt.org> |
||
13 | --- |
||
14 | arch/mips/bcm63xx/boards/board_bcm963xx.c | 12 ++++++++++++ |
||
15 | arch/mips/bcm63xx/boards/board_common.c | 5 +++-- |
||
16 | arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 1 + |
||
17 | 3 files changed, 16 insertions(+), 2 deletions(-) |
||
18 | |||
19 | --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c |
||
20 | +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c |
||
21 | @@ -70,6 +70,7 @@ static struct board_info __initdata boar |
||
22 | .has_uart0 = 1, |
||
23 | .has_pci = 1, |
||
24 | .has_usbd = 0, |
||
25 | + .use_fallback_sprom = 1, |
||
26 | |||
27 | .usbd = { |
||
28 | .use_fullspeed = 0, |
||
29 | @@ -219,6 +220,7 @@ static struct board_info __initdata boar |
||
30 | .has_uart0 = 1, |
||
31 | .has_enet0 = 1, |
||
32 | .has_pci = 1, |
||
33 | + .use_fallback_sprom = 1, |
||
34 | |||
35 | .enet0 = { |
||
36 | .has_phy = 1, |
||
37 | @@ -264,6 +266,7 @@ static struct board_info __initdata boar |
||
38 | .has_enet0 = 1, |
||
39 | .has_enet1 = 1, |
||
40 | .has_pci = 1, |
||
41 | + .use_fallback_sprom = 1, |
||
42 | |||
43 | .enet0 = { |
||
44 | .has_phy = 1, |
||
3 | office | 45 | @@ -324,6 +327,7 @@ static struct board_info __initdata boar |
1 | office | 46 | .has_enet0 = 1, |
47 | .has_enet1 = 1, |
||
48 | .has_pci = 1, |
||
49 | + .use_fallback_sprom = 1, |
||
50 | |||
51 | .enet0 = { |
||
52 | .has_phy = 1, |
||
3 | office | 53 | @@ -378,6 +382,7 @@ static struct board_info __initdata boar |
1 | office | 54 | .has_enet0 = 1, |
55 | .has_enet1 = 1, |
||
56 | .has_pci = 1, |
||
57 | + .use_fallback_sprom = 1, |
||
58 | |||
59 | .enet0 = { |
||
60 | .has_phy = 1, |
||
3 | office | 61 | @@ -436,6 +441,7 @@ static struct board_info __initdata boar |
1 | office | 62 | .has_enet0 = 1, |
63 | .has_enet1 = 1, |
||
64 | .has_pci = 1, |
||
65 | + .use_fallback_sprom = 1, |
||
66 | |||
67 | .enet0 = { |
||
68 | .has_phy = 1, |
||
3 | office | 69 | @@ -459,6 +465,7 @@ static struct board_info __initdata boar |
1 | office | 70 | .has_enet0 = 1, |
71 | .has_enet1 = 1, |
||
72 | .has_pci = 1, |
||
73 | + .use_fallback_sprom = 1, |
||
74 | |||
75 | .enet0 = { |
||
76 | .has_phy = 1, |
||
3 | office | 77 | @@ -477,6 +484,7 @@ static struct board_info __initdata boar |
1 | office | 78 | |
79 | .has_uart0 = 1, |
||
80 | .has_pci = 1, |
||
81 | + .use_fallback_sprom = 1, |
||
82 | .has_ohci0 = 1, |
||
83 | |||
84 | .has_enet0 = 1, |
||
3 | office | 85 | @@ -499,6 +507,7 @@ static struct board_info __initdata boar |
1 | office | 86 | .has_enet0 = 1, |
87 | .has_enet1 = 1, |
||
88 | .has_pci = 1, |
||
89 | + .use_fallback_sprom = 1, |
||
90 | |||
91 | .enet0 = { |
||
92 | .has_phy = 1, |
||
3 | office | 93 | @@ -525,6 +534,7 @@ static struct board_info __initdata boar |
1 | office | 94 | .has_enet0 = 1, |
95 | .has_enet1 = 1, |
||
96 | .has_pci = 1, |
||
97 | + .use_fallback_sprom = 1, |
||
98 | |||
99 | .enet0 = { |
||
100 | .has_phy = 1, |
||
3 | office | 101 | @@ -577,6 +587,7 @@ static struct board_info __initdata boar |
1 | office | 102 | .has_enet0 = 1, |
103 | .has_enet1 = 1, |
||
104 | .has_pci = 1, |
||
105 | + .use_fallback_sprom = 1, |
||
106 | |||
107 | .enet0 = { |
||
108 | .has_phy = 1, |
||
3 | office | 109 | @@ -648,6 +659,7 @@ static struct board_info __initdata boar |
1 | office | 110 | .has_enet0 = 1, |
111 | .has_enet1 = 1, |
||
112 | .has_pci = 1, |
||
113 | + .use_fallback_sprom = 1, |
||
114 | |||
115 | .enet0 = { |
||
116 | .has_phy = 1, |
||
117 | --- a/arch/mips/bcm63xx/boards/board_common.c |
||
118 | +++ b/arch/mips/bcm63xx/boards/board_common.c |
||
3 | office | 119 | @@ -187,8 +187,9 @@ int __init board_register_devices(void) |
1 | office | 120 | * do this after registering enet devices |
121 | */ |
||
122 | |||
123 | - if (board_get_mac_address(board.fallback_sprom.mac_addr) || |
||
124 | - bcm63xx_register_fallback_sprom(&board.fallback_sprom)) |
||
125 | + if (board.use_fallback_sprom && |
||
126 | + (board_get_mac_address(board.fallback_sprom.mac_addr) || |
||
127 | + bcm63xx_register_fallback_sprom(&board.fallback_sprom))) |
||
128 | pr_err(PFX "failed to register fallback SPROM\n"); |
||
129 | |||
130 | bcm63xx_spi_register(); |
||
131 | --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h |
||
132 | +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h |
||
3 | office | 133 | @@ -34,6 +34,7 @@ struct board_info { |
134 | unsigned int has_dsp:1; |
||
1 | office | 135 | unsigned int has_uart0:1; |
136 | unsigned int has_uart1:1; |
||
137 | + unsigned int use_fallback_sprom:1; |
||
138 | |||
139 | /* ethernet config */ |
||
140 | struct bcm63xx_enet_platform_data enet0; |