From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Olof Johansson <olof@lixom.net>,
linux-tegra@vger.kernel.org, Stephen Warren <swarren@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
Colin Cross <ccross@android.com>
Subject: Re: [PATCH V2 1/3] ARM: tegra: trimslice: enable PCIe when booting from device tree
Date: Tue, 22 May 2012 11:17:04 +0100 [thread overview]
Message-ID: <4FBB67A0.9010606@codethink.co.uk> (raw)
In-Reply-To: <1337289674-18581-1-git-send-email-swarren@wwwdotorg.org>
On 17/05/12 22:21, Stephen Warren wrote:
> From: Stephen Warren<swarren@nvidia.com>
>
> There currently aren't bindings for the Tegra PCIe controller. Work on
> this is in progress, but not yet complete. Manually initialize PCIe when
> booting from device tree, in order to bring DT support to the same
> feature level as board files, which will in turn allow board files to be
> deprecated.
>
> PCIe hosts the wired Ethernet controller on TrimSlice.
>
> To support this, add infra-structure to board-dt-tegra20.c for board-
> specific initialization code. Once device tree support for the relevant
> features is in place, this code will be removed.
>
> Signed-off-by: Stephen Warren<swarren@nvidia.com>
> ---
> v2: Use .init_late hook in DT_MACHINE_START instead of an explicit late
> initcall.
> ---
> arch/arm/mach-tegra/board-dt-tegra20.c | 36 +++++++++++++++++++++++++++++++-
> 1 files changed, 35 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
> index eb7249d..9537f20 100644
> --- a/arch/arm/mach-tegra/board-dt-tegra20.c
> +++ b/arch/arm/mach-tegra/board-dt-tegra20.c
> @@ -98,6 +98,40 @@ static void __init tegra_dt_init(void)
> tegra20_auxdata_lookup, NULL);
> }
>
> +#ifdef CONFIG_MACH_TRIMSLICE
> +static void __init trimslice_init(void)
> +{
> + int ret;
> +
> + ret = tegra_pcie_init(true, true);
> + if (ret)
> + pr_err("tegra_pci_init() failed: %d\n", ret);
> +}
> +#endif
Given the size of some of these functions, is it worth even
bothering with an #ifdef around them, especially as they are
marked init.
How about having some sort of standard pcie binding for the pcie
part?
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
WARNING: multiple messages have this Message-ID (diff)
From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/3] ARM: tegra: trimslice: enable PCIe when booting from device tree
Date: Tue, 22 May 2012 11:17:04 +0100 [thread overview]
Message-ID: <4FBB67A0.9010606@codethink.co.uk> (raw)
In-Reply-To: <1337289674-18581-1-git-send-email-swarren@wwwdotorg.org>
On 17/05/12 22:21, Stephen Warren wrote:
> From: Stephen Warren<swarren@nvidia.com>
>
> There currently aren't bindings for the Tegra PCIe controller. Work on
> this is in progress, but not yet complete. Manually initialize PCIe when
> booting from device tree, in order to bring DT support to the same
> feature level as board files, which will in turn allow board files to be
> deprecated.
>
> PCIe hosts the wired Ethernet controller on TrimSlice.
>
> To support this, add infra-structure to board-dt-tegra20.c for board-
> specific initialization code. Once device tree support for the relevant
> features is in place, this code will be removed.
>
> Signed-off-by: Stephen Warren<swarren@nvidia.com>
> ---
> v2: Use .init_late hook in DT_MACHINE_START instead of an explicit late
> initcall.
> ---
> arch/arm/mach-tegra/board-dt-tegra20.c | 36 +++++++++++++++++++++++++++++++-
> 1 files changed, 35 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
> index eb7249d..9537f20 100644
> --- a/arch/arm/mach-tegra/board-dt-tegra20.c
> +++ b/arch/arm/mach-tegra/board-dt-tegra20.c
> @@ -98,6 +98,40 @@ static void __init tegra_dt_init(void)
> tegra20_auxdata_lookup, NULL);
> }
>
> +#ifdef CONFIG_MACH_TRIMSLICE
> +static void __init trimslice_init(void)
> +{
> + int ret;
> +
> + ret = tegra_pcie_init(true, true);
> + if (ret)
> + pr_err("tegra_pci_init() failed: %d\n", ret);
> +}
> +#endif
Given the size of some of these functions, is it worth even
bothering with an #ifdef around them, especially as they are
marked init.
How about having some sort of standard pcie binding for the pcie
part?
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
next prev parent reply other threads:[~2012-05-22 10:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 21:21 [PATCH V2 1/3] ARM: tegra: trimslice: enable PCIe when booting from device tree Stephen Warren
2012-05-17 21:21 ` Stephen Warren
2012-05-22 10:17 ` Ben Dooks [this message]
2012-05-22 10:17 ` Ben Dooks
[not found] ` <4FBB67A0.9010606-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2012-05-22 16:18 ` Stephen Warren
2012-05-22 16:18 ` Stephen Warren
[not found] ` <1337289674-18581-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-17 21:21 ` [PATCH V2 2/3] ARM: tegra: harmony: init regulators, PCIe when booting from DT Stephen Warren
2012-05-17 21:21 ` Stephen Warren
2012-05-17 21:21 ` [PATCH V2 3/3] ARM: tegra: paz00: enable WiFi rfkill when booting from device tree Stephen Warren
2012-05-17 21:21 ` Stephen Warren
2012-06-04 17:46 ` [PATCH V2 1/3] ARM: tegra: trimslice: enable PCIe " Stephen Warren
2012-06-04 17:46 ` Stephen Warren
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=4FBB67A0.9010606@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=ccross@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=olof@lixom.net \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.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.