summaryrefslogtreecommitdiffstats
path: root/arch/mips/boards/dlink-dir-320
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2011-08-05 14:58:40 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-05 18:20:29 +0200
commitccaeb1a00cb4725d8cfe13034f5274cfdefea619 (patch)
tree903c28bbbb8e5025a4193d2b5cfdcc76db7a31ae /arch/mips/boards/dlink-dir-320
parentd507792a51882e9b299068414fb261266c9ab983 (diff)
downloadbarebox-ccaeb1a00cb4725d8cfe13034f5274cfdefea619.tar.gz
barebox-ccaeb1a00cb4725d8cfe13034f5274cfdefea619.tar.xz
MIPS: add initial D-Link DIR-320 wireless router support
Can be started from CFE using tftp, e.g.: CFE> ifconfig eth0 -addr=192.168.0.99 CFE> boot -tftp -addr=a0800000 -raw 192.168.0.1:barebox.bin Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/boards/dlink-dir-320')
-rw-r--r--arch/mips/boards/dlink-dir-320/Kconfig6
-rw-r--r--arch/mips/boards/dlink-dir-320/Makefile1
-rw-r--r--arch/mips/boards/dlink-dir-320/config.h19
-rw-r--r--arch/mips/boards/dlink-dir-320/serial.c43
4 files changed, 69 insertions, 0 deletions
diff --git a/arch/mips/boards/dlink-dir-320/Kconfig b/arch/mips/boards/dlink-dir-320/Kconfig
new file mode 100644
index 0000000000..0393d04530
--- /dev/null
+++ b/arch/mips/boards/dlink-dir-320/Kconfig
@@ -0,0 +1,6 @@
+if BOARD_DLINK_DIR320
+
+config BOARDINFO
+ default "D-Link DIR-320"
+
+endif
diff --git a/arch/mips/boards/dlink-dir-320/Makefile b/arch/mips/boards/dlink-dir-320/Makefile
new file mode 100644
index 0000000000..ff1a655afe
--- /dev/null
+++ b/arch/mips/boards/dlink-dir-320/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_DRIVER_SERIAL_NS16550) += serial.o
diff --git a/arch/mips/boards/dlink-dir-320/config.h b/arch/mips/boards/dlink-dir-320/config.h
new file mode 100644
index 0000000000..eb4ab083c3
--- /dev/null
+++ b/arch/mips/boards/dlink-dir-320/config.h
@@ -0,0 +1,19 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+/* nothing special yet */
diff --git a/arch/mips/boards/dlink-dir-320/serial.c b/arch/mips/boards/dlink-dir-320/serial.c
new file mode 100644
index 0000000000..ebe8c06c7a
--- /dev/null
+++ b/arch/mips/boards/dlink-dir-320/serial.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <types.h>
+#include <driver.h>
+#include <init.h>
+#include <ns16550.h>
+#include <mach/hardware.h>
+#include <asm/io.h>
+#include <asm/common.h>
+
+static struct NS16550_plat serial_plat = {
+ .clock = 25804800,
+ .shift = 0,
+};
+
+static int dir320_console_init(void)
+{
+ /* Register the serial port */
+ add_ns16550_device(-1, DEBUG_LL_UART_ADDR, 8,
+ IORESOURCE_MEM_8BIT, &serial_plat);
+
+ return 0;
+}
+console_initcall(dir320_console_init);