Exemplo n.º 1
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();
}
Exemplo n.º 2
0
static void __init ubnt_generic_setup(void)
{
	ar71xx_add_device_m25p80(NULL);

	ar71xx_add_device_gpio_buttons(-1, UBNT_BUTTONS_POLL_INTERVAL,
					ARRAY_SIZE(ubnt_gpio_buttons),
					ubnt_gpio_buttons);

	pb42_pci_init();
}
Exemplo n.º 3
0
static void __init ubnt_generic_setup(void)
{
	ar71xx_add_device_m25p80(&ubnt_flash_data);

	ar71xx_register_gpio_keys_polled(-1, UBNT_KEYS_POLL_INTERVAL,
					 ARRAY_SIZE(ubnt_gpio_keys),
					 ubnt_gpio_keys);

	pb42_pci_init();
}
Exemplo n.º 4
0
static void __init aw_nr580_setup(void)
{
	ar71xx_add_device_mdio(0x0);

	ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
	ar71xx_eth0_data.speed = SPEED_100;
	ar71xx_eth0_data.duplex = DUPLEX_FULL;

	ar71xx_add_device_eth(0);

	pb42_pci_init();

	ar71xx_add_device_m25p80(NULL);

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

	ar71xx_add_device_gpio_buttons(-1, AW_NR580_BUTTONS_POLL_INTERVAL,
					ARRAY_SIZE(aw_nr580_gpio_buttons),
					aw_nr580_gpio_buttons);
}
Exemplo n.º 5
0
static void __init wpe72_setup(void)
{
	ar71xx_add_device_m25p80(&wpe72_flash_data);
	ar71xx_add_device_mdio(0, 0x0);

	ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
	ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1);

	ar71xx_add_device_eth(0);
	ar71xx_add_device_eth(1);

	ar71xx_add_device_usb();

	pb42_pci_init();

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

	ar71xx_register_gpio_keys_polled(-1, WPE72_KEYS_POLL_INTERVAL,
					ARRAY_SIZE(wpe72_gpio_keys),
					wpe72_gpio_keys);
}
Exemplo n.º 6
0
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.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);

	pb42_pci_init();
}
Exemplo n.º 7
0
static void __init wp543_setup(void)
{
	ar71xx_add_device_m25p80(NULL);

	ar71xx_add_device_mdio(0xfffffff0);

	ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
	ar71xx_eth0_data.phy_mask = 0x0f;
	ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC |
				     RESET_MODULE_GE0_PHY;
	ar71xx_add_device_eth(0);

	ar71xx_add_device_usb();

	pb42_pci_init();

	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);
}
Exemplo n.º 8
0
static void __init pb44_init(void)
{
	ar71xx_add_device_mdio(~PB44_MDIO_PHYMASK);

	ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
	ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
	ar71xx_eth0_data.phy_mask = PB44_WAN_PHYMASK;

	ar71xx_add_device_eth(0);

	ar71xx_init_mac(ar71xx_eth1_data.mac_addr, ar71xx_mac_base, 1);
	ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
	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();

	pb42_pci_init();

	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_register_gpio_keys_polled(-1, PB44_KEYS_POLL_INTERVAL,
					 ARRAY_SIZE(pb44_gpio_keys),
					 pb44_gpio_keys);
}
Exemplo n.º 9
0
static void __init wp543_setup(void)
{
	ar71xx_add_device_m25p80(NULL);

	ar71xx_add_device_mdio(0, 0xfffffff7);

	ar71xx_init_mac(ar71xx_eth0_data.mac_addr, ar71xx_mac_base, 0);
	ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
	ar71xx_eth0_data.phy_mask = 0x08;
	ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC |
				     RESET_MODULE_GE0_PHY;
	ar71xx_add_device_eth(0);

	ar71xx_add_device_usb();

	pb42_pci_init();

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

	ar71xx_register_gpio_keys_polled(-1, WP543_KEYS_POLL_INTERVAL,
					 ARRAY_SIZE(wp543_gpio_keys),
					 wp543_gpio_keys);
}