743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. From 7d5af56418d7d01e43247a33b6fe6492ea871923 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Thu, 16 Sep 2021 14:03:54 +0200
  4. Subject: [PATCH] net: dsa: b53: Drop unused "cpu_port" field
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. It's set but never used anymore.
  9. Signed-off-by: Rafał Miłecki <[email protected]>
  10. Reviewed-by: Florian Fainelli <[email protected]>
  11. Tested-by: Florian Fainelli <[email protected]>
  12. Signed-off-by: Jakub Kicinski <[email protected]>
  13. ---
  14. drivers/net/dsa/b53/b53_common.c | 28 ----------------------------
  15. drivers/net/dsa/b53/b53_priv.h | 1 -
  16. 2 files changed, 29 deletions(-)
  17. --- a/drivers/net/dsa/b53/b53_common.c
  18. +++ b/drivers/net/dsa/b53/b53_common.c
  19. @@ -2286,7 +2286,6 @@ static const struct b53_chip_data b53_sw
  20. .arl_bins = 2,
  21. .arl_buckets = 1024,
  22. .imp_port = 5,
  23. - .cpu_port = B53_CPU_PORT_25,
  24. .duplex_reg = B53_DUPLEX_STAT_FE,
  25. },
  26. {
  27. @@ -2297,7 +2296,6 @@ static const struct b53_chip_data b53_sw
  28. .arl_bins = 2,
  29. .arl_buckets = 1024,
  30. .imp_port = 5,
  31. - .cpu_port = B53_CPU_PORT_25,
  32. .duplex_reg = B53_DUPLEX_STAT_FE,
  33. },
  34. {
  35. @@ -2308,7 +2306,6 @@ static const struct b53_chip_data b53_sw
  36. .arl_bins = 4,
  37. .arl_buckets = 1024,
  38. .imp_port = 8,
  39. - .cpu_port = B53_CPU_PORT,
  40. .vta_regs = B53_VTA_REGS,
  41. .duplex_reg = B53_DUPLEX_STAT_GE,
  42. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  43. @@ -2322,7 +2319,6 @@ static const struct b53_chip_data b53_sw
  44. .arl_bins = 4,
  45. .arl_buckets = 1024,
  46. .imp_port = 8,
  47. - .cpu_port = B53_CPU_PORT,
  48. .vta_regs = B53_VTA_REGS,
  49. .duplex_reg = B53_DUPLEX_STAT_GE,
  50. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  51. @@ -2336,7 +2332,6 @@ static const struct b53_chip_data b53_sw
  52. .arl_bins = 4,
  53. .arl_buckets = 1024,
  54. .imp_port = 8,
  55. - .cpu_port = B53_CPU_PORT,
  56. .vta_regs = B53_VTA_REGS_9798,
  57. .duplex_reg = B53_DUPLEX_STAT_GE,
  58. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  59. @@ -2350,7 +2345,6 @@ static const struct b53_chip_data b53_sw
  60. .arl_bins = 4,
  61. .arl_buckets = 1024,
  62. .imp_port = 8,
  63. - .cpu_port = B53_CPU_PORT,
  64. .vta_regs = B53_VTA_REGS_9798,
  65. .duplex_reg = B53_DUPLEX_STAT_GE,
  66. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  67. @@ -2365,7 +2359,6 @@ static const struct b53_chip_data b53_sw
  68. .arl_buckets = 1024,
  69. .vta_regs = B53_VTA_REGS,
  70. .imp_port = 8,
  71. - .cpu_port = B53_CPU_PORT,
  72. .duplex_reg = B53_DUPLEX_STAT_GE,
  73. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  74. .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
  75. @@ -2378,7 +2371,6 @@ static const struct b53_chip_data b53_sw
  76. .arl_bins = 4,
  77. .arl_buckets = 1024,
  78. .imp_port = 8,
  79. - .cpu_port = B53_CPU_PORT,
  80. .vta_regs = B53_VTA_REGS,
  81. .duplex_reg = B53_DUPLEX_STAT_GE,
  82. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  83. @@ -2392,7 +2384,6 @@ static const struct b53_chip_data b53_sw
  84. .arl_bins = 4,
  85. .arl_buckets = 1024,
  86. .imp_port = 8,
  87. - .cpu_port = B53_CPU_PORT,
  88. .vta_regs = B53_VTA_REGS,
  89. .duplex_reg = B53_DUPLEX_STAT_GE,
  90. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  91. @@ -2406,7 +2397,6 @@ static const struct b53_chip_data b53_sw
  92. .arl_bins = 4,
  93. .arl_buckets = 1024,
  94. .imp_port = 8,
  95. - .cpu_port = B53_CPU_PORT,
  96. .vta_regs = B53_VTA_REGS_63XX,
  97. .duplex_reg = B53_DUPLEX_STAT_63XX,
  98. .jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
  99. @@ -2420,7 +2410,6 @@ static const struct b53_chip_data b53_sw
  100. .arl_bins = 4,
  101. .arl_buckets = 1024,
  102. .imp_port = 8,
  103. - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
  104. .vta_regs = B53_VTA_REGS,
  105. .duplex_reg = B53_DUPLEX_STAT_GE,
  106. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  107. @@ -2434,7 +2423,6 @@ static const struct b53_chip_data b53_sw
  108. .arl_bins = 4,
  109. .arl_buckets = 1024,
  110. .imp_port = 8,
  111. - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
  112. .vta_regs = B53_VTA_REGS,
  113. .duplex_reg = B53_DUPLEX_STAT_GE,
  114. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  115. @@ -2448,7 +2436,6 @@ static const struct b53_chip_data b53_sw
  116. .arl_bins = 4,
  117. .arl_buckets = 1024,
  118. .imp_port = 8,
  119. - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
  120. .vta_regs = B53_VTA_REGS,
  121. .duplex_reg = B53_DUPLEX_STAT_GE,
  122. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  123. @@ -2462,7 +2449,6 @@ static const struct b53_chip_data b53_sw
  124. .arl_bins = 4,
  125. .arl_buckets = 1024,
  126. .imp_port = 8,
  127. - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
  128. .vta_regs = B53_VTA_REGS,
  129. .duplex_reg = B53_DUPLEX_STAT_GE,
  130. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  131. @@ -2476,7 +2462,6 @@ static const struct b53_chip_data b53_sw
  132. .arl_bins = 4,
  133. .arl_buckets = 1024,
  134. .imp_port = 8,
  135. - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
  136. .vta_regs = B53_VTA_REGS,
  137. .duplex_reg = B53_DUPLEX_STAT_GE,
  138. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  139. @@ -2490,7 +2475,6 @@ static const struct b53_chip_data b53_sw
  140. .arl_bins = 4,
  141. .arl_buckets = 1024,
  142. .imp_port = 8,
  143. - .cpu_port = B53_CPU_PORT,
  144. .vta_regs = B53_VTA_REGS,
  145. .duplex_reg = B53_DUPLEX_STAT_GE,
  146. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  147. @@ -2504,7 +2488,6 @@ static const struct b53_chip_data b53_sw
  148. .arl_bins = 4,
  149. .arl_buckets = 1024,
  150. .imp_port = 8,
  151. - .cpu_port = B53_CPU_PORT,
  152. .vta_regs = B53_VTA_REGS,
  153. .duplex_reg = B53_DUPLEX_STAT_GE,
  154. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  155. @@ -2518,7 +2501,6 @@ static const struct b53_chip_data b53_sw
  156. .arl_bins = 4,
  157. .arl_buckets = 1024,
  158. .imp_port = 8,
  159. - .cpu_port = B53_CPU_PORT,
  160. .vta_regs = B53_VTA_REGS,
  161. .duplex_reg = B53_DUPLEX_STAT_GE,
  162. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  163. @@ -2532,7 +2514,6 @@ static const struct b53_chip_data b53_sw
  164. .arl_bins = 4,
  165. .arl_buckets = 256,
  166. .imp_port = 8,
  167. - .cpu_port = B53_CPU_PORT,
  168. .vta_regs = B53_VTA_REGS,
  169. .duplex_reg = B53_DUPLEX_STAT_GE,
  170. .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
  171. @@ -2558,7 +2539,6 @@ static int b53_switch_init(struct b53_de
  172. dev->vta_regs[2] = chip->vta_regs[2];
  173. dev->jumbo_pm_reg = chip->jumbo_pm_reg;
  174. dev->imp_port = chip->imp_port;
  175. - dev->cpu_port = chip->cpu_port;
  176. dev->num_vlans = chip->vlans;
  177. dev->num_arl_bins = chip->arl_bins;
  178. dev->num_arl_buckets = chip->arl_buckets;
  179. @@ -2590,13 +2570,6 @@ static int b53_switch_init(struct b53_de
  180. break;
  181. #endif
  182. }
  183. - } else if (dev->chip_id == BCM53115_DEVICE_ID) {
  184. - u64 strap_value;
  185. -
  186. - b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value);
  187. - /* use second IMP port if GMII is enabled */
  188. - if (strap_value & SV_GMII_CTRL_115)
  189. - dev->cpu_port = 5;
  190. }
  191. dev->num_ports = fls(dev->enabled_ports);
  192. --- a/drivers/net/dsa/b53/b53_priv.h
  193. +++ b/drivers/net/dsa/b53/b53_priv.h
  194. @@ -123,7 +123,6 @@ struct b53_device {
  195. /* used ports mask */
  196. u16 enabled_ports;
  197. unsigned int imp_port;
  198. - unsigned int cpu_port;
  199. /* connect specific data */
  200. u8 current_page;