All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
@ 2020-06-09 13:15 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 13:15 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, leonard.crestez, abel.vesa,
	l.stach, peng.fan, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Correct i.MX8MP UID fuse offset according to fuse map:

UID_LOW: 0x420
UID_HIGH: 0x430

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/soc/imx/soc-imx8m.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
index 7b0759a..0bc8314 100644
--- a/drivers/soc/imx/soc-imx8m.c
+++ b/drivers/soc/imx/soc-imx8m.c
@@ -22,6 +22,8 @@
 #define OCOTP_UID_LOW			0x410
 #define OCOTP_UID_HIGH			0x420
 
+#define IMX8MP_OCOTP_UID_OFFSET		0x10
+
 /* Same as ANADIG_DIGPROG_IMX7D */
 #define ANADIG_DIGPROG_IMX8MM	0x800
 
@@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
 {
 	void __iomem *ocotp_base;
 	struct device_node *np;
+	u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
+		     IMX8MP_OCOTP_UID_OFFSET : 0;
 
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
 	if (!np)
@@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
 	ocotp_base = of_iomap(np, 0);
 	WARN_ON(!ocotp_base);
 
-	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
+	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
 	soc_uid <<= 32;
-	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
+	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);
 
 	iounmap(ocotp_base);
 	of_node_put(np);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
@ 2020-06-09 13:15 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 13:15 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, leonard.crestez, abel.vesa,
	l.stach, peng.fan, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Correct i.MX8MP UID fuse offset according to fuse map:

UID_LOW: 0x420
UID_HIGH: 0x430

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/soc/imx/soc-imx8m.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
index 7b0759a..0bc8314 100644
--- a/drivers/soc/imx/soc-imx8m.c
+++ b/drivers/soc/imx/soc-imx8m.c
@@ -22,6 +22,8 @@
 #define OCOTP_UID_LOW			0x410
 #define OCOTP_UID_HIGH			0x420
 
+#define IMX8MP_OCOTP_UID_OFFSET		0x10
+
 /* Same as ANADIG_DIGPROG_IMX7D */
 #define ANADIG_DIGPROG_IMX8MM	0x800
 
@@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
 {
 	void __iomem *ocotp_base;
 	struct device_node *np;
+	u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
+		     IMX8MP_OCOTP_UID_OFFSET : 0;
 
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
 	if (!np)
@@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
 	ocotp_base = of_iomap(np, 0);
 	WARN_ON(!ocotp_base);
 
-	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
+	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
 	soc_uid <<= 32;
-	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
+	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);
 
 	iounmap(ocotp_base);
 	of_node_put(np);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
  2020-06-09 13:15 ` Anson Huang
@ 2020-06-09 15:23   ` Iuliana Prodan
  -1 siblings, 0 replies; 8+ messages in thread
From: Iuliana Prodan @ 2020-06-09 15:23 UTC (permalink / raw)
  To: Anson Huang, shawnguo, s.hauer, kernel, festevam,
	leonard.crestez, abel.vesa, l.stach, peng.fan, linux-arm-kernel,
	linux-kernel
  Cc: Linux-imx



On 6/9/2020 4:15 PM, Anson Huang wrote:
> Correct i.MX8MP UID fuse offset according to fuse map:
> 
> UID_LOW: 0x420
> UID_HIGH: 0x430
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

If this patch corrects the imx8mp UID shouldn't have a Fixes tag?

> ---
>   drivers/soc/imx/soc-imx8m.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
> index 7b0759a..0bc8314 100644
> --- a/drivers/soc/imx/soc-imx8m.c
> +++ b/drivers/soc/imx/soc-imx8m.c
> @@ -22,6 +22,8 @@
>   #define OCOTP_UID_LOW			0x410
>   #define OCOTP_UID_HIGH			0x420
>   
> +#define IMX8MP_OCOTP_UID_OFFSET		0x10
> +
>   /* Same as ANADIG_DIGPROG_IMX7D */
>   #define ANADIG_DIGPROG_IMX8MM	0x800
>   
> @@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
>   {
>   	void __iomem *ocotp_base;
>   	struct device_node *np;
> +	u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
> +		     IMX8MP_OCOTP_UID_OFFSET : 0;
>   
>   	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
>   	if (!np)
> @@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
>   	ocotp_base = of_iomap(np, 0);
>   	WARN_ON(!ocotp_base);
>   
> -	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
> +	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
>   	soc_uid <<= 32;
> -	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
> +	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);
>   
>   	iounmap(ocotp_base);
>   	of_node_put(np);
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
@ 2020-06-09 15:23   ` Iuliana Prodan
  0 siblings, 0 replies; 8+ messages in thread
From: Iuliana Prodan @ 2020-06-09 15:23 UTC (permalink / raw)
  To: Anson Huang, shawnguo, s.hauer, kernel, festevam,
	leonard.crestez, abel.vesa, l.stach, peng.fan, linux-arm-kernel,
	linux-kernel
  Cc: Linux-imx



On 6/9/2020 4:15 PM, Anson Huang wrote:
> Correct i.MX8MP UID fuse offset according to fuse map:
> 
> UID_LOW: 0x420
> UID_HIGH: 0x430
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

If this patch corrects the imx8mp UID shouldn't have a Fixes tag?

> ---
>   drivers/soc/imx/soc-imx8m.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/imx/soc-imx8m.c b/drivers/soc/imx/soc-imx8m.c
> index 7b0759a..0bc8314 100644
> --- a/drivers/soc/imx/soc-imx8m.c
> +++ b/drivers/soc/imx/soc-imx8m.c
> @@ -22,6 +22,8 @@
>   #define OCOTP_UID_LOW			0x410
>   #define OCOTP_UID_HIGH			0x420
>   
> +#define IMX8MP_OCOTP_UID_OFFSET		0x10
> +
>   /* Same as ANADIG_DIGPROG_IMX7D */
>   #define ANADIG_DIGPROG_IMX8MM	0x800
>   
> @@ -87,6 +89,8 @@ static void __init imx8mm_soc_uid(void)
>   {
>   	void __iomem *ocotp_base;
>   	struct device_node *np;
> +	u32 offset = of_machine_is_compatible("fsl,imx8mp") ?
> +		     IMX8MP_OCOTP_UID_OFFSET : 0;
>   
>   	np = of_find_compatible_node(NULL, NULL, "fsl,imx8mm-ocotp");
>   	if (!np)
> @@ -95,9 +99,9 @@ static void __init imx8mm_soc_uid(void)
>   	ocotp_base = of_iomap(np, 0);
>   	WARN_ON(!ocotp_base);
>   
> -	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
> +	soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH + offset);
>   	soc_uid <<= 32;
> -	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
> +	soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW + offset);
>   
>   	iounmap(ocotp_base);
>   	of_node_put(np);
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
  2020-06-09 15:23   ` Iuliana Prodan
@ 2020-06-09 22:43     ` Anson Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 22:43 UTC (permalink / raw)
  To: Iuliana Prodan, shawnguo, s.hauer, kernel, festevam,
	Leonard Crestez, Abel Vesa, l.stach, Peng Fan, linux-arm-kernel,
	linux-kernel
  Cc: dl-linux-imx

Hi, Luliana


> Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> 
> 
> 
> On 6/9/2020 4:15 PM, Anson Huang wrote:
> > Correct i.MX8MP UID fuse offset according to fuse map:
> >
> > UID_LOW: 0x420
> > UID_HIGH: 0x430
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> If this patch corrects the imx8mp UID shouldn't have a Fixes tag?

I thought about this, but I was confused that this file name is changed
by commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver"),
so if to add fix tag, should I add the tag to point to first patch of
drivers/soc/imx/soc-imx8m.c, or the original commit of supporting 8MP UID
in drivers/soc/imx/soc-imx8.c which is no long there.

Thanks
Anson

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
@ 2020-06-09 22:43     ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 22:43 UTC (permalink / raw)
  To: Iuliana Prodan, shawnguo, s.hauer, kernel, festevam,
	Leonard Crestez, Abel Vesa, l.stach, Peng Fan, linux-arm-kernel,
	linux-kernel
  Cc: dl-linux-imx

Hi, Luliana


> Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> 
> 
> 
> On 6/9/2020 4:15 PM, Anson Huang wrote:
> > Correct i.MX8MP UID fuse offset according to fuse map:
> >
> > UID_LOW: 0x420
> > UID_HIGH: 0x430
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> If this patch corrects the imx8mp UID shouldn't have a Fixes tag?

I thought about this, but I was confused that this file name is changed
by commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver"),
so if to add fix tag, should I add the tag to point to first patch of
drivers/soc/imx/soc-imx8m.c, or the original commit of supporting 8MP UID
in drivers/soc/imx/soc-imx8.c which is no long there.

Thanks
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
  2020-06-09 22:43     ` Anson Huang
@ 2020-06-09 22:49       ` Anson Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 22:49 UTC (permalink / raw)
  To: Iuliana Prodan, shawnguo, s.hauer, kernel, festevam,
	Leonard Crestez, Abel Vesa, l.stach, Peng Fan, linux-arm-kernel,
	linux-kernel
  Cc: dl-linux-imx

Hi, Luliana

> Subject: RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> 
> Hi, Luliana
> 
> 
> > Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> >
> >
> >
> > On 6/9/2020 4:15 PM, Anson Huang wrote:
> > > Correct i.MX8MP UID fuse offset according to fuse map:
> > >
> > > UID_LOW: 0x420
> > > UID_HIGH: 0x430
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >
> > If this patch corrects the imx8mp UID shouldn't have a Fixes tag?
> 
> I thought about this, but I was confused that this file name is changed by
> commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc
> driver"), so if to add fix tag, should I add the tag to point to first patch of
> drivers/soc/imx/soc-imx8m.c, or the original commit of supporting 8MP UID in
> drivers/soc/imx/soc-imx8.c which is no long there.

I think it should be commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc
driver"), will send a V2 patch.

Thanks,
Anson

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
@ 2020-06-09 22:49       ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2020-06-09 22:49 UTC (permalink / raw)
  To: Iuliana Prodan, shawnguo, s.hauer, kernel, festevam,
	Leonard Crestez, Abel Vesa, l.stach, Peng Fan, linux-arm-kernel,
	linux-kernel
  Cc: dl-linux-imx

Hi, Luliana

> Subject: RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> 
> Hi, Luliana
> 
> 
> > Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset
> >
> >
> >
> > On 6/9/2020 4:15 PM, Anson Huang wrote:
> > > Correct i.MX8MP UID fuse offset according to fuse map:
> > >
> > > UID_LOW: 0x420
> > > UID_HIGH: 0x430
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >
> > If this patch corrects the imx8mp UID shouldn't have a Fixes tag?
> 
> I thought about this, but I was confused that this file name is changed by
> commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc
> driver"), so if to add fix tag, should I add the tag to point to first patch of
> drivers/soc/imx/soc-imx8m.c, or the original commit of supporting 8MP UID in
> drivers/soc/imx/soc-imx8.c which is no long there.

I think it should be commit fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc
driver"), will send a V2 patch.

Thanks,
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-09 22:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 13:15 [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset Anson Huang
2020-06-09 13:15 ` Anson Huang
2020-06-09 15:23 ` Iuliana Prodan
2020-06-09 15:23   ` Iuliana Prodan
2020-06-09 22:43   ` Anson Huang
2020-06-09 22:43     ` Anson Huang
2020-06-09 22:49     ` Anson Huang
2020-06-09 22:49       ` Anson Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.