[source] ar71xx: add kernel support for the OpenMesh A40 board

LEDE Commits lede-commits at lists.infradead.org
Tue Feb 14 03:48:35 PST 2017


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/5e61a8331d53e7119ab1e616808476f585220a6d

commit 5e61a8331d53e7119ab1e616808476f585220a6d
Author: Sven Eckelmann <sven.eckelmann at open-mesh.com>
AuthorDate: Fri Sep 23 09:36:10 2016 +0200

    ar71xx: add kernel support for the OpenMesh A40 board
    
    Signed-off-by: Sven Eckelmann <sven.eckelmann at open-mesh.com>
---
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt    |  2 +-
 .../linux/ar71xx/files/arch/mips/ath79/mach-a60.c   | 21 +++++++++++++++++++++
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h  |  1 +
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 8460b0f..873befa 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1,5 +1,5 @@
 config ATH79_MACH_A60
-	bool "OpenMesh A60 board support"
+	bool "OpenMesh A40/A60 board support"
 	select SOC_QCA955X
 	select ATH79_DEV_AP9X_PCI if PCI
 	select ATH79_DEV_ETH
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-a60.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-a60.c
index 73fba1e..2f0a75f 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-a60.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-a60.c
@@ -40,6 +40,19 @@
 
 #define A60_WMAC_CALDATA_OFFSET	0x1000
 
+static struct gpio_led a40_leds_gpio[] __initdata = {
+	{
+		.name		= "a40:red:status",
+		.gpio		= A60_GPIO_LED_RED,
+	}, {
+		.name		= "a40:green:status",
+		.gpio		= A60_GPIO_LED_GREEN,
+	}, {
+		.name		= "a40:blue:status",
+		.gpio		= A60_GPIO_LED_BLUE,
+	}
+};
+
 static struct gpio_led a60_leds_gpio[] __initdata = {
 	{
 		.name		= "a60:red:status",
@@ -151,6 +164,14 @@ static void __init a60_setup_common(void)
 	ath79_register_pci();
 }
 
+static void __init a40_setup(void)
+{
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(a40_leds_gpio), a40_leds_gpio);
+	a60_setup_common();
+}
+
+MIPS_MACHINE(ATH79_MACH_A40, "A40", "OpenMesh A40", a40_setup);
+
 static void __init a60_setup(void)
 {
 	ath79_register_leds_gpio(-1, ARRAY_SIZE(a60_leds_gpio), a60_leds_gpio);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 23589ab..2a8d339 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -17,6 +17,7 @@
 enum ath79_mach_type {
 	ATH79_MACH_GENERIC_OF = -1,	/* Device tree board */
 	ATH79_MACH_GENERIC = 0,
+	ATH79_MACH_A40,				/* OpenMesh A40 */
 	ATH79_MACH_A60,				/* OpenMesh A60 */
 	ATH79_MACH_ALFA_AP120C,			/* ALFA Network AP120C board */
 	ATH79_MACH_ALFA_AP96,			/* ALFA Network AP96 board */



More information about the lede-commits mailing list