From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
Date: Wed, 02 Oct 2013 08:04:05 +0000 [thread overview]
Message-ID: <20131002080403.GB28462@verge.net.au> (raw)
In-Reply-To: <87txh0yzbj.wl%kuninori.morimoto.gx@renesas.com>
On Tue, Oct 01, 2013 at 11:14:12PM -0700, Kuninori Morimoto wrote:
> This patch enables SMSC on BockW board via DT.
> SMSC interrupt is connected to FPGA, and is connected
> to IRQ0 on BockW.
> This patch enabled INTC IRQ too
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
> arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
> 2 files changed, 46 insertions(+), 1 deletion(-)
Please split this into two patches.
1. A DT patch that modifies r8a7778-bockw-reference.dts
2. A board patch that modifies board-bockw-reference.c
>
> diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> index 9bb903a..4425fd2 100644
> --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> @@ -22,11 +22,36 @@
> compatible = "renesas,bockw-reference", "renesas,r8a7778";
>
> chosen {
> - bootargs = "console=ttySC0,115200 ignore_loglevel rw";
> + bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
> };
>
> memory {
> device_type = "memory";
> reg = <0x60000000 0x10000000>;
> };
> +
> + fixedregulator3v3: fixedregulator@0 {
> + compatible = "regulator-fixed";
> + regulator-name = "fixed-3.3V";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + lan0@18300000 {
> + compatible = "smsc,lan9220", "smsc,lan9115";
> + reg = <0x18300000 0x1000>;
> +
> + phy-mode = "mii";
> + interrupt-parent = <&irqpin>;
> + interrupts = <0 0>; /* IRQ0: hwirq 0 on irqpin */
> + reg-io-width = <4>;
> + vddvario-supply = <&fixedregulator3v3>;
> + vdd33a-supply = <&fixedregulator3v3>;
> + };
> +};
> +
> +&irqpin {
> + status = "okay";
> };
> diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
> index 1a7c893..ae88fda 100644
> --- a/arch/arm/mach-shmobile/board-bockw-reference.c
> +++ b/arch/arm/mach-shmobile/board-bockw-reference.c
> @@ -36,15 +36,35 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
> "scif0_ctrl", "scif0"),
> };
>
> +#define FPGA 0x18200000
> +#define IRQ0MR 0x30
> +#define COMCTLR 0x101c
> static void __init bockw_init(void)
> {
> + static void __iomem *fpga;
> +
> r8a7778_clock_init();
> + r8a7778_init_irq_extpin_dt(1);
>
> pinctrl_register_mappings(bockw_pinctrl_map,
> ARRAY_SIZE(bockw_pinctrl_map));
> r8a7778_pinmux_init();
> r8a7778_add_dt_devices();
>
> + fpga = ioremap_nocache(FPGA, SZ_1M);
> + if (fpga) {
> + /*
> + * CAUTION
> + *
> + * IRQ0/1 is cascaded interrupt from FPGA.
> + * it should be cared in the future
> + * Now, it is assuming IRQ0 was used only from SMSC.
> + */
> + u16 val = ioread16(fpga + IRQ0MR);
> + val &= ~(1 << 4); /* enable SMSC911x */
> + iowrite16(val, fpga + IRQ0MR);
> + }
> +
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> }
>
> --
> 1.7.9.5
>
next prev parent reply other threads:[~2013-10-02 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
2013-10-02 8:04 ` Simon Horman [this message]
2013-10-02 8:06 ` Kuninori Morimoto
2013-10-03 21:21 ` Sergei Shtylyov
2013-10-03 23:56 ` Simon Horman
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=20131002080403.GB28462@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-sh@vger.kernel.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