Lines Matching full:cpsw

35 #include "am65-cpsw-nuss.h"
36 #include "am65-cpsw-switchdev.h"
159 "initializing am65 cpsw nuss version 0x%08X, cpsw version 0x%08X Ports: %u quirks:%08x\n", in am65_cpsw_nuss_get_ver()
2200 static int am65_cpsw_register_notifiers(struct am65_cpsw_common *cpsw) in am65_cpsw_register_notifiers() argument
2204 if (AM65_CPSW_IS_CPSW2G(cpsw) || in am65_cpsw_register_notifiers()
2208 cpsw->am65_cpsw_netdevice_nb.notifier_call = &am65_cpsw_netdevice_event; in am65_cpsw_register_notifiers()
2209 ret = register_netdevice_notifier(&cpsw->am65_cpsw_netdevice_nb); in am65_cpsw_register_notifiers()
2211 dev_err(cpsw->dev, "can't register netdevice notifier\n"); in am65_cpsw_register_notifiers()
2215 ret = am65_cpsw_switchdev_register_notifiers(cpsw); in am65_cpsw_register_notifiers()
2217 unregister_netdevice_notifier(&cpsw->am65_cpsw_netdevice_nb); in am65_cpsw_register_notifiers()
2222 static void am65_cpsw_unregister_notifiers(struct am65_cpsw_common *cpsw) in am65_cpsw_unregister_notifiers() argument
2224 if (AM65_CPSW_IS_CPSW2G(cpsw) || in am65_cpsw_unregister_notifiers()
2228 am65_cpsw_switchdev_unregister_notifiers(cpsw); in am65_cpsw_unregister_notifiers()
2229 unregister_netdevice_notifier(&cpsw->am65_cpsw_netdevice_nb); in am65_cpsw_unregister_notifiers()
2234 static void am65_cpsw_init_stp_ale_entry(struct am65_cpsw_common *cpsw) in am65_cpsw_init_stp_ale_entry() argument
2236 cpsw_ale_add_mcast(cpsw->ale, eth_stp_addr, ALE_PORT_HOST, ALE_SUPER, 0, in am65_cpsw_init_stp_ale_entry()
2308 struct am65_cpsw_common *cpsw = port->common; in am65_cpsw_init_port_switch_ale() local
2311 cpsw_ale_control_set(cpsw->ale, port->port_id, in am65_cpsw_init_port_switch_ale()
2314 cpsw_ale_add_ucast(cpsw->ale, port->ndev->dev_addr, in am65_cpsw_init_port_switch_ale()
2320 cpsw_ale_add_mcast(cpsw->ale, port->ndev->broadcast, in am65_cpsw_init_port_switch_ale()
2326 cpsw_ale_control_set(cpsw->ale, port->port_id, in am65_cpsw_init_port_switch_ale()
2334 struct am65_cpsw_common *cpsw = dl_priv->common; in am65_cpsw_dl_switch_mode_set() local
2339 dev_dbg(cpsw->dev, "%s id:%u\n", __func__, id); in am65_cpsw_dl_switch_mode_set()
2344 if (switch_en == !cpsw->is_emac_mode) in am65_cpsw_dl_switch_mode_set()
2347 if (!switch_en && cpsw->br_members) { in am65_cpsw_dl_switch_mode_set()
2348 dev_err(cpsw->dev, "Remove ports from bridge before disabling switch mode\n"); in am65_cpsw_dl_switch_mode_set()
2354 cpsw->is_emac_mode = !switch_en; in am65_cpsw_dl_switch_mode_set()
2356 for (i = 0; i < cpsw->port_num; i++) { in am65_cpsw_dl_switch_mode_set()
2357 struct net_device *sl_ndev = cpsw->ports[i].ndev; in am65_cpsw_dl_switch_mode_set()
2367 for (i = 0; i < cpsw->port_num; i++) { in am65_cpsw_dl_switch_mode_set()
2368 struct net_device *sl_ndev = cpsw->ports[i].ndev; in am65_cpsw_dl_switch_mode_set()
2376 slave->port_vlan = cpsw->default_vlan; in am65_cpsw_dl_switch_mode_set()
2384 cpsw_ale_control_set(cpsw->ale, 0, ALE_BYPASS, 1); in am65_cpsw_dl_switch_mode_set()
2386 cpsw_ale_control_set(cpsw->ale, HOST_PORT_NUM, ALE_CLEAR, 1); in am65_cpsw_dl_switch_mode_set()
2387 cpsw_ale_control_get(cpsw->ale, HOST_PORT_NUM, ALE_AGEOUT); in am65_cpsw_dl_switch_mode_set()
2390 dev_info(cpsw->dev, "Enable switch mode\n"); in am65_cpsw_dl_switch_mode_set()
2392 am65_cpsw_init_host_port_switch(cpsw); in am65_cpsw_dl_switch_mode_set()
2394 for (i = 0; i < cpsw->port_num; i++) { in am65_cpsw_dl_switch_mode_set()
2395 struct net_device *sl_ndev = cpsw->ports[i].ndev; in am65_cpsw_dl_switch_mode_set()
2404 slave->port_vlan = cpsw->default_vlan; in am65_cpsw_dl_switch_mode_set()
2411 dev_info(cpsw->dev, "Disable switch mode\n"); in am65_cpsw_dl_switch_mode_set()
2413 am65_cpsw_init_host_port_emac(cpsw); in am65_cpsw_dl_switch_mode_set()
2415 for (i = 0; i < cpsw->port_num; i++) { in am65_cpsw_dl_switch_mode_set()
2416 struct net_device *sl_ndev = cpsw->ports[i].ndev; in am65_cpsw_dl_switch_mode_set()
2428 cpsw_ale_control_set(cpsw->ale, HOST_PORT_NUM, ALE_BYPASS, 0); in am65_cpsw_dl_switch_mode_set()
2646 { .compatible = "ti,am654-cpsw-nuss", .data = &am65x_sr1_0},
2647 { .compatible = "ti,j721e-cpsw-nuss", .data = &j721e_pdata},
2648 { .compatible = "ti,am642-cpsw-nuss", .data = &am64x_cpswxg_pdata},
2855 MODULE_DESCRIPTION("TI AM65 CPSW Ethernet driver");