From fc057cea384990dcf0b445d68750b3df4358c395 Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 18 Nov 2008 13:21:24 +0000 Subject: [ar71xx] add experimental support for the AzureWave AW-NR580 board git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13278 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig | 4 +++ .../linux/ar71xx/files/arch/mips/ar71xx/Makefile | 1 + .../ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c | 39 ++++++++++++++++++++++ target/linux/ar71xx/files/arch/mips/ar71xx/prom.c | 3 ++ 4 files changed, 47 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c (limited to 'target/linux/ar71xx/files') diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig index 8640b2cc5..d8ae08577 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig @@ -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 diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile index 6e7ab1d48..175c43e91 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile @@ -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 index 000000000..0e22bf5fe --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c @@ -0,0 +1,39 @@ +/* + * AzureWave AW-NR580 board support + * + * Copyright (C) 2008 Gabor Juhos + * Copyright (C) 2008 Imre Kaloz + * + * 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 +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +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); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c index 1d55328aa..cd6f26cda 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/prom.c @@ -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, } }; -- cgit v1.2.3