From: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
To: Peter De Schrijver
<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4 04/10] arm/tegra: prepare early init for multiple tegra variants
Date: Fri, 11 Nov 2011 11:45:21 +0000 [thread overview]
Message-ID: <20111111114521.GB5114@totoro> (raw)
In-Reply-To: <1321010541-31337-5-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Hi Peter,
On Fri, Nov 11, 2011 at 01:22:10PM +0200, Peter De Schrijver wrote:
> This patch splits the early init code in a common and a tegra20 specific part.
> L2 cache initialization is generalized and discovers the cache associativity
> at runtime. Also use arm_pm_restart instead of arm_arch_reset and reset the
> the system using the PMC reset feature rather then the CAR system reset.
>
> Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm/mach-tegra/board-dt.c | 21 ++++++++++++++
> arch/arm/mach-tegra/board-harmony.c | 2 +-
> arch/arm/mach-tegra/board-paz00.c | 2 +-
> arch/arm/mach-tegra/board-seaboard.c | 6 ++--
> arch/arm/mach-tegra/board-trimslice.c | 2 +-
> arch/arm/mach-tegra/board.h | 6 ++--
> arch/arm/mach-tegra/clock.c | 5 ---
> arch/arm/mach-tegra/common.c | 47 ++++++++++++++++++++++----------
> 8 files changed, 62 insertions(+), 29 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
> index d368f8d..15ee974 100644
> --- a/arch/arm/mach-tegra/board-dt.c
> +++ b/arch/arm/mach-tegra/board-dt.c
> @@ -118,6 +118,27 @@ static void __init tegra_dt_init(void)
> of_platform_populate(NULL, tegra_dt_match_table, tegra20_auxdata_lookup, NULL);
> }
>
> +static struct {
> + const char *machine;
> + void (*init)(void);
> +} early_init[] __initdata = {
> +#ifdef CONFIG_ARCH_TEGRA_2x_SOC
> + { "nvidia,tegra20", tegra20_init_early },
> +#endif
> +};
> +
> +static void __init tegra_init_early(void)
> +{
> +
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(early_init); i++)
> + if (of_machine_is_compatible(early_init[i].machine))
> + return early_init[i].init();
> +
> + pr_warn("Unknown platform detected\n");
> +}
Wouldn't it be better just to have separate machine descs for tegra20
and tegra30 and have a different .init_early for each? I'm not sure
that this extra indirection buys us much, especially if we had to repeat
it for any of the other entries.
Jamie
next prev parent reply other threads:[~2011-11-11 11:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 11:22 [PATCH v4 00/10] Add support for tegra30 and cardhu Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 01/10] arm/tegra: initial device tree for tegra30 Peter De Schrijver
[not found] ` <1321010541-31337-2-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-12 3:26 ` Rob Herring
[not found] ` <4EBDE766.5080505-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-11-14 15:25 ` Peter De Schrijver
[not found] ` <20111114152518.GJ19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2011-11-14 15:41 ` Rob Herring
[not found] ` <4EC13699.5030205-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-11-14 16:06 ` Peter De Schrijver
[not found] ` <20111114160633.GK19069-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2011-11-14 16:20 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF1740805A80-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-14 16:49 ` Rob Herring
2011-11-11 11:22 ` [PATCH v4 02/10] arm/tegra: cleanup tegra20 support Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 04/10] arm/tegra: prepare early init for multiple tegra variants Peter De Schrijver
[not found] ` <1321010541-31337-5-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-11 11:45 ` Jamie Iles [this message]
2011-11-11 21:54 ` Stephen Warren
2011-11-11 21:53 ` Stephen Warren
[not found] ` <1321010541-31337-1-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-11 11:22 ` [PATCH v4 03/10] arm/tegra: prepare clock code " Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 05/10] arm/tegra: rename tegra20 pinmux files Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 08/10] arm/tegra: pinmux tables and definitions for tegra30 Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 10/10] arm/tegra: add support for tegra30 based board cardhu Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 06/10] arm/tegra: prepare pinmux code for multiple tegra variants Peter De Schrijver
[not found] ` <1321010541-31337-7-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-11 22:00 ` Stephen Warren
2011-11-11 11:22 ` [PATCH v4 07/10] arm/tegra: add new fields to struct tegra_pingroup_desc Peter De Schrijver
2011-11-11 11:22 ` [PATCH v4 09/10] arm/tegra: implement support for tegra30 Peter De Schrijver
[not found] ` <1321010541-31337-10-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-11-11 22:02 ` Stephen Warren
2011-11-11 21:40 ` [PATCH v4 00/10] Add support for tegra30 and cardhu 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=20111111114521.GB5114@totoro \
--to=jamie-wmlquqddiekakbo8gow8eq@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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