From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: kirkwood: covert orion-spi to fdt.
Date: Tue, 28 Feb 2012 19:22:11 +0000 [thread overview]
Message-ID: <201202281922.12084.arnd@arndb.de> (raw)
In-Reply-To: <10078cadd3ab4e8f2a0a642f810be6adbec4d477.1330454040.git.jason@lakedaemon.net>
On Tuesday 28 February 2012, Jason Cooper wrote:
> On the Globalscale Dreamplug (Marvell Kirkwood Development Platform),
> 2MB of NOR flash are used to hold the bootloader, bootloader
> environment, and devicetree blob. It is connected via spi.
>
> diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
> index cc15426..4868dbd 100644
> --- a/arch/arm/mach-kirkwood/common.c
> +++ b/arch/arm/mach-kirkwood/common.c
> @@ -524,6 +526,11 @@ static int __init kirkwood_clock_gate(void)
> } else /* keep this bit set for devices that don't have PCIe1 */
> kirkwood_clk_ctrl |= CGC_PEX1;
>
> + dp = of_find_node_by_path("/");
> + if (dp && of_device_is_available(of_find_compatible_node(dp, NULL,
> + "marvell,orion-spi")))
> + kirkwood_clk_ctrl |= CGC_RUNIT;
> +
> /* Now gate clock the required units */
> writel(kirkwood_clk_ctrl, CLOCK_GATING_CTRL);
> printk(KERN_DEBUG " after: 0x%08x\n", readl(CLOCK_GATING_CTRL));
I think this needs to move to the board-dt.c file as Andrew suggested,
or you have to put the #ifdef back, otherwise you get a link error
because of_find_node_by_path does not have a fallback with CONFIG_OF
not set.
Everything else looks good to me now.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Jason Cooper <jason@lakedaemon.net>
Cc: grant.likely@secretlab.ca, Andrew Lunn <andrew@lunn.ch>,
devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: kirkwood: covert orion-spi to fdt.
Date: Tue, 28 Feb 2012 19:22:11 +0000 [thread overview]
Message-ID: <201202281922.12084.arnd@arndb.de> (raw)
In-Reply-To: <10078cadd3ab4e8f2a0a642f810be6adbec4d477.1330454040.git.jason@lakedaemon.net>
On Tuesday 28 February 2012, Jason Cooper wrote:
> On the Globalscale Dreamplug (Marvell Kirkwood Development Platform),
> 2MB of NOR flash are used to hold the bootloader, bootloader
> environment, and devicetree blob. It is connected via spi.
>
> diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
> index cc15426..4868dbd 100644
> --- a/arch/arm/mach-kirkwood/common.c
> +++ b/arch/arm/mach-kirkwood/common.c
> @@ -524,6 +526,11 @@ static int __init kirkwood_clock_gate(void)
> } else /* keep this bit set for devices that don't have PCIe1 */
> kirkwood_clk_ctrl |= CGC_PEX1;
>
> + dp = of_find_node_by_path("/");
> + if (dp && of_device_is_available(of_find_compatible_node(dp, NULL,
> + "marvell,orion-spi")))
> + kirkwood_clk_ctrl |= CGC_RUNIT;
> +
> /* Now gate clock the required units */
> writel(kirkwood_clk_ctrl, CLOCK_GATING_CTRL);
> printk(KERN_DEBUG " after: 0x%08x\n", readl(CLOCK_GATING_CTRL));
I think this needs to move to the board-dt.c file as Andrew suggested,
or you have to put the #ifdef back, otherwise you get a link error
because of_find_node_by_path does not have a fallback with CONFIG_OF
not set.
Everything else looks good to me now.
Arnd
next prev parent reply other threads:[~2012-02-28 19:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 22:31 [PATCH WIP] ARM: kirkwood: covert orion-spi to fdt Jason Cooper
2012-02-27 22:31 ` Jason Cooper
2012-02-28 7:39 ` Arnd Bergmann
2012-02-28 7:39 ` Arnd Bergmann
2012-02-28 15:25 ` Jason
2012-02-28 15:25 ` Jason
2012-02-28 16:07 ` Arnd Bergmann
2012-02-28 16:07 ` Arnd Bergmann
2012-02-28 18:43 ` [PATCH v2] " Jason Cooper
2012-02-28 18:43 ` Jason Cooper
2012-02-28 19:22 ` Arnd Bergmann [this message]
2012-02-28 19:22 ` Arnd Bergmann
2012-02-28 19:35 ` [PATCH v3] " Jason Cooper
2012-02-28 19:35 ` Jason Cooper
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=201202281922.12084.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.