linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: Abel Vesa <abel.vesa@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Jacky Bai <ping.bai@nxp.com>
Cc: dl-linux-imx <linux-imx@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stefan@agner.ch" <stefan@agner.ch>,
	"abelvesa@linux.com" <abelvesa@linux.com>,
	"spencercw@gmail.com" <spencercw@gmail.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Anson Huang <anson.huang@nxp.com>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH v2] soc: imx: Add generic i.MX8 SoC driver
Date: Tue, 26 Feb 2019 13:34:52 +0000	[thread overview]
Message-ID: <dff8a3aa9dd6501280300654f085f07c87d4cd23.camel@nxp.com> (raw)
In-Reply-To: <1551178385-14572-1-git-send-email-abel.vesa@nxp.com>

On Tue, 2019-02-26 at 10:53 +0000, Abel Vesa wrote:
> Add generic i.MX8 SoC driver along with the i.MX8MQ SoC specific code.
> For now, only i.MX8MQ revision B1 is supported. For any other, i.MX8MQ
> revision it will print 'unknown'.
> 
> +	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-ocotp");
> +	if (!np)
> +		goto out;
> +
> +	ocotp_base = of_iomap(np, 0);
> +	WARN_ON(!ocotp_base);
> +
> +	magic = readl_relaxed(ocotp_base + IMX8MQ_SW_INFO_B1);
> +	if (magic == IMX8MQ_SW_MAGIC_B1)
> +		rev = REV_B1;

Turns out that imx8mq version determination is uniquely messy. I think
we should try to print the revision number even for older chips so that
we know how old they are, but this code can be enhanced in later
patches.

In the vendor tree we handle this with a SIP call to ATF, it's not
clear why we shouldn't just upstream that (in both ATF and Linux).

Also, there are some imx soc revision declarations in
include/soc/imx/revision.h. Those are implemented in arch/arm/mach-imx
for older chips, would it make sense for soc-imx8 to define
imx_get_soc_revision?

--
Regards,
Leonard

  parent reply	other threads:[~2019-02-26 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 10:53 [PATCH v2] soc: imx: Add generic i.MX8 SoC driver Abel Vesa
2019-02-26 11:34 ` Chris Spencer
2019-02-26 13:34 ` Leonard Crestez [this message]
2019-02-27  8:41   ` Abel Vesa
2019-02-27 13:15     ` Leonard Crestez
2019-02-26 13:37 ` Fabio Estevam
2019-02-26 13:38   ` Fabio Estevam

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=dff8a3aa9dd6501280300654f085f07c87d4cd23.camel@nxp.com \
    --to=leonard.crestez@nxp.com \
    --cc=abel.vesa@nxp.com \
    --cc=abelvesa@linux.com \
    --cc=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ping.bai@nxp.com \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=spencercw@gmail.com \
    --cc=stefan@agner.ch \
    /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).