Commit 924859ac2313d116372eec9c879302977fb4eb38

Authored by York Sun
Committed by Andy Fleming
1 parent 615f0cba58

powerpc/t4240: Fix SerDes protocol arrays with const prefix

Protocols are constants. Fix arrays with const prefix.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>

Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff

arch/powerpc/cpu/mpc85xx/t4240_serdes.c
... ... @@ -31,7 +31,7 @@
31 31 u8 lanes[SRDS_MAX_LANES];
32 32 };
33 33  
34   -static struct serdes_config serdes1_cfg_tbl[] = {
  34 +static const struct serdes_config serdes1_cfg_tbl[] = {
35 35 /* SerDes 1 */
36 36 {1, {XAUI_FM1_MAC9, XAUI_FM1_MAC9,
37 37 XAUI_FM1_MAC9, XAUI_FM1_MAC9,
... ... @@ -66,7 +66,7 @@
66 66 NONE, NONE, QSGMII_FM1_A, NONE}},
67 67 {}
68 68 };
69   -static struct serdes_config serdes2_cfg_tbl[] = {
  69 +static const struct serdes_config serdes2_cfg_tbl[] = {
70 70 /* SerDes 2 */
71 71 {1, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
72 72 XAUI_FM2_MAC9, XAUI_FM2_MAC9,
... ... @@ -150,7 +150,7 @@
150 150 SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
151 151 {}
152 152 };
153   -static struct serdes_config serdes3_cfg_tbl[] = {
  153 +static const struct serdes_config serdes3_cfg_tbl[] = {
154 154 /* SerDes 3 */
155 155 {2, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1}},
156 156 {4, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2}},
... ... @@ -174,7 +174,7 @@
174 174 SRIO1, SRIO1, SRIO1, SRIO1}},
175 175 {}
176 176 };
177   -static struct serdes_config serdes4_cfg_tbl[] = {
  177 +static const struct serdes_config serdes4_cfg_tbl[] = {
178 178 /* SerDes 4 */
179 179 {2, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3}},
180 180 {4, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4}},
... ... @@ -187,7 +187,7 @@
187 187 {18, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, AURORA, AURORA}},
188 188 {}
189 189 };
190   -static struct serdes_config *serdes_cfg_tbl[] = {
  190 +static const struct serdes_config *serdes_cfg_tbl[] = {
191 191 serdes1_cfg_tbl,
192 192 serdes2_cfg_tbl,
193 193 serdes3_cfg_tbl,
... ... @@ -196,7 +196,7 @@
196 196  
197 197 enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
198 198 {
199   - struct serdes_config *ptr;
  199 + const struct serdes_config *ptr;
200 200  
201 201 if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
202 202 return 0;
... ... @@ -213,7 +213,7 @@
213 213 int is_serdes_prtcl_valid(int serdes, u32 prtcl)
214 214 {
215 215 int i;
216   - struct serdes_config *ptr;
  216 + const struct serdes_config *ptr;
217 217  
218 218 if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
219 219 return 0;