From: Alexander Stadler <[email protected]> fix leds (and update mac assignement) for dir-825-c1
Signed-off-by: Alexander Stadler <[email protected]> --- diff -urN a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 2013-02-25 13:25:08.000000000 +0100 +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-c1.c 2013-02-25 13:46:56.000000000 +0100 @@ -29,8 +29,9 @@ #include "machtypes.h" #define DIR825C1_GPIO_LED_BLUE_USB 11 -#define DIR825C1_GPIO_LED_ORANGE_POWER 15 -#define DIR825C1_GPIO_LED_BLUE_POWER 14 +#define DIR825C1_GPIO_LED_ORANGE_POWER 14 +#define DIR825C1_GPIO_LED_BLUE_POWER 22 +#define DIR825C1_GPIO_LED_BLUE_WPS 15 #define DIR825C1_GPIO_LED_ORANGE_PLANET 19 #define DIR825C1_GPIO_LED_BLUE_PLANET 18 @@ -50,23 +51,32 @@ .name = "d-link:blue:usb", .gpio = DIR825C1_GPIO_LED_BLUE_USB, .active_low = 1, - }, { + }, + { .name = "d-link:orange:power", .gpio = DIR825C1_GPIO_LED_ORANGE_POWER, .active_low = 1, - }, { + }, + { .name = "d-link:blue:power", .gpio = DIR825C1_GPIO_LED_BLUE_POWER, .active_low = 1, - }, { + }, + { + .name = "d-link:blue:wps", + .gpio = DIR825C1_GPIO_LED_BLUE_WPS, + .active_low = 1, + }, + { .name = "d-link:orange:planet", .gpio = DIR825C1_GPIO_LED_ORANGE_PLANET, .active_low = 1, - }, { + }, + { .name = "d-link:blue:planet", .gpio = DIR825C1_GPIO_LED_BLUE_PLANET, .active_low = 1, - } + }, }; static struct gpio_keys_button dir825c1_gpio_keys[] __initdata = { @@ -77,14 +87,15 @@ .debounce_interval = DIR825C1_KEYS_DEBOUNCE_INTERVAL, .gpio = DIR825C1_GPIO_BTN_RESET, .active_low = 1, - }, { + }, + { .desc = "wps", .type = EV_KEY, .code = KEY_WPS_BUTTON, .debounce_interval = DIR825C1_KEYS_DEBOUNCE_INTERVAL, .gpio = DIR825C1_GPIO_BTN_WPS, .active_low = 1, - } + }, }; static struct ar8327_pad_cfg dir825c1_ar8327_pad0_cfg = { @@ -139,11 +150,11 @@ { u8 *mac = (u8 *) KSEG1ADDR(0x1ffe0000); u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); - u8 tmpmac[ETH_ALEN]; - u8 mac1[ETH_ALEN], mac2[ETH_ALEN]; + u8 mac0[ETH_ALEN], mac1[ETH_ALEN]; + u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN]; - dir825c1_read_ascii_mac(mac1, mac + DIR825C1_MAC0_OFFSET); - dir825c1_read_ascii_mac(mac2, mac + DIR825C1_MAC1_OFFSET); + dir825c1_read_ascii_mac(mac0, mac + DIR825C1_MAC0_OFFSET); + dir825c1_read_ascii_mac(mac1, mac + DIR825C1_MAC1_OFFSET); ath79_gpio_output_select(DIR825C1_GPIO_LED_BLUE_USB, AR934X_GPIO_OUT_GPIO); @@ -158,11 +169,11 @@ ap9x_pci_setup_wmac_led_pin(0, 13); ap9x_pci_setup_wmac_led_pin(1, 32); - ath79_init_mac(tmpmac, mac1, 0); - ath79_register_wmac(art + DIR825C1_WMAC_CALDATA_OFFSET, tmpmac); + ath79_init_mac(wmac0, mac0, 0); + ath79_register_wmac(art + DIR825C1_WMAC_CALDATA_OFFSET, wmac0); - ath79_init_mac(tmpmac, mac2, 0); - ap91_pci_init(art + DIR825C1_PCIE_CALDATA_OFFSET, tmpmac); + ath79_init_mac(wmac1, mac1, 1); + ap91_pci_init(art + DIR825C1_PCIE_CALDATA_OFFSET, wmac1); ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0); @@ -171,7 +182,7 @@ ath79_register_mdio(0, 0x0); - ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0); + ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0); /* GMAC0 is connected to an AR8327N switch */ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
