Пример #1
0
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();
}
Пример #2
0
void __init ap91_eth_init(u8 *mac_addr, const char *port_names[])
{
	if (mac_addr)
		ar71xx_set_mac_base(mac_addr);

	if (port_names) {
		int i;

		for (i = 0; i < AP91_ETH_NUM_PORT_NAMES; i++)
			ap91_eth_set_port_name(i + 1, port_names[i]);
	}

	/* 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.fifo_cfg1 = 0x0fff0000;
	ar71xx_eth0_data.fifo_cfg2 = 0x00001fff;
	ar71xx_eth0_data.fifo_cfg3 = 0x008001ff;

	/* 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.fifo_cfg1 = 0x0fff0000;
	ar71xx_eth1_data.fifo_cfg2 = 0x00001fff;
	ar71xx_eth1_data.fifo_cfg3 = 0x008001ff;

	ar71xx_add_device_mdio(0x0);
	ar71xx_add_device_eth(1);
	ar71xx_add_device_eth(0);

	ar71xx_add_device_dsa(1, &ap91_dsa_data);
}
Пример #3
0
static void __init tl_wr841n_v1_setup(void)
{
    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);

    ar71xx_add_device_mdio(0, 0x0);

    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_add_device_eth(0);
    ar71xx_add_device_dsa(&ar71xx_eth0_device.dev, &ar71xx_mdio0_device.dev,
                          &tl_wr841n_v1_dsa_data);

    ar71xx_add_device_m25p80(&tl_wr841n_v1_flash_data);

    ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v1_leds_gpio),
                                tl_wr841n_v1_leds_gpio);

    ar71xx_register_gpio_keys_polled(-1, TL_WR841ND_V1_KEYS_POLL_INTERVAL,
                                     ARRAY_SIZE(tl_wr841n_v1_gpio_keys),
                                     tl_wr841n_v1_gpio_keys);

    pb42_pci_init();
}
Пример #4
0
static void __init tl_wr941nd_setup(void)
{
	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
	u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);

	ar71xx_add_device_mdio(0x0);

	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_add_device_eth(0);
	ar71xx_add_device_dsa(0, &tl_wr941nd_dsa_data);

	ar71xx_add_device_m25p80(&tl_wr941nd_flash_data);

	ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wr941nd_leds_gpio),
					tl_wr941nd_leds_gpio);

	ar71xx_register_gpio_keys_polled(-1, TL_WR941ND_KEYS_POLL_INTERVAL,
					 ARRAY_SIZE(tl_wr941nd_gpio_keys),
					 tl_wr941nd_gpio_keys);
	ar9xxx_add_device_wmac(eeprom, mac);
}