add experimental support for the AzureWave AW-NR580 board
authorGabor Juhos <juhosg@openwrt.org>
Tue, 18 Nov 2008 13:21:24 +0000 (13:21 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 18 Nov 2008 13:21:24 +0000 (13:21 +0000)
SVN-Revision: 13278

target/linux/ar71xx/config-2.6.26
target/linux/ar71xx/config-2.6.27
target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c [new file with mode: 0644]
target/linux/ar71xx/files/arch/mips/ar71xx/prom.c
target/linux/ar71xx/patches-2.6.26/001-ar71xx_core.patch
target/linux/ar71xx/patches-2.6.27/001-ar71xx_core.patch

index 888635a5fe81f28c3f1a6cdd7c2c9e33f7c9158e..fcac34188a969c8bc17fdbddd5bddde005f9773b 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_32BIT=y
 CONFIG_ADM6996_PHY=y
 CONFIG_AG71XX=y
 # CONFIG_AR71XX_EARLY_SERIAL is not set
+CONFIG_AR71XX_MACH_AW_NR580=y
 CONFIG_AR71XX_MACH_GENERIC=y
 CONFIG_AR71XX_MACH_RB_4XX=y
 CONFIG_AR71XX_MACH_WP543=y
index 7b7d36ea082ecfefa8f84399520dba7091f8274e..295b97eda3c79e0f367ca017950673fdfd98dcae 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_32BIT=y
 CONFIG_ADM6996_PHY=y
 CONFIG_AG71XX=y
 # CONFIG_AR71XX_EARLY_SERIAL is not set
+CONFIG_AR71XX_MACH_AW_NR580=y
 CONFIG_AR71XX_MACH_GENERIC=y
 CONFIG_AR71XX_MACH_RB_4XX=y
 CONFIG_AR71XX_MACH_WP543=y
index 8640b2cc51cc465a97fbe8212b3c2518bbaca8fb..d8ae08577be00c3a6530709bee1958c1d2a46edc 100644 (file)
@@ -6,6 +6,10 @@ config AR71XX_EARLY_SERIAL
 
 menu "Atheros AR71xx machine selection"
 
+config AR71XX_MACH_AW_NR580
+       bool "AzureWave AW-NR580 board support"
+       default y
+
 config AR71XX_MACH_GENERIC
        bool "Generic AR71xx based machine support"
        default y
index 6e7ab1d48b88e79cef152d223cdf96b38e24a32e..175c43e911dab70834f48acf7707ba9710f5d5d5 100644 (file)
@@ -10,6 +10,7 @@
 
 obj-y  := prom.o irq.o setup.o platform.o gpio.o ar71xx.o
 
+obj-$(CONFIG_AR71XX_MACH_AW_NR580)     += mach-aw-nr580.o
 obj-$(CONFIG_AR71XX_MACH_GENERIC)      += mach-generic.o
 obj-$(CONFIG_AR71XX_MACH_RB_4XX)       += mach-rb-4xx.o
 obj-$(CONFIG_AR71XX_MACH_WP543)                += mach-wp543.o
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
new file mode 100644 (file)
index 0000000..0e22bf5
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ *  AzureWave AW-NR580 board support
+ *
+ *  Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+#include <linux/input.h>
+
+#include <asm/mips_machine.h>
+#include <asm/mach-ar71xx/ar71xx.h>
+#include <asm/mach-ar71xx/pci.h>
+#include <asm/mach-ar71xx/platform.h>
+
+static struct spi_board_info aw_nr580_spi_info[] = {
+       {
+               .bus_num        = 0,
+               .chip_select    = 0,
+               .max_speed_hz   = 25000000,
+               .modalias       = "m25p80",
+       }
+};
+
+static void __init aw_nr580_setup(void)
+{
+       ar71xx_add_device_spi(NULL, aw_nr580_spi_info,
+                                       ARRAY_SIZE(aw_nr580_spi_info));
+}
+
+MIPS_MACHINE(MACH_AR71XX_AW_NR580, "AzureWave AW-NR580", aw_nr580_setup);
index 1d55328aad024ce41b7b97b8d3656e0e6d49e545..cd6f26cdac48724ad53973cf537c07e3f3f768d1 100644 (file)
@@ -43,6 +43,9 @@ static struct board_rec boards[] __initdata = {
        }, {
                .name           = "493",
                .mach_type      = MACH_AR71XX_RB_493,
+       }, {
+               .name           = "AW-NR580",
+               .mach_type      = MACH_AR71XX_AW_NR580,
        }
 };
 
index 3702b652c75001bd1015da0213765f3a7b7ef5ec..0249c50080396f43b299b603571ff30846362197 100644 (file)
@@ -16,7 +16,7 @@
  
 --- a/include/asm-mips/bootinfo.h
 +++ b/include/asm-mips/bootinfo.h
-@@ -79,6 +79,16 @@
+@@ -79,6 +79,17 @@
  #define  MACH_LASAT_200               1       /* Masquerade PRO/SP200 */
  
  /*
@@ -28,6 +28,7 @@
 +#define MACH_AR71XX_RB_433    3       /* MikroTik RouterBOARD 433/433AH */
 +#define MACH_AR71XX_RB_450    4       /* MikroTik RouterBOARD 450 */
 +#define MACH_AR71XX_RB_493    5       /* Mikrotik RouterBOARD 493/493AH */
++#define MACH_AR71XX_AW_NR580  6       /* AzureWave AW-NR580 */
 +
 +/*
   * Valid machtype for group NEC EMMA2RH
index 5db99d6a82c94845704bdc9ba720f4329eea42cb..548c06b12da2f6d3dd0262c624f9fe6a50ec9937 100644 (file)
@@ -16,7 +16,7 @@
  
 --- a/include/asm-mips/bootinfo.h
 +++ b/include/asm-mips/bootinfo.h
-@@ -57,6 +57,16 @@
+@@ -57,6 +57,17 @@
  #define       MACH_MIKROTIK_RB532     0       /* Mikrotik RouterBoard 532     */
  #define MACH_MIKROTIK_RB532A  1       /* Mikrotik RouterBoard 532A    */
  
@@ -29,6 +29,7 @@
 +#define MACH_AR71XX_RB_433    3       /* MikroTik RouterBOARD 433/433AH */
 +#define MACH_AR71XX_RB_450    4       /* MikroTik RouterBOARD 450 */
 +#define MACH_AR71XX_RB_493    5       /* MikroTik RouterBOARD 493 */
++#define MACH_AR71XX_AW_NR580  6       /* AzureWave AW-NR580 */
 +
  #define CL_SIZE                       COMMAND_LINE_SIZE