From: Lucas Stach <l.stach@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 1/2] ARM: i.MX6ull: Add SoC specific lowlevel_init function
Date: Thu, 28 Sep 2017 11:09:08 +0200 [thread overview]
Message-ID: <1506589748.2283.7.camel@pengutronix.de> (raw)
In-Reply-To: <20170927121657.16274-1-s.hauer@pengutronix.de>
Am Mittwoch, den 27.09.2017, 14:16 +0200 schrieb Sascha Hauer:
> On i.MX6ull (Cortex A7) We have to set the SMP bit before enabling
> the
> caches, otherwise they won't work. Add a SoC specific lowlevel_init
> function to be called by the i.MX6ull boards.
This isn't specific to the MX6ULL, but the Cortex-A7, which is used in
the whole MX6UL family. So I would prefer if this is called imx6ul_...
Also a follow-up commit should switch over the already supported
MX6UL/ULL boards to the new init function.
Regards,
Lucas
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-imx/cpu_init.c | 12 ++++++++++++
> arch/arm/mach-imx/include/mach/generic.h | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-
> imx/cpu_init.c
> index 2b388cad8c..8f6d4b7902 100644
> --- a/arch/arm/mach-imx/cpu_init.c
> +++ b/arch/arm/mach-imx/cpu_init.c
> @@ -14,6 +14,7 @@
>
> #include <asm/barebox-arm-head.h>
> #include <asm/errata.h>
> +#include <linux/types.h>
>
> void imx5_cpu_lowlevel_init(void)
> {
> @@ -34,6 +35,17 @@ void imx6_cpu_lowlevel_init(void)
> enable_arm_errata_845369_war();
> }
>
> +void imx6ull_cpu_lowlevel_init(void)
> +{
> + u32 val;
> +
> + asm volatile ("mrc p15, 0, %0, c1, c0, 1\n" : "=r"(val));
> + val |= (1 << 6);
> + asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (val));
> +
> + arm_cpu_lowlevel_init();
> +}
> +
> void imx7_cpu_lowlevel_init(void)
> {
> arm_cpu_lowlevel_init();
> diff --git a/arch/arm/mach-imx/include/mach/generic.h
> b/arch/arm/mach-imx/include/mach/generic.h
> index 73be9ceb55..eb8c7a5b7b 100644
> --- a/arch/arm/mach-imx/include/mach/generic.h
> +++ b/arch/arm/mach-imx/include/mach/generic.h
> @@ -48,6 +48,7 @@ int imx6_devices_init(void);
>
> void imx5_cpu_lowlevel_init(void);
> void imx6_cpu_lowlevel_init(void);
> +void imx6ull_cpu_lowlevel_init(void);
> void imx7_cpu_lowlevel_init(void);
> void vf610_cpu_lowlevel_init(void);
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2017-09-28 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 12:16 Sascha Hauer
2017-09-27 12:16 ` [PATCH 2/2] i.MX6ull evk support Sascha Hauer
2017-09-28 9:16 ` Lucas Stach
2017-09-28 9:26 ` Sascha Hauer
2017-09-28 9:33 ` Lucas Stach
2017-09-28 10:13 ` Sascha Hauer
2017-10-10 14:04 ` Philipp Zabel
2017-09-28 9:09 ` Lucas Stach [this message]
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=1506589748.2283.7.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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