From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 7/9] MIPS: ath79: add tplink-mr3020 board support
Date: Fri, 28 Mar 2014 10:44:00 +0100 [thread overview]
Message-ID: <20140328094400.GG17250@pengutronix.de> (raw)
In-Reply-To: <1395955604-12826-8-git-send-email-antonynpavlov@gmail.com>
On Fri, Mar 28, 2014 at 01:26:42AM +0400, Antony Pavlov wrote:
> 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>
> ---
> arch/mips/Makefile | 1 +
> arch/mips/boards/tplink-mr3020/Makefile | 1 +
> arch/mips/boards/tplink-mr3020/board.c | 27 +++++++++++++++++++++++++++
> arch/mips/dts/tplink-mr3020.dts | 18 ++++++++++++++++++
> arch/mips/mach-ath79/Kconfig | 8 ++++++++
> 5 files changed, 55 insertions(+)
>
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 5ca5fc9..b3bacf3 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -79,6 +79,7 @@ machine-$(CONFIG_MACH_MIPS_AR231X) := ar231x
> board-$(CONFIG_BOARD_NETGEAR_WG102) := netgear-wg102
>
> machine-$(CONFIG_MACH_MIPS_ATH79) := ath79
> +board-$(CONFIG_BOARD_TPLINK_MR3020) := tplink-mr3020
>
> machine-$(CONFIG_MACH_MIPS_BCM47XX) := bcm47xx
> board-$(CONFIG_BOARD_DLINK_DIR320) := dlink-dir-320
> diff --git a/arch/mips/boards/tplink-mr3020/Makefile b/arch/mips/boards/tplink-mr3020/Makefile
> new file mode 100644
> index 0000000..dcfc293
> --- /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 0000000..318998c
> --- /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);
> diff --git a/arch/mips/dts/tplink-mr3020.dts b/arch/mips/dts/tplink-mr3020.dts
> new file mode 100644
> index 0000000..b9539c5
> --- /dev/null
> +++ b/arch/mips/dts/tplink-mr3020.dts
> @@ -0,0 +1,18 @@
> +/dts-v1/;
> +
> +#include <ar9331.dtsi>
> +
> +/ {
> + model = "TP-LINK MR3020";
> + compatible = "tplink,mr3020";
> +
> + memory {
> + reg = <0x00000000 0x2000000>;
> + };
> +
> + soc {
> + serial0: serial@b8020000 {
> + status = "okay";
> + };
> + };
This can be easier written as:
&serial0 {
status = "okay";
};
With bigger board dts files this is much nicer since you don't have to
resemble the tree structure in your board dts.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-03-28 9:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 21:26 [PATCH 0/9] MIPS: add Atheros AR933x SoC & TP-LINK MR3020 " Antony Pavlov
2014-03-27 21:26 ` [PATCH 1/9] MIPS: lib: add BAREBOX_CLK_TABLE to linker script Antony Pavlov
2014-03-27 21:26 ` [PATCH 2/9] MIPS: add Atheros ar933x family support Antony Pavlov
2014-03-27 21:26 ` [PATCH 3/9] MIPS: ath79: add DEBUG_LL support for Atheros AR933x Antony Pavlov
2014-03-27 21:26 ` [PATCH 4/9] serial: add Atheros AR933x driver Antony Pavlov
2014-03-27 21:26 ` [PATCH 5/9] clk: " Antony Pavlov
2014-03-27 21:26 ` [PATCH 6/9] MIPS: ath79: ar9331: add devicetree files Antony Pavlov
2014-03-27 21:26 ` [PATCH 7/9] MIPS: ath79: add tplink-mr3020 board support Antony Pavlov
2014-03-28 9:44 ` Sascha Hauer [this message]
2014-03-27 21:26 ` [PATCH 8/9] MIPS: tplink-mr3020: add documentation Antony Pavlov
2014-03-27 21:26 ` [PATCH 9/9] MIPS: add tplink-mr3020_defconfig Antony Pavlov
2014-03-28 9:28 ` [PATCH 0/9] MIPS: add Atheros AR933x SoC & TP-LINK MR3020 board support Antony Pavlov
2014-03-28 9:38 ` Sascha Hauer
2014-03-28 10:39 ` Antony Pavlov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140328094400.GG17250@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox