From fcf46d1d95c752508060b2a971c6fd4b7ac042d6 Mon Sep 17 00:00:00 2001 From: acoul Date: Thu, 31 Mar 2016 07:54:55 +0300 Subject: [PATCH] linux/ar71xx: update kernel 4.4 patches (so far 4.4 is broken on ar71xx and 4.1 has couple of issues) --- .../702-MIPS-ath79-add-rb711.patch | 45 +++++++++++++++++++ .../999-4.4_mach-rb4xx_c-fix.patch | 15 +++++++ 2 files changed, 60 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.4/702-MIPS-ath79-add-rb711.patch create mode 100644 target/linux/ar71xx/patches-4.4/999-4.4_mach-rb4xx_c-fix.patch diff --git a/target/linux/ar71xx/patches-4.4/702-MIPS-ath79-add-rb711.patch b/target/linux/ar71xx/patches-4.4/702-MIPS-ath79-add-rb711.patch new file mode 100644 index 0000000000..6f56781d49 --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/702-MIPS-ath79-add-rb711.patch @@ -0,0 +1,45 @@ +--- a/arch/mips/ath79/mach-rb750.c ++++ b/arch/mips/ath79/mach-rb750.c +@@ -325,6 +325,32 @@ static void __init rb751_wlan_setup(void + ap91_pci_init(NULL, mac); + } + ++static void __init rb711_setup(void) ++{ ++ ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN | ++ AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN | ++ AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN | ++ AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN | ++ AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN); ++ ++ ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0); ++ ++ ath79_register_mdio(0, 0x0); ++ ++ ath79_register_eth(0); ++ ++ rb750_nand_data.nce_line = RB750_NAND_NCE; ++ rb750_nand_data.enable_pins = rb750_nand_enable_pins; ++ rb750_nand_data.disable_pins = rb750_nand_disable_pins; ++ rb750_nand_data.latch_change = rb750_latch_change; ++ platform_device_register(&rb750_nand_device); ++ ++ rb751_wlan_setup(); ++} ++ ++MIPS_MACHINE(ATH79_MACH_RB_711, "711", "MikroTik RouterBOARD 711", ++ rb711_setup); ++ + static void __init rb751_setup(void) + { + rb750_setup(); +--- a/arch/mips/ath79/machtypes.h ++++ b/arch/mips/ath79/machtypes.h +@@ -123,6 +123,7 @@ enum ath79_mach_type { + ATH79_MACH_RB_493, /* Mikrotik RouterBOARD 493/493AH */ + ATH79_MACH_RB_493G, /* Mikrotik RouterBOARD 493G */ + ATH79_MACH_RB_711GR100, /* Mikrotik RouterBOARD 911/912 boards */ ++ ATH79_MACH_RB_711, /* MikroTik RouterBOARD 711 */ + ATH79_MACH_RB_750, /* MikroTik RouterBOARD 750 */ + ATH79_MACH_RB_750G_R3, /* MikroTik RouterBOARD 750GL */ + ATH79_MACH_RB_751, /* MikroTik RouterBOARD 751 */ diff --git a/target/linux/ar71xx/patches-4.4/999-4.4_mach-rb4xx_c-fix.patch b/target/linux/ar71xx/patches-4.4/999-4.4_mach-rb4xx_c-fix.patch new file mode 100644 index 0000000000..3abb4ad02b --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/999-4.4_mach-rb4xx_c-fix.patch @@ -0,0 +1,15 @@ +--- a/arch/mips/ath79/mach-rb4xx.c ++++ b/arch/mips/ath79/mach-rb4xx.c +@@ -11,7 +11,12 @@ + + #include + #include ++#include ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) + #include ++#else ++#include ++#endif + #include + #include + #include -- 2.35.1