#if !defined(__AVM_NET_CFG_hw233x_) #define __AVM_NET_CFG_hw233x_ #include #include #include "../switch/vlan_master/vlan_master.h" #include "../switch/f24s/avmnet_f24s.h" #include "../phy/synopsys.h" #include "../phy/phy_11G.h" avmnet_device_t hw233x_avmnet_avm_device_0 = { .device = NULL, .device_name = "eth0", .external_port_no = 0, #if defined(CONFIG_AVM_SCATTER_GATHER) .net_dev_features = NETIF_F_SG | NETIF_F_IP_CSUM, #endif .device_ops = { }, .sizeof_priv = sizeof(avmnet_netdev_priv_t), .device_setup = ether_setup, .device_setup_priv = NULL, .flags = AVMNET_CONFIG_FLAG_USE_VLAN, .vlanID = 300, #if 0 .vlanCFG = S17_VTU_FUNC0_VALID | S17_VTU_FUNC0_IVL_EN | S17_VTU_FUNC0_EG_VLANMODE_PORT0(VLANMODE_TAGGED) | S17_VTU_FUNC0_EG_VLANMODE_PORT1(VLANMODE_UNTAGGED) | S17_VTU_FUNC0_EG_VLANMODE_PORT2(VLANMODE_NOMEMBER) | S17_VTU_FUNC0_EG_VLANMODE_PORT3(VLANMODE_NOMEMBER) | S17_VTU_FUNC0_EG_VLANMODE_PORT4(VLANMODE_NOMEMBER) | S17_VTU_FUNC0_EG_VLANMODE_PORT5(VLANMODE_NOMEMBER) | S17_VTU_FUNC0_EG_VLANMODE_PORT6(VLANMODE_NOMEMBER), #endif }; avmnet_device_t hw233x_avmnet_avm_device_1 = { .device = NULL, .device_name = "eth1", .external_port_no = 1, #if defined(CONFIG_AVM_SCATTER_GATHER) .net_dev_features = NETIF_F_SG | NETIF_F_IP_CSUM, #endif .device_ops = { }, .sizeof_priv = sizeof(avmnet_netdev_priv_t), .device_setup = ether_setup, .device_setup_priv = NULL, .flags = AVMNET_CONFIG_FLAG_USE_VLAN, .vlanID = 400, }; avmnet_device_t hw233x_avmnet_avm_device_2 = { .device = NULL, .device_name = "eth2", .external_port_no = 2, #if defined(CONFIG_AVM_SCATTER_GATHER) .net_dev_features = NETIF_F_SG | NETIF_F_IP_CSUM, #endif .device_ops = { }, .sizeof_priv = sizeof(avmnet_netdev_priv_t), .device_setup = ether_setup, .device_setup_priv = NULL, .flags = AVMNET_CONFIG_FLAG_USE_VLAN, .vlanID = 500, }; avmnet_device_t hw233x_avmnet_avm_device_3 = { .device = NULL, .device_name = "eth3", .external_port_no = 3, #if defined(CONFIG_AVM_SCATTER_GATHER) .net_dev_features = NETIF_F_SG | NETIF_F_IP_CSUM, #endif .device_ops = { }, .sizeof_priv = sizeof(avmnet_netdev_priv_t), .device_setup = ether_setup, .device_setup_priv = NULL, .flags = AVMNET_CONFIG_FLAG_USE_VLAN, .vlanID = 600, }; avmnet_device_t *hw233x_avmnet_avm_devices[] = { &hw233x_avmnet_avm_device_0, &hw233x_avmnet_avm_device_1, &hw233x_avmnet_avm_device_2, &hw233x_avmnet_avm_device_3, }; extern avmnet_module_t hw233x_avmnet_phy_11G_0; extern avmnet_module_t hw233x_avmnet_phy_11G_1; extern avmnet_module_t hw233x_avmnet_phy_11G_2; extern avmnet_module_t hw233x_avmnet_phy_11G_3; extern avmnet_module_t hw233x_vlan_master; extern avmnet_module_t hw233x_peb708x; avmnet_module_t hw233x_avmnet = { .name = "synopsys", .type = avmnet_modtype_dev, .priv = NULL, .initdata.dev = { .orig_name = "nsgmii1", .mdio_bus = 1, }, .init = avmnet_synopsys_init, .setup = avmnet_synopsys_setup, .exit = avmnet_synopsys_exit, .reg_read = avmnet_synopsys_reg_read, .reg_write = avmnet_synopsys_reg_write, .lock = avmnet_synopsys_lock, .unlock = avmnet_synopsys_unlock, .trylock = avmnet_synopsys_trylock, .status_changed = avmnet_synopsys_status_changed, .set_status = avmnet_synopsys_set_status, .poll = avmnet_synopsys_poll, .setup_irq = avmnet_synopsys_setup_irq, .powerup = avmnet_synopsys_powerup, .powerdown = avmnet_synopsys_powerdown, .suspend = avmnet_synopsys_suspend, .resume = avmnet_synopsys_resume, .parent = NULL, .num_children = 1, .children = { &hw233x_vlan_master, } }; avmnet_module_t hw233x_vlan_master = { .name = "vlan_master", .type = avmnet_modtype_dev, .priv = NULL, .initdata.dev = { .orig_name = "nsgmii1", .new_name = "vlan_master%d", .mdio_bus = 1, }, .init = avmnet_vlan_master_init, .setup = avmnet_vlan_master_setup, .exit = avmnet_vlan_master_exit, .reg_read = avmnet_vlan_master_reg_read, .reg_write = avmnet_vlan_master_reg_write, .lock = avmnet_vlan_master_lock, .unlock = avmnet_vlan_master_unlock, .trylock = avmnet_vlan_master_trylock, .status_changed = avmnet_vlan_master_status_changed, .set_status = avmnet_vlan_master_set_status, .poll = avmnet_vlan_master_poll, .setup_irq = avmnet_vlan_master_setup_irq, .powerup = avmnet_vlan_master_powerup, .powerdown = avmnet_vlan_master_powerdown, .suspend = avmnet_vlan_master_suspend, .resume = avmnet_vlan_master_resume, .parent = &hw233x_avmnet, .num_children = 1, .children = { &hw233x_peb708x, } }; avmnet_module_t hw233x_peb708x = { .name = "peb70bx", .type = avmnet_modtype_switch, .priv = NULL, .initdata.swi = { .cpu_mac_port = 4, }, .init = avmnet_f24s_init, .setup = avmnet_f24s_setup, .exit = avmnet_f24s_exit, .reg_read = avmnet_f24s_reg_read, .reg_write = avmnet_f24s_reg_write, .lock = avmnet_f24s_lock, .unlock = avmnet_f24s_unlock, .trylock = avmnet_f24s_trylock, .status_changed = avmnet_f24s_status_changed, .set_status = avmnet_f24s_set_status, .poll = avmnet_f24s_status_poll, .setup_irq = avmnet_f24s_setup_interrupt, .powerup = avmnet_f24s_powerup, .powerdown = avmnet_f24s_powerdown, .suspend = avmnet_f24s_suspend, .resume = avmnet_f24s_resume, .parent = &hw233x_vlan_master, .num_children = 4, .children = { &hw233x_avmnet_phy_11G_0, &hw233x_avmnet_phy_11G_1, &hw233x_avmnet_phy_11G_2, &hw233x_avmnet_phy_11G_3, } }; avmnet_module_t hw233x_avmnet_phy_11G_0 = { .name = "phy_11G_0", .device_id = &hw233x_avmnet_avm_device_0, .type = avmnet_modtype_phy, .priv = NULL, .initdata.phy = { .flags = AVMNET_CONFIG_FLAG_PHY_GBIT | AVMNET_CONFIG_FLAG_DEFAULT_EN_FC_RX, .mdio_addr = 0x0, }, PHY_11G_STDFUNCS, .ethtool_ops = PHY_11G_ETHOPS, .parent = &hw233x_peb708x, .num_children = 0, .children = {} }; avmnet_module_t hw233x_avmnet_phy_11G_1 = { .name = "phy_11G_1", .device_id = &hw233x_avmnet_avm_device_1, .type = avmnet_modtype_phy, .priv = NULL, .initdata.phy = { .flags = AVMNET_CONFIG_FLAG_PHY_GBIT | AVMNET_CONFIG_FLAG_DEFAULT_EN_FC_RX, .mdio_addr = 0x1, }, PHY_11G_STDFUNCS, .ethtool_ops = PHY_11G_ETHOPS, .parent = &hw233x_peb708x, .num_children = 0, .children = {} }; avmnet_module_t hw233x_avmnet_phy_11G_2 = { .name = "phy_11G_2", .device_id = &hw233x_avmnet_avm_device_2, .type = avmnet_modtype_phy, .priv = NULL, .initdata.phy = { .flags = AVMNET_CONFIG_FLAG_PHY_GBIT | AVMNET_CONFIG_FLAG_DEFAULT_EN_FC_RX, .mdio_addr = 0x3, }, PHY_11G_STDFUNCS, .ethtool_ops = PHY_11G_ETHOPS, .parent = &hw233x_peb708x, .num_children = 0, .children = {} }; avmnet_module_t hw233x_avmnet_phy_11G_3 = { .name = "phy_11G_3", .device_id = &hw233x_avmnet_avm_device_3, .type = avmnet_modtype_phy, .priv = NULL, .initdata.phy = { .flags = AVMNET_CONFIG_FLAG_PHY_GBIT | AVMNET_CONFIG_FLAG_DEFAULT_EN_FC_RX, .mdio_addr = 0x2, }, PHY_11G_STDFUNCS, .ethtool_ops = PHY_11G_ETHOPS, .parent = &hw233x_peb708x, .num_children = 0, .children = {} }; #endif // __AVM_NET_CFG_hw233x_