[RFC, PATCH v2 3/3] MIPS: ar231x: add netgear-wg102

Oleksij Rempel linux at rempel-privat.de
Wed May 22 03:49:49 EDT 2013


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 arch/mips/Makefile                      |  1 +
 arch/mips/boards/netgear-wg102/Kconfig  |  6 ++++++
 arch/mips/boards/netgear-wg102/Makefile |  1 +
 arch/mips/boards/netgear-wg102/ram.c    | 13 +++++++++++++
 arch/mips/mach-ar231x/Kconfig           | 10 ++++++++++
 5 files changed, 31 insertions(+)
 create mode 100644 arch/mips/boards/netgear-wg102/Kconfig
 create mode 100644 arch/mips/boards/netgear-wg102/Makefile
 create mode 100644 arch/mips/boards/netgear-wg102/ram.c

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 135259f..dc0fe56 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -73,6 +73,7 @@ machine-$(CONFIG_MACH_MIPS_MALTA)	:= malta
 board-$(CONFIG_BOARD_QEMU_MALTA)	:= qemu-malta
 
 machine-$(CONFIG_MACH_MIPS_AR231X)	:= ar231x
+board-$(CONFIG_BOARD_NETGEAR_WG102)	:= netgear-wg102
 
 machine-$(CONFIG_MACH_MIPS_BCM47XX)	:= bcm47xx
 board-$(CONFIG_BOARD_DLINK_DIR320)	:= dlink-dir-320
diff --git a/arch/mips/boards/netgear-wg102/Kconfig b/arch/mips/boards/netgear-wg102/Kconfig
new file mode 100644
index 0000000..ceca6de
--- /dev/null
+++ b/arch/mips/boards/netgear-wg102/Kconfig
@@ -0,0 +1,6 @@
+if BOARD_NETGEAR_WG102
+
+config BOARDINFO
+	default "Netgear WG102"
+
+endif
diff --git a/arch/mips/boards/netgear-wg102/Makefile b/arch/mips/boards/netgear-wg102/Makefile
new file mode 100644
index 0000000..0899b66
--- /dev/null
+++ b/arch/mips/boards/netgear-wg102/Makefile
@@ -0,0 +1 @@
+obj-y += ram.o
diff --git a/arch/mips/boards/netgear-wg102/ram.c b/arch/mips/boards/netgear-wg102/ram.c
new file mode 100644
index 0000000..43beb52
--- /dev/null
+++ b/arch/mips/boards/netgear-wg102/ram.c
@@ -0,0 +1,13 @@
+#include <common.h>
+#include <init.h>
+#include <sizes.h>
+#include <asm/memory.h>
+
+static int mem_init(void)
+{
+	/* FIXME: theoretically we can calculate ram size */
+	mips_add_ram0(SZ_16M);
+
+	return 0;
+}
+mem_initcall(mem_init);
diff --git a/arch/mips/mach-ar231x/Kconfig b/arch/mips/mach-ar231x/Kconfig
index 7694fe2..1c6a12f 100644
--- a/arch/mips/mach-ar231x/Kconfig
+++ b/arch/mips/mach-ar231x/Kconfig
@@ -4,4 +4,14 @@ config ARCH_TEXT_BASE
 	hex
 	default 0xa0800000
 
+choice
+	prompt "Board type"
+
+config BOARD_NETGEAR_WG102
+	bool "Netgear WG102"
+
+endchoice
+
+source arch/mips/boards/netgear-wg102/Kconfig
+
 endif
-- 
1.8.1.2




More information about the barebox mailing list