#define ALL0258N_KEYS_DEBOUNCE_INTERVAL (3 * ALL0258N_KEYS_POLL_INTERVAL)
/* showed up in the original firmware's bootlog */
-#define ALL0258N_LAN_PHYMASK BIT(4)
#define ALL0258N_SEC_PHYMASK BIT(3)
/*
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.phy_mask = ALL0258N_LAN_PHYMASK;
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = ALL0258N_SEC_PHYMASK;
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_add_device_mdio(0, 0x0);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, art + AP121_MAC0_OFFSET, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, art + AP121_MAC1_OFFSET, 0);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ar9xxx_add_device_wmac(art + AP121_CALDATA_OFFSET,
ARRAY_SIZE(dir_600_a1_gpio_keys),
dir_600_a1_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_init(ee, mac);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = OM2P_WAN_PHYMASK;
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
platform_device_register(&rb750_leds_device);
ARRAY_SIZE(tl_mr3x20_gpio_keys),
tl_mr3x20_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+ /* WAN port */
ar71xx_add_device_eth(0);
ar71xx_add_device_usb();
* however we have a single LAN port only.
*/
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 0);
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
-
ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(0);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
-
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
- ar71xx_eth1_data.has_ar7240_switch = 1;
-
ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
ar71xx_add_device_eth(0);
ARRAY_SIZE(tl_wr741nd_gpio_keys),
tl_wr741nd_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_setup_wmac_led_pin(1);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK;
-
ar71xx_add_device_eth(0);
ap91_pci_init(ee, NULL);
static void __init ubnt_nano_m_setup(void)
{
ubnt_m_setup();
-
- ar71xx_eth1_data.has_ar7240_switch = 1;
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
ar71xx_add_device_eth(1);
}
ar71xx_add_device_mdio(0, ~UBNT_M_WAN_PHYMASK);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = UBNT_M_WAN_PHYMASK;
-
ar71xx_add_device_eth(0);
ap91_pci_init(ee, NULL);
ARRAY_SIZE(whrhpg300n_gpio_keys),
whrhpg300n_gpio_keys);
- ar71xx_eth1_data.has_ar7240_switch = 1;
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* WAN port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
- ar71xx_eth0_data.phy_mask = BIT(4);
+ ar71xx_add_device_mdio(0, 0x0);
/* LAN ports */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
- ar71xx_add_device_mdio(0, 0x0);
ar71xx_add_device_eth(1);
+ /* WAN port */
ar71xx_add_device_eth(0);
ap91_pci_setup_wmac_led_pin(1);
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
- /* LAN1 port */
- ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth0_data.speed = SPEED_100;
- ar71xx_eth0_data.duplex = DUPLEX_FULL;
-
- /* LAN2 port */
- ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
- ar71xx_eth1_data.speed = SPEED_1000;
- ar71xx_eth1_data.duplex = DUPLEX_FULL;
-
ar71xx_add_device_mdio(0, 0x0);
+
+ /* LAN1 port */
ar71xx_add_device_eth(0);
}
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_5_leds_gpio),
zcn_1523h_5_leds_gpio);
+
+ /* LAN2 port */
ar71xx_add_device_eth(1);
}