void __init ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, u8 *cal_data1, u8 *mac_addr1) { if (cal_data0) memcpy(ap94_wmac0_data.eeprom_data, cal_data0, sizeof(ap94_wmac0_data.eeprom_data)); if (cal_data1) memcpy(ap94_wmac1_data.eeprom_data, cal_data1, sizeof(ap94_wmac1_data.eeprom_data)); if (mac_addr0) { memcpy(ap94_wmac0_mac, mac_addr0, sizeof(ap94_wmac0_mac)); ap94_wmac0_data.macaddr = ap94_wmac0_mac; } if (mac_addr1) { memcpy(ap94_wmac1_mac, mac_addr1, sizeof(ap94_wmac1_mac)); ap94_wmac1_data.macaddr = ap94_wmac1_mac; } ar71xx_pci_plat_dev_init = ap94_pci_plat_dev_init; ar71xx_pci_init(ARRAY_SIZE(ap94_pci_irqs), ap94_pci_irqs); pci_enable_ath9k_fixup(17, ap94_wmac0_data.eeprom_data); pci_enable_ath9k_fixup(18, ap94_wmac1_data.eeprom_data); }
void __init eap7660d_pci_init(u8 *cal_data0, u8 *mac_addr0, u8 *cal_data1, u8 *mac_addr1) { if (cal_data0 && *cal_data0 == 0xa55a) { memcpy(eap7660d_wmac0_eeprom, cal_data0, ATH5K_PLAT_EEP_MAX_WORDS); eap7660d_wmac0_data.eeprom_data = eap7660d_wmac0_eeprom; } if (cal_data1 && *cal_data1 == 0xa55a) { memcpy(eap7660d_wmac1_eeprom, cal_data1, ATH5K_PLAT_EEP_MAX_WORDS); eap7660d_wmac1_data.eeprom_data = eap7660d_wmac1_eeprom; } if (mac_addr0) { memcpy(eap7660d_wmac0_mac, mac_addr0, sizeof(eap7660d_wmac0_mac)); eap7660d_wmac0_data.macaddr = eap7660d_wmac0_mac; } if (mac_addr1) { memcpy(eap7660d_wmac1_mac, mac_addr1, sizeof(eap7660d_wmac1_mac)); eap7660d_wmac1_data.macaddr = eap7660d_wmac1_mac; } ar71xx_pci_plat_dev_init = eap7660d_pci_plat_dev_init; ar71xx_pci_init(ARRAY_SIZE(eap7660d_pci_irqs), eap7660d_pci_irqs); }
static void __init rb493_setup(void) { rb4xx_add_device_spi(); ar71xx_add_device_mdio(0x3fffff00); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = 0; 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 = 0x00000001; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(rb4xx_leds_gpio), rb4xx_leds_gpio); ar71xx_add_device_gpio_buttons(-1, RB4XX_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(rb4xx_gpio_buttons), rb4xx_gpio_buttons); platform_device_register(&rb4xx_nand_device); ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs); }
static void __init pb44_init(void) { ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth0_data.phy_mask = PB44_WAN_PHYMASK; ar71xx_add_device_eth(0); ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; ar71xx_eth1_data.phy_mask = PB44_LAN_PHYMASK; ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_pll_data.pll_1000 = 0x110000; ar71xx_add_device_eth(1); ar71xx_add_device_usb(); ar71xx_pci_init(ARRAY_SIZE(pb44_pci_irqs), pb44_pci_irqs); i2c_register_board_info(0, pb44_i2c_board_info, ARRAY_SIZE(pb44_i2c_board_info)); platform_device_register(&pb44_i2c_gpio_device); spi_register_board_info(pb44_spi_info, ARRAY_SIZE(pb44_spi_info)); platform_device_register(&pb44_spi_device); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio), pb44_leds_gpio); ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(pb44_gpio_buttons), pb44_gpio_buttons); }
static void __init rb411_setup(void) { rb4xx_generic_setup(); rb4xx_add_device_spi(); ar71xx_add_device_mdio(0xfffffffe); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = 0x00000001; ar71xx_add_device_eth(0); ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs); }
void __init db120_pci_init(u8 *cal_data, u8 *mac_addr) { if (cal_data) memcpy(db120_wmac_data.eeprom_data, cal_data, sizeof(db120_wmac_data.eeprom_data)); if (mac_addr) { memcpy(db120_wmac_mac, mac_addr, sizeof(db120_wmac_mac)); db120_wmac_data.macaddr = db120_wmac_mac; } ar71xx_pci_plat_dev_init = db120_pci_plat_dev_init; ar71xx_pci_init(ARRAY_SIZE(db120_pci_irqs), db120_pci_irqs); }
void __init ap91_pci_init(u8 *cal_data, u8 *mac_addr) { #ifndef CONFIG_ARCHERC7 if (cal_data) memcpy(wmac_data.eeprom_data, cal_data, sizeof(wmac_data.eeprom_data)); if (mac_addr) { memcpy(ap91_wmac_mac, mac_addr, sizeof(ap91_wmac_mac)); wmac_data.macaddr = ap91_wmac_mac; } ar71xx_pci_plat_dev_init = ap91_pci_plat_dev_init; pci_enable_ath9k_fixup(0, wmac_data.eeprom_data); #endif ar71xx_pci_init(); #ifdef CONFIG_MTD_NAND_ATH pcibios_init(); #endif }
static void __init rb493_setup(void) { rb4xx_generic_setup(); rb4xx_add_device_spi(); ar71xx_add_device_mdio(0x3fffff00); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; 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 = 0x00000001; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs); }
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 __init rb411_setup(void) { rb4xx_add_device_spi(); ar71xx_add_device_mdio(0xfffffffe); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = 0x00000001; ar71xx_add_device_eth(0); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(rb4xx_leds_gpio), rb4xx_leds_gpio); ar71xx_add_device_gpio_buttons(-1, RB4XX_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(rb4xx_gpio_buttons), rb4xx_gpio_buttons); platform_device_register(&rb4xx_nand_device); ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs); }
static void __init pb42_init(void) { ar71xx_add_device_m25p80(NULL); ar71xx_add_device_mdio(~PB42_MDIO_PHYMASK); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ar71xx_eth0_data.phy_mask = PB42_WAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ar71xx_eth1_data.phy_mask = PB42_LAN_PHYMASK; ar71xx_eth1_data.speed = SPEED_100; ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); ar71xx_add_device_gpio_buttons(-1, PB42_BUTTONS_POLL_INTERVAL, ARRAY_SIZE(pb42_gpio_buttons), pb42_gpio_buttons); ar71xx_pci_init(ARRAY_SIZE(pb42_pci_irqs), pb42_pci_irqs); }
void __init pb42_pci_init(void) { ar71xx_pci_init(ARRAY_SIZE(pb42_pci_irqs), pb42_pci_irqs); }