From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/8] imx: mx6 correct get_cpu_rev
Date: Sat, 27 Jun 2015 18:22:17 +0200 [thread overview]
Message-ID: <558ECDB9.9080904@denx.de> (raw)
In-Reply-To: <1434018642-16990-2-git-send-email-Peng.Fan@freescale.com>
On 11/06/2015 12:30, Peng Fan wrote:
> The DIGPROG register map:
> 23 ------- 16 | 15 ------ 8 | 7 --- 0 |
> Major upper | Major Lower | Minor |
>
> We also need to account for Major Lower.
>
> Signed-off-by: Ye.Li <B37916@freescale.com>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> ---
>
> Changes v2:
> split from PATCH v1 2/8. This piece code should be in a single patch.
>
> arch/arm/cpu/armv7/mx6/soc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index b21bd03..29de624 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -62,6 +62,7 @@ u32 get_cpu_rev(void)
> struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
> u32 reg = readl(&anatop->digprog_sololite);
> u32 type = ((reg >> 16) & 0xff);
> + u32 major;
>
> if (type != MXC_CPU_MX6SL) {
> reg = readl(&anatop->digprog);
> @@ -79,8 +80,9 @@ u32 get_cpu_rev(void)
> }
>
> }
> + major = ((reg >> 8) & 0xff);
> reg &= 0xff; /* mx6 silicon revision */
> - return (type << 12) | (reg + 0x10);
> + return (type << 12) | (reg + (0x10 * (major + 1)));
> }
>
> /*
>
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2015-06-27 16:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 10:30 [U-Boot] [PATCH v2 1/8] imx: mx6 correct is_soc_rev usage Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 2/8] imx: mx6 correct get_cpu_rev Peng Fan
2015-06-27 16:22 ` Stefano Babic [this message]
2015-06-11 10:30 ` [U-Boot] [PATCH v2 3/8] imx: mx6 introuduce macro is_mx6dqp Peng Fan
2015-06-27 16:22 ` Stefano Babic
2015-06-11 10:30 ` [U-Boot] [PATCH v2 4/8] imx: mx6: ccm: Change the clock settings for i.MX6QP Peng Fan
2015-06-27 16:44 ` Stefano Babic
2015-06-29 1:50 ` Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 5/8] imx: mx6: hab : Remove the cache issue workaroud in hab " Peng Fan
2015-06-11 10:30 ` [U-Boot] [PATCH v2 6/8] imx: mx6qp Enable PRG clock and AQoS setting for IPU Peng Fan
2015-06-27 17:04 ` Stefano Babic
2015-06-27 21:10 ` Fabio Estevam
2015-06-11 10:30 ` [U-Boot] [PATCH v2 7/8] imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support Peng Fan
2015-06-27 17:08 ` Stefano Babic
2015-06-29 2:05 ` Peng Fan
2015-06-29 7:26 ` Stefano Babic
2015-06-29 8:06 ` Peng Fan
2015-06-29 8:19 ` Stefano Babic
2015-06-29 12:02 ` Fabio Estevam
2015-06-29 12:26 ` Peng Fan
2015-06-27 17:11 ` Fabio Estevam
2015-06-11 10:30 ` [U-Boot] [PATCH v2 8/8] imx: mx6qp: Adjust AQos settings for peripherals Peng Fan
2015-06-27 17:09 ` Stefano Babic
2015-06-27 16:17 ` [U-Boot] [PATCH v2 1/8] imx: mx6 correct is_soc_rev usage Stefano Babic
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=558ECDB9.9080904@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.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