1 /* 2 * B53 common definitions 3 * 4 * Copyright (C) 2011-2013 Jonas Gorski <jogo@openwrt.org> 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef __B53_PRIV_H 20 #define __B53_PRIV_H 21 22 #include <linux/kernel.h> 23 #include <linux/mutex.h> 24 #include <linux/phylink.h> 25 #include <linux/etherdevice.h> 26 #include <linux/gpio/consumer.h> 27 #include <net/dsa.h> 28 29 #include "b53_regs.h" 30 31 struct b53_device; 32 struct net_device; 33 34 struct b53_io_ops { 35 int (*read8)(struct b53_device *dev, u8 page, u8 reg, u8 *value); 36 int (*read16)(struct b53_device *dev, u8 page, u8 reg, u16 *value); 37 int (*read32)(struct b53_device *dev, u8 page, u8 reg, u32 *value); 38 int (*read48)(struct b53_device *dev, u8 page, u8 reg, u64 *value); 39 int (*read64)(struct b53_device *dev, u8 page, u8 reg, u64 *value); 40 int (*write8)(struct b53_device *dev, u8 page, u8 reg, u8 value); 41 int (*write16)(struct b53_device *dev, u8 page, u8 reg, u16 value); 42 int (*write32)(struct b53_device *dev, u8 page, u8 reg, u32 value); 43 int (*write48)(struct b53_device *dev, u8 page, u8 reg, u64 value); 44 int (*write64)(struct b53_device *dev, u8 page, u8 reg, u64 value); 45 int (*phy_read16)(struct b53_device *dev, int addr, int reg, u16 *value); 46 int (*phy_write16)(struct b53_device *dev, int addr, int reg, u16 value); 47 int (*irq_enable)(struct b53_device *dev, int port); 48 void (*irq_disable)(struct b53_device *dev, int port); 49 void (*phy_enable)(struct b53_device *dev, int port); 50 void (*phy_disable)(struct b53_device *dev, int port); 51 void (*phylink_get_caps)(struct b53_device *dev, int port, 52 struct phylink_config *config); 53 struct phylink_pcs *(*phylink_mac_select_pcs)(struct b53_device *dev, 54 int port, 55 phy_interface_t interface); 56 u8 (*serdes_map_lane)(struct b53_device *dev, int port); 57 void (*serdes_link_set)(struct b53_device *dev, int port, 58 unsigned int mode, phy_interface_t interface, 59 bool link_up); 60 }; 61 62 struct b53_arl_entry; 63 64 struct b53_arl_ops { 65 void (*arl_read_entry)(struct b53_device *dev, 66 struct b53_arl_entry *ent, u8 idx); 67 void (*arl_write_entry)(struct b53_device *dev, 68 const struct b53_arl_entry *ent, u8 idx); 69 void (*arl_search_read)(struct b53_device *dev, u8 idx, 70 struct b53_arl_entry *ent); 71 }; 72 73 #define B53_INVALID_LANE 0xff 74 75 enum { 76 BCM4908_DEVICE_ID = 0x4908, 77 BCM5325_DEVICE_ID = 0x25, 78 BCM5365_DEVICE_ID = 0x65, 79 BCM5389_DEVICE_ID = 0x89, 80 BCM5395_DEVICE_ID = 0x95, 81 BCM5397_DEVICE_ID = 0x97, 82 BCM5398_DEVICE_ID = 0x98, 83 BCM53101_DEVICE_ID = 0x53101, 84 BCM53115_DEVICE_ID = 0x53115, 85 BCM53125_DEVICE_ID = 0x53125, 86 BCM53128_DEVICE_ID = 0x53128, 87 BCM63XX_DEVICE_ID = 0x6300, 88 BCM6318_DEVICE_ID = 0x6318, 89 BCM6328_DEVICE_ID = 0x6328, 90 BCM6362_DEVICE_ID = 0x6362, 91 BCM6368_DEVICE_ID = 0x6368, 92 BCM63268_DEVICE_ID = 0x63268, 93 BCM53010_DEVICE_ID = 0x53010, 94 BCM53011_DEVICE_ID = 0x53011, 95 BCM53012_DEVICE_ID = 0x53012, 96 BCM53018_DEVICE_ID = 0x53018, 97 BCM53019_DEVICE_ID = 0x53019, 98 BCM58XX_DEVICE_ID = 0x5800, 99 BCM583XX_DEVICE_ID = 0x58300, 100 BCM7445_DEVICE_ID = 0x7445, 101 BCM7278_DEVICE_ID = 0x7278, 102 BCM53134_DEVICE_ID = 0x5075, 103 }; 104 105 enum b53_variant_id { 106 B53_VARIANT_NONE = 0, 107 B53_VARIANT_5325E, 108 B53_VARIANT_5325M, 109 }; 110 111 struct b53_pcs { 112 struct phylink_pcs pcs; 113 struct b53_device *dev; 114 u8 lane; 115 }; 116 117 #define B53_N_PORTS 9 118 #define B53_N_PORTS_25 6 119 #define B53_N_PCS 2 120 121 struct b53_port { 122 /* References to each egress/ingress mirror source mask bit. */ 123 unsigned int mirror_count[2]; 124 u16 vlan_ctl_mask; 125 u16 pvid; 126 struct ethtool_keee eee; 127 }; 128 129 struct b53_vlan { 130 u16 members; 131 u16 untag; 132 bool valid; 133 }; 134 135 struct b53_device { 136 struct dsa_switch *ds; 137 struct b53_platform_data *pdata; 138 const char *name; 139 140 struct mutex reg_mutex; 141 struct mutex stats_mutex; 142 struct mutex arl_mutex; 143 const struct b53_io_ops *ops; 144 const struct b53_arl_ops *arl_ops; 145 146 /* chip specific data */ 147 u32 chip_id; 148 enum b53_variant_id variant_id; 149 u8 core_rev; 150 u8 vta_regs[3]; 151 u8 duplex_reg; 152 u8 jumbo_pm_reg; 153 u8 jumbo_size_reg; 154 struct gpio_desc *reset_gpio; 155 u8 num_arl_bins; 156 u16 num_arl_buckets; 157 enum dsa_tag_protocol tag_protocol; 158 159 /* used ports mask */ 160 u16 enabled_ports; 161 unsigned int imp_port; 162 163 /* connect specific data */ 164 u8 current_page; 165 struct device *dev; 166 u8 serdes_lane; 167 168 /* Master MDIO bus we got probed from */ 169 struct mii_bus *bus; 170 171 void *priv; 172 173 /* run time configuration */ 174 bool enable_jumbo; 175 unsigned int mirror_port; 176 177 unsigned int num_vlans; 178 struct b53_vlan *vlans; 179 bool vlan_enabled; 180 bool vlan_filtering; 181 unsigned int num_ports; 182 struct b53_port *ports; 183 184 struct b53_pcs pcs[B53_N_PCS]; 185 }; 186 187 #define b53_for_each_port(dev, i) \ 188 for (i = 0; i < B53_N_PORTS; i++) \ 189 if (dev->enabled_ports & BIT(i)) 190 191 192 static inline int is5325(struct b53_device *dev) 193 { 194 return dev->chip_id == BCM5325_DEVICE_ID; 195 } 196 197 static inline int is5325e(struct b53_device *dev) 198 { 199 return is5325(dev) && 200 dev->variant_id == B53_VARIANT_5325E; 201 } 202 203 static inline int is5325m(struct b53_device *dev) 204 { 205 return is5325(dev) && 206 dev->variant_id == B53_VARIANT_5325M; 207 } 208 209 static inline int is5365(struct b53_device *dev) 210 { 211 #ifdef CONFIG_BCM47XX 212 return dev->chip_id == BCM5365_DEVICE_ID; 213 #else 214 return 0; 215 #endif 216 } 217 218 static inline int is5397_98(struct b53_device *dev) 219 { 220 return dev->chip_id == BCM5397_DEVICE_ID || 221 dev->chip_id == BCM5398_DEVICE_ID; 222 } 223 224 static inline int is539x(struct b53_device *dev) 225 { 226 return dev->chip_id == BCM5395_DEVICE_ID || 227 dev->chip_id == BCM5397_DEVICE_ID || 228 dev->chip_id == BCM5398_DEVICE_ID; 229 } 230 231 static inline int is531x5(struct b53_device *dev) 232 { 233 return dev->chip_id == BCM53115_DEVICE_ID || 234 dev->chip_id == BCM53125_DEVICE_ID || 235 dev->chip_id == BCM53101_DEVICE_ID || 236 dev->chip_id == BCM53128_DEVICE_ID || 237 dev->chip_id == BCM53134_DEVICE_ID; 238 } 239 240 static inline int is63xx(struct b53_device *dev) 241 { 242 return dev->chip_id == BCM63XX_DEVICE_ID || 243 dev->chip_id == BCM6318_DEVICE_ID || 244 dev->chip_id == BCM6328_DEVICE_ID || 245 dev->chip_id == BCM6362_DEVICE_ID || 246 dev->chip_id == BCM6368_DEVICE_ID || 247 dev->chip_id == BCM63268_DEVICE_ID; 248 } 249 250 static inline int is6318_268(struct b53_device *dev) 251 { 252 return dev->chip_id == BCM6318_DEVICE_ID || 253 dev->chip_id == BCM63268_DEVICE_ID; 254 } 255 256 static inline int is5301x(struct b53_device *dev) 257 { 258 return dev->chip_id == BCM53010_DEVICE_ID || 259 dev->chip_id == BCM53011_DEVICE_ID || 260 dev->chip_id == BCM53012_DEVICE_ID || 261 dev->chip_id == BCM53018_DEVICE_ID || 262 dev->chip_id == BCM53019_DEVICE_ID; 263 } 264 265 static inline int is58xx(struct b53_device *dev) 266 { 267 return dev->chip_id == BCM58XX_DEVICE_ID || 268 dev->chip_id == BCM583XX_DEVICE_ID || 269 dev->chip_id == BCM7445_DEVICE_ID || 270 dev->chip_id == BCM7278_DEVICE_ID || 271 dev->chip_id == BCM53134_DEVICE_ID; 272 } 273 274 #define B53_63XX_RGMII0 4 275 #define B53_CPU_PORT_25 5 276 #define B53_CPU_PORT 8 277 278 static inline unsigned int b53_max_arl_entries(struct b53_device *dev) 279 { 280 return dev->num_arl_buckets * dev->num_arl_bins; 281 } 282 283 struct b53_device *b53_switch_alloc(struct device *base, 284 const struct b53_io_ops *ops, 285 void *priv); 286 287 int b53_switch_detect(struct b53_device *dev); 288 289 int b53_switch_register(struct b53_device *dev); 290 291 static inline void b53_switch_remove(struct b53_device *dev) 292 { 293 dsa_unregister_switch(dev->ds); 294 } 295 296 static inline void b53_switch_shutdown(struct b53_device *dev) 297 { 298 dsa_switch_shutdown(dev->ds); 299 } 300 301 #define b53_build_op(type_op_size, val_type) \ 302 static inline int b53_##type_op_size(struct b53_device *dev, u8 page, \ 303 u8 reg, val_type val) \ 304 { \ 305 int ret; \ 306 \ 307 mutex_lock(&dev->reg_mutex); \ 308 ret = dev->ops->type_op_size(dev, page, reg, val); \ 309 mutex_unlock(&dev->reg_mutex); \ 310 \ 311 return ret; \ 312 } 313 314 b53_build_op(read8, u8 *); 315 b53_build_op(read16, u16 *); 316 b53_build_op(read32, u32 *); 317 b53_build_op(read48, u64 *); 318 b53_build_op(read64, u64 *); 319 320 b53_build_op(write8, u8); 321 b53_build_op(write16, u16); 322 b53_build_op(write32, u32); 323 b53_build_op(write48, u64); 324 b53_build_op(write64, u64); 325 326 struct b53_arl_entry { 327 u16 port; 328 u8 mac[ETH_ALEN]; 329 u16 vid; 330 u8 is_valid:1; 331 u8 is_age:1; 332 u8 is_static:1; 333 }; 334 335 static inline void b53_arl_to_entry(struct b53_arl_entry *ent, 336 u64 mac_vid, u32 fwd_entry) 337 { 338 memset(ent, 0, sizeof(*ent)); 339 ent->port = fwd_entry & ARLTBL_DATA_PORT_ID_MASK; 340 ent->is_valid = !!(fwd_entry & ARLTBL_VALID); 341 ent->is_age = !!(fwd_entry & ARLTBL_AGE); 342 ent->is_static = !!(fwd_entry & ARLTBL_STATIC); 343 u64_to_ether_addr(mac_vid, ent->mac); 344 ent->vid = mac_vid >> ARLTBL_VID_S; 345 } 346 347 static inline void b53_arl_to_entry_25(struct b53_arl_entry *ent, 348 u64 mac_vid, u8 vid_entry) 349 { 350 memset(ent, 0, sizeof(*ent)); 351 ent->is_valid = !!(mac_vid & ARLTBL_VALID_25); 352 ent->is_age = !!(mac_vid & ARLTBL_AGE_25); 353 ent->is_static = !!(mac_vid & ARLTBL_STATIC_25); 354 u64_to_ether_addr(mac_vid, ent->mac); 355 ent->port = (mac_vid & ARLTBL_DATA_PORT_ID_MASK_25) >> 356 ARLTBL_DATA_PORT_ID_S_25; 357 if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT) 358 ent->port = B53_CPU_PORT_25; 359 ent->vid = vid_entry; 360 } 361 362 static inline void b53_arl_to_entry_89(struct b53_arl_entry *ent, 363 u64 mac_vid, u16 fwd_entry) 364 { 365 memset(ent, 0, sizeof(*ent)); 366 ent->port = fwd_entry & ARLTBL_DATA_PORT_ID_MASK_89; 367 ent->is_valid = !!(fwd_entry & ARLTBL_VALID_89); 368 ent->is_age = !!(fwd_entry & ARLTBL_AGE_89); 369 ent->is_static = !!(fwd_entry & ARLTBL_STATIC_89); 370 u64_to_ether_addr(mac_vid, ent->mac); 371 ent->vid = mac_vid >> ARLTBL_VID_S; 372 } 373 374 static inline void b53_arl_from_entry(u64 *mac_vid, u32 *fwd_entry, 375 const struct b53_arl_entry *ent) 376 { 377 *mac_vid = ether_addr_to_u64(ent->mac); 378 *mac_vid |= (u64)(ent->vid & ARLTBL_VID_MASK) << ARLTBL_VID_S; 379 *fwd_entry = ent->port & ARLTBL_DATA_PORT_ID_MASK; 380 if (ent->is_valid) 381 *fwd_entry |= ARLTBL_VALID; 382 if (ent->is_static) 383 *fwd_entry |= ARLTBL_STATIC; 384 if (ent->is_age) 385 *fwd_entry |= ARLTBL_AGE; 386 } 387 388 static inline void b53_arl_from_entry_25(u64 *mac_vid, u8 *vid_entry, 389 const struct b53_arl_entry *ent) 390 { 391 *mac_vid = ether_addr_to_u64(ent->mac); 392 if (is_unicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT_25) 393 *mac_vid |= (u64)B53_CPU_PORT << ARLTBL_DATA_PORT_ID_S_25; 394 else 395 *mac_vid |= ((u64)ent->port << ARLTBL_DATA_PORT_ID_S_25) & 396 ARLTBL_DATA_PORT_ID_MASK_25; 397 if (ent->is_valid) 398 *mac_vid |= ARLTBL_VALID_25; 399 if (ent->is_static) 400 *mac_vid |= ARLTBL_STATIC_25; 401 if (ent->is_age) 402 *mac_vid |= ARLTBL_AGE_25; 403 *vid_entry = ent->vid; 404 } 405 406 static inline void b53_arl_from_entry_89(u64 *mac_vid, u32 *fwd_entry, 407 const struct b53_arl_entry *ent) 408 { 409 *mac_vid = ether_addr_to_u64(ent->mac); 410 *mac_vid |= (u64)(ent->vid & ARLTBL_VID_MASK) << ARLTBL_VID_S; 411 *fwd_entry = ent->port & ARLTBL_DATA_PORT_ID_MASK_89; 412 if (ent->is_valid) 413 *fwd_entry |= ARLTBL_VALID_89; 414 if (ent->is_static) 415 *fwd_entry |= ARLTBL_STATIC_89; 416 if (ent->is_age) 417 *fwd_entry |= ARLTBL_AGE_89; 418 } 419 420 static inline void b53_arl_search_to_entry_25(struct b53_arl_entry *ent, 421 u64 mac_vid, u8 ext) 422 { 423 memset(ent, 0, sizeof(*ent)); 424 ent->is_valid = !!(mac_vid & ARLTBL_VALID_25); 425 ent->is_age = !!(mac_vid & ARLTBL_AGE_25); 426 ent->is_static = !!(mac_vid & ARLTBL_STATIC_25); 427 u64_to_ether_addr(mac_vid, ent->mac); 428 ent->vid = (mac_vid & ARL_SRCH_RSLT_VID_MASK_25) >> 429 ARL_SRCH_RSLT_VID_S_25; 430 ent->port = (mac_vid & ARL_SRCH_RSLT_PORT_ID_MASK_25) >> 431 ARL_SRCH_RSLT_PORT_ID_S_25; 432 if (is_multicast_ether_addr(ent->mac) && (ext & ARL_SRCH_RSLT_EXT_MC_MII)) 433 ent->port |= BIT(B53_CPU_PORT_25); 434 else if (!is_multicast_ether_addr(ent->mac) && ent->port == B53_CPU_PORT) 435 ent->port = B53_CPU_PORT_25; 436 } 437 438 static inline void b53_arl_search_to_entry_63xx(struct b53_arl_entry *ent, 439 u64 mac_vid, u16 fwd_entry) 440 { 441 memset(ent, 0, sizeof(*ent)); 442 u64_to_ether_addr(mac_vid, ent->mac); 443 ent->vid = mac_vid >> ARLTBL_VID_S; 444 445 ent->port = fwd_entry & ARL_SRST_PORT_ID_MASK_63XX; 446 ent->port >>= 1; 447 448 ent->is_age = !!(fwd_entry & ARL_SRST_AGE_63XX); 449 ent->is_static = !!(fwd_entry & ARL_SRST_STATIC_63XX); 450 ent->is_valid = 1; 451 } 452 453 static inline void b53_arl_read_entry(struct b53_device *dev, 454 struct b53_arl_entry *ent, u8 idx) 455 { 456 dev->arl_ops->arl_read_entry(dev, ent, idx); 457 } 458 459 static inline void b53_arl_write_entry(struct b53_device *dev, 460 const struct b53_arl_entry *ent, u8 idx) 461 { 462 dev->arl_ops->arl_write_entry(dev, ent, idx); 463 } 464 465 static inline void b53_arl_search_read(struct b53_device *dev, u8 idx, 466 struct b53_arl_entry *ent) 467 { 468 dev->arl_ops->arl_search_read(dev, idx, ent); 469 } 470 471 #ifdef CONFIG_BCM47XX 472 473 #include <linux/bcm47xx_nvram.h> 474 #include <linux/gpio/legacy.h> 475 #include <bcm47xx_board.h> 476 static inline struct gpio_desc *b53_switch_get_reset_gpio(struct b53_device *dev) 477 { 478 enum bcm47xx_board board = bcm47xx_board_get(); 479 int gpio, ret; 480 481 switch (board) { 482 case BCM47XX_BOARD_LINKSYS_WRT300NV11: 483 case BCM47XX_BOARD_LINKSYS_WRT310NV1: 484 gpio = 8; 485 break; 486 default: 487 gpio = bcm47xx_nvram_gpio_pin("robo_reset"); 488 } 489 490 if (!gpio_is_valid(gpio)) 491 return ERR_PTR(-EINVAL); 492 493 ret = devm_gpio_request_one(dev->dev, gpio, 494 GPIOF_OUT_INIT_HIGH, "robo_reset"); 495 if (ret) 496 return ERR_PTR(ret); 497 498 return gpio_to_desc(gpio); 499 } 500 #else 501 static inline struct gpio_desc *b53_switch_get_reset_gpio(struct b53_device *dev) 502 { 503 return ERR_PTR(-ENODEV); 504 } 505 #endif 506 507 /* Exported functions towards other drivers */ 508 void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port); 509 int b53_configure_vlan(struct dsa_switch *ds); 510 int b53_enable_mcast_snooping(struct b53_device *dev); 511 void b53_get_strings(struct dsa_switch *ds, int port, u32 stringset, 512 uint8_t *data); 513 void b53_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data); 514 int b53_get_sset_count(struct dsa_switch *ds, int port, int sset); 515 void b53_get_ethtool_phy_stats(struct dsa_switch *ds, int port, uint64_t *data); 516 int b53_set_ageing_time(struct dsa_switch *ds, unsigned int msecs); 517 int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge, 518 bool *tx_fwd_offload, struct netlink_ext_ack *extack); 519 void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge); 520 void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state); 521 void b53_br_fast_age(struct dsa_switch *ds, int port); 522 int b53_br_flags_pre(struct dsa_switch *ds, int port, 523 struct switchdev_brport_flags flags, 524 struct netlink_ext_ack *extack); 525 int b53_br_flags(struct dsa_switch *ds, int port, 526 struct switchdev_brport_flags flags, 527 struct netlink_ext_ack *extack); 528 int b53_setup_devlink_resources(struct dsa_switch *ds); 529 void b53_port_event(struct dsa_switch *ds, int port); 530 int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, 531 struct netlink_ext_ack *extack); 532 int b53_vlan_add(struct dsa_switch *ds, int port, 533 const struct switchdev_obj_port_vlan *vlan, 534 struct netlink_ext_ack *extack); 535 int b53_vlan_del(struct dsa_switch *ds, int port, 536 const struct switchdev_obj_port_vlan *vlan); 537 int b53_fdb_add(struct dsa_switch *ds, int port, 538 const unsigned char *addr, u16 vid, 539 struct dsa_db db); 540 int b53_fdb_del(struct dsa_switch *ds, int port, 541 const unsigned char *addr, u16 vid, 542 struct dsa_db db); 543 int b53_fdb_dump(struct dsa_switch *ds, int port, 544 dsa_fdb_dump_cb_t *cb, void *data); 545 int b53_mdb_add(struct dsa_switch *ds, int port, 546 const struct switchdev_obj_port_mdb *mdb, 547 struct dsa_db db); 548 int b53_mdb_del(struct dsa_switch *ds, int port, 549 const struct switchdev_obj_port_mdb *mdb, 550 struct dsa_db db); 551 int b53_mirror_init(struct dsa_switch *ds); 552 int b53_mirror_add(struct dsa_switch *ds, int port, 553 struct dsa_mall_mirror_tc_entry *mirror, bool ingress, 554 struct netlink_ext_ack *extack); 555 enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port, 556 enum dsa_tag_protocol mprot); 557 void b53_mirror_del(struct dsa_switch *ds, int port, 558 struct dsa_mall_mirror_tc_entry *mirror); 559 int b53_setup_port(struct dsa_switch *ds, int port); 560 int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy); 561 void b53_disable_port(struct dsa_switch *ds, int port); 562 void b53_brcm_hdr_setup(struct dsa_switch *ds, int port); 563 int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy); 564 bool b53_support_eee(struct dsa_switch *ds, int port); 565 int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e); 566 567 #endif 568