devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Bai Ping <b51503@freescale.com>
Cc: kernel@pengutronix.de, pawel.moll@arm.com, robh+dt@kernel.org,
	mturquette@baylibre.com, sboyd@codeaurora.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 5/5] ARM: imx: Add msl code support for imx6qp
Date: Thu, 28 Jan 2016 16:10:40 +0800	[thread overview]
Message-ID: <20160128081040.GO9070@tiger> (raw)
In-Reply-To: <1450159673-27314-6-git-send-email-b51503@freescale.com>

On Tue, Dec 15, 2015 at 02:07:53PM +0800, Bai Ping wrote:
> The i.MX6QP is a different SOC, but internally we treate
> it as i.MX6Q Rev_2.0 to maximum the code reusability. The chip
> silicon number we read from the ANADIG_DIGPROG is 0x630100. This
> patch add code to identify it as i.MX6QP Rev_1.0 when print out the
> silicon version.
> 
> Signed-off-by: Bai Ping <b51503@freescale.com>
> ---
>  arch/arm/mach-imx/anatop.c     | 5 ++++-
>  arch/arm/mach-imx/mach-imx6q.c | 8 ++++++--
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c
> index 231bb25..9622763 100644
> --- a/arch/arm/mach-imx/anatop.c
> +++ b/arch/arm/mach-imx/anatop.c
> @@ -129,7 +129,10 @@ void __init imx_init_revision_from_anatop(void)
>  
>  	switch (digprog & 0xff) {
>  	case 0:
> -		revision = IMX_CHIP_REVISION_1_0;
> +		if (digprog >> 8 & 0x01)
> +			revision = IMX_CHIP_REVISION_2_0;
> +		else
> +			revision = IMX_CHIP_REVISION_1_0;

Please at least add some comment here to help us remember that this is
a trick we play for i.MX6QP.

Shawn

>  		break;
>  	case 1:
>  		revision = IMX_CHIP_REVISION_1_1;
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 3878494b..cb27d56 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -266,8 +266,11 @@ static void __init imx6q_init_machine(void)
>  {
>  	struct device *parent;
>  
> -	imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
> -			      imx_get_soc_revision());
> +	if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_2_0)
> +		imx_print_silicon_rev("i.MX6QP", IMX_CHIP_REVISION_1_0);
> +	else
> +		imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q",
> +				imx_get_soc_revision());
>  
>  	parent = imx_soc_device_init();
>  	if (parent == NULL)
> @@ -399,6 +402,7 @@ static void __init imx6q_init_irq(void)
>  static const char * const imx6q_dt_compat[] __initconst = {
>  	"fsl,imx6dl",
>  	"fsl,imx6q",
> +	"fsl,imx6qp",
>  	NULL,
>  };
>  
> -- 
> 1.9.1
> 
> 

  reply	other threads:[~2016-01-28  8:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15  6:07 [PATCH v2 0/5] Add support for imx6qp Bai Ping
2015-12-15  6:07 ` [PATCH v2 1/5] ARM: dts: imx: Add basic dts support for imx6qp SOC Bai Ping
2016-01-28  7:42   ` Shawn Guo
2016-01-28 10:38     ` Ping Bai
2015-12-15  6:07 ` [PATCH v2 2/5] ARM: dts: imx: Add basic dts support for imx6qp-sabresd Bai Ping
2016-01-28  7:54   ` Shawn Guo
2016-01-28 10:43     ` Ping Bai
2015-12-15  6:07 ` [PATCH v2 3/5] ARM: dts: imx: Add basic dts support for imx6qp-sabreauto Bai Ping
2016-01-28  7:57   ` Shawn Guo
2015-12-15  6:07 ` [PATCH v2 4/5] clk: imx: Add clock support for imx6qp Bai Ping
2015-12-15  6:07 ` [PATCH v2 5/5] ARM: imx: Add msl code " Bai Ping
2016-01-28  8:10   ` Shawn Guo [this message]
2016-01-28 10:45     ` Ping Bai

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=20160128081040.GO9070@tiger \
    --to=shawnguo@kernel.org \
    --cc=b51503@freescale.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.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;
as well as URLs for NNTP newsgroup(s).