aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-05-23 03:17:00 +0200
committerFelix Fietkau <nbd@nbd.name>2016-05-23 13:39:49 +0200
commitc5ff273d85f69981e5b126eeaed3dee5b4061fb4 (patch)
tree0dc65f2d488c372127d0925c9f048404b1c144da /target/linux/ar71xx/files/arch
parentce63c38ef5f2c049d739fbcc8d9b3f12f3bac206 (diff)
downloadupstream-c5ff273d85f69981e5b126eeaed3dee5b4061fb4.tar.gz
upstream-c5ff273d85f69981e5b126eeaed3dee5b4061fb4.tar.bz2
upstream-c5ff273d85f69981e5b126eeaed3dee5b4061fb4.zip
ar71xx/cpe510: split profile into 2 profiles cpe210 and cpe510
Split profile into 2GHz and 5GHz. The 5GHz devices are quite "special". The 2 GHz works perfect. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c30
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/machtypes.h1
2 files changed, 25 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
index 5cb052a84a..74daf434e6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
@@ -78,12 +78,8 @@ static struct gpio_keys_button cpe510_gpio_keys[] __initdata = {
}
};
-
-static void __init cpe510_setup(void)
+static void __init cpe_setup(u8 *mac)
{
- u8 *mac = (u8 *) KSEG1ADDR(0x1f830008);
- u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
-
/* Disable JTAG, enabling GPIOs 0-3 */
/* Configure OBS4 line, for GPIO 4*/
ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE,
@@ -105,9 +101,31 @@ static void __init cpe510_setup(void)
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_register_eth(1);
+}
+
+
+static void __init cpe210_setup(void)
+{
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f830008);
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+ cpe_setup(mac);
ath79_register_wmac(ee, mac);
}
-MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE210/220/510/520",
+static void __init cpe510_setup(void)
+{
+ u8 *mac = (u8 *) KSEG1ADDR(0x1f830008);
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+ cpe_setup(mac);
+
+ ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_CPE210, "CPE210", "TP-LINK CPE210/220",
+ cpe210_setup);
+
+MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520",
cpe510_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index a74d0df152..65b1d79019 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -51,6 +51,7 @@ enum ath79_mach_type {
ATH79_MACH_CAP4200AG, /* Senao CAP4200AG */
ATH79_MACH_CARAMBOLA2, /* 8devices Carambola2 */
ATH79_MACH_CF_E316N_V2, /* COMFAST CF-E316N v2 */
+ ATH79_MACH_CPE210, /* TP-LINK CPE210 */
ATH79_MACH_CPE510, /* TP-LINK CPE510 */
ATH79_MACH_CR3000, /* PowerCloud CR3000 */
ATH79_MACH_CR5000, /* PowerCloud CR5000 */