static void __init tl_wr941nd_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); ar71xx_set_mac_base(mac); ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = 0x0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_add_device_eth(0); ar71xx_add_device_dsa(0, &tl_wr941nd_dsa_data); ar71xx_add_device_spi(NULL, tl_wr941nd_spi_info, ARRAY_SIZE(tl_wr941nd_spi_info)); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wr941nd_leds_gpio), tl_wr941nd_leds_gpio); ar71xx_add_device_gpio_buttons(-1, TL_WR941ND_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(tl_wr941nd_gpio_buttons), tl_wr941nd_gpio_buttons); ar91xx_add_device_wmac(); }
static void __init mzk_w300nh_setup(void) { u8 *mac = (u8 *) KSEG1ADDR(0x1fff1000); ar71xx_set_mac_base(mac); ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth1_data.phy_mask = 0x10; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_add_device_spi(NULL, mzk_w300nh_spi_info, ARRAY_SIZE(mzk_w300nh_spi_info)); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio), mzk_w300nh_leds_gpio); ar71xx_add_device_gpio_buttons(-1, MZK_W04NU_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(mzk_w300nh_gpio_buttons), mzk_w300nh_gpio_buttons); ar91xx_add_device_wmac(); }
static void __init tew_632brp_setup(void) { ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth1_data.phy_mask = 0x10; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_add_device_spi(NULL, tew_632brp_spi_info, ARRAY_SIZE(tew_632brp_spi_info)); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tew_632brp_leds_gpio), tew_632brp_leds_gpio); ar71xx_add_device_gpio_buttons(-1, TEW_632BRP_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(tew_632brp_gpio_buttons), tew_632brp_gpio_buttons); ar91xx_add_device_wmac(); }
static void __init wrt160nl_setup(void) { /* TODO: ethernet, LEDs, buttons */ ar71xx_add_device_spi(NULL, wrt160nl_spi_info, ARRAY_SIZE(wrt160nl_spi_info)); ar71xx_add_device_usb(); ar91xx_add_device_wmac(); }
static void __init wzrhpag300h_setup(void) { u8 *eeprom1 = (u8 *) KSEG1ADDR(0x1f051000); u8 *eeprom2 = (u8 *) KSEG1ADDR(0x1f055000); u8 *mac1 = eeprom1 + WZRHPAG300H_MAC_OFFSET; u8 *mac2 = eeprom2 + WZRHPAG300H_MAC_OFFSET; ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac1, 0); ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac2, 1); ar71xx_add_device_mdio(0, ~(BIT(0) | BIT(4))); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth0_data.speed = SPEED_1000; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.phy_mask = BIT(0); ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth1_data.phy_mask = BIT(4); ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_add_device_usb(); gpio_request(2, "usb"); gpio_direction_output(2, 1); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wzrhpag300h_leds_gpio), wzrhpag300h_leds_gpio); ar71xx_register_gpio_keys_polled(-1, WZRHPAG300H_KEYS_POLL_INTERVAL, ARRAY_SIZE(wzrhpag300h_gpio_keys), wzrhpag300h_gpio_keys); ar71xx_add_device_spi(NULL, ar71xx_spi_info, ARRAY_SIZE(ar71xx_spi_info)); add_mtd_concat_notifier(); ap94_pci_init(eeprom1, mac1, eeprom2, mac2); }
static void __init wp543_setup(void) { ar71xx_add_device_spi(NULL, wp543_spi_info, ARRAY_SIZE(wp543_spi_info)); ar71xx_add_device_mdio(0xfffffff7); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = 0x00000008; ar71xx_add_device_eth(0); ar71xx_add_device_usb(); ar71xx_pci_init(ARRAY_SIZE(wp543_pci_irqs), wp543_pci_irqs); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wp543_leds_gpio), wp543_leds_gpio); ar71xx_add_device_gpio_buttons(-1, WP543_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(wp543_gpio_buttons), wp543_gpio_buttons); }
static void rb433_add_device_spi(void) { ar71xx_add_device_spi(&rb433_spi_data, rb433_spi_info, ARRAY_SIZE(rb433_spi_info)); }
static void rb4xx_add_device_spi(void) { ar71xx_add_device_spi(NULL, rb4xx_spi_info, ARRAY_SIZE(rb4xx_spi_info)); }