summaryrefslogtreecommitdiffstats
path: root/arch/mips/boards
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2014-03-28 01:26:42 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-28 10:45:54 +0100
commit6839863a854cd1f80c89622360fe5c0fd85b44a7 (patch)
tree5339312a84fd54cb4eed404495568ca6848f812d /arch/mips/boards
parent0b7f8d996d95635d0033c1d9b3c8459085ba1194 (diff)
downloadbarebox-6839863a854cd1f80c89622360fe5c0fd85b44a7.tar.gz
barebox-6839863a854cd1f80c89622360fe5c0fd85b44a7.tar.xz
MIPS: ath79: add tplink-mr3020 board support
This board support code can be used for TP-LINK WR703 too. TP-LINK WR703 is very similar to TP-LINK MR3020, there are some non-essential differences: * WR703 is smaller and cheaper; * WR703 has only one led, but MR3020 has five leds; * MR3020 uses mini-USB connector, WR703 uses micro-USB connector. See https://forum.openwrt.org/viewtopic.php?id=45159 for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/boards')
-rw-r--r--arch/mips/boards/tplink-mr3020/Makefile1
-rw-r--r--arch/mips/boards/tplink-mr3020/board.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/arch/mips/boards/tplink-mr3020/Makefile b/arch/mips/boards/tplink-mr3020/Makefile
new file mode 100644
index 0000000000..dcfc2937d3
--- /dev/null
+++ b/arch/mips/boards/tplink-mr3020/Makefile
@@ -0,0 +1 @@
+obj-y += board.o
diff --git a/arch/mips/boards/tplink-mr3020/board.c b/arch/mips/boards/tplink-mr3020/board.c
new file mode 100644
index 0000000000..318998cc49
--- /dev/null
+++ b/arch/mips/boards/tplink-mr3020/board.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 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.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+
+static int model_hostname_init(void)
+{
+ barebox_set_hostname("mr3020");
+
+ return 0;
+}
+postcore_initcall(model_hostname_init);