All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29  9:30 ` Arnaud Patard
  0 siblings, 0 replies; 10+ messages in thread
From: Arnaud Patard @ 2017-11-29  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

I've noticed the following message while booting a S905X based board:

soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected

The S905D string is obviously wrong. The vendor code does:
...
        ver = (readl(assist_hw_rev) >> 8) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
        ver =  (readl(assist_hw_rev) >> 16) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
...

while the current code does:
...
#define SOCINFO_MINOR  GENMASK(23, 16)
#define SOCINFO_PACK   GENMASK(15, 8)
...

This means that the current mainline code has package id and minor
version reversed.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
===================================================================
--- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c
+++ linux/drivers/soc/amlogic/meson-gx-socinfo.c
@@ -21,8 +21,8 @@
 #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
 
 #define SOCINFO_MAJOR	GENMASK(31, 24)
-#define SOCINFO_MINOR	GENMASK(23, 16)
-#define SOCINFO_PACK	GENMASK(15, 8)
+#define SOCINFO_PACK	GENMASK(23, 16)
+#define SOCINFO_MINOR	GENMASK(15, 8)
 #define SOCINFO_MISC	GENMASK(7, 0)
 
 static const struct meson_gx_soc_id {

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29  9:30 ` Arnaud Patard
  0 siblings, 0 replies; 10+ messages in thread
From: Arnaud Patard @ 2017-11-29  9:30 UTC (permalink / raw)
  To: linus-amlogic

I've noticed the following message while booting a S905X based board:

soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected

The S905D string is obviously wrong. The vendor code does:
...
        ver = (readl(assist_hw_rev) >> 8) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
        ver =  (readl(assist_hw_rev) >> 16) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
...

while the current code does:
...
#define SOCINFO_MINOR  GENMASK(23, 16)
#define SOCINFO_PACK   GENMASK(15, 8)
...

This means that the current mainline code has package id and minor
version reversed.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
===================================================================
--- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c
+++ linux/drivers/soc/amlogic/meson-gx-socinfo.c
@@ -21,8 +21,8 @@
 #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
 
 #define SOCINFO_MAJOR	GENMASK(31, 24)
-#define SOCINFO_MINOR	GENMASK(23, 16)
-#define SOCINFO_PACK	GENMASK(15, 8)
+#define SOCINFO_PACK	GENMASK(23, 16)
+#define SOCINFO_MINOR	GENMASK(15, 8)
 #define SOCINFO_MISC	GENMASK(7, 0)
 
 static const struct meson_gx_soc_id {

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
  2017-11-29  9:30 ` Arnaud Patard
@ 2017-11-29  9:53   ` Neil Armstrong
  -1 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2017-11-29  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 29/11/2017 10:30, Arnaud Patard wrote:

Hi Arnaud,

Yes, my bad, but please submit the patch using the kernel guidelines (not as an attachment, but in the main body test-only)

And add a Fixes tag.

Neil

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29  9:53   ` Neil Armstrong
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2017-11-29  9:53 UTC (permalink / raw)
  To: linus-amlogic

On 29/11/2017 10:30, Arnaud Patard wrote:

Hi Arnaud,

Yes, my bad, but please submit the patch using the kernel guidelines (not as an attachment, but in the main body test-only)

And add a Fixes tag.

Neil

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
  2017-11-29 15:16   ` Neil Armstrong
@ 2017-11-30  0:00     ` Kevin Hilman
  -1 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2017-11-30  0:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnaud,

Neil Armstrong <narmstrong@baylibre.com> writes:

> On 29/11/2017 16:09, Arnaud Patard wrote:
>> I've noticed the following message while booting a S905X based board:
>> 
>> soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected
>> 
>> The S905D string is obviously wrong. The vendor code does:
>> ...
>>         ver = (readl(assist_hw_rev) >> 8) & 0xff;
>>         meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
>>         ver =  (readl(assist_hw_rev) >> 16) & 0xff;
>>         meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
>> ...
>> 
>> while the current code does:
>> ...
>> #define SOCINFO_MINOR  GENMASK(23, 16)
>> #define SOCINFO_PACK   GENMASK(15, 8)
>> ...
>> 
>> This means that the current mainline code has package id and minor
>> version reversed.
>> 
>> Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
>> Signed-off-by: Arnaud Patard <apatard@hupstream.com>
>> Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
>> ===================================================================
>> --- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
>> +++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
>> @@ -20,8 +20,8 @@
>>  #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
>>  
>>  #define SOCINFO_MAJOR	GENMASK(31, 24)
>> -#define SOCINFO_MINOR	GENMASK(23, 16)
>> -#define SOCINFO_PACK	GENMASK(15, 8)
>> +#define SOCINFO_PACK	GENMASK(23, 16)
>> +#define SOCINFO_MINOR	GENMASK(15, 8)
>>  #define SOCINFO_MISC	GENMASK(7, 0)
>>  
>>  static const struct meson_gx_soc_id {
>> 
>> 
>
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks for the fix!

Applied to v4.15/fixes with  Neil's ack.

Kevin

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-30  0:00     ` Kevin Hilman
  0 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2017-11-30  0:00 UTC (permalink / raw)
  To: linus-amlogic

Hi Arnaud,

Neil Armstrong <narmstrong@baylibre.com> writes:

> On 29/11/2017 16:09, Arnaud Patard wrote:
>> I've noticed the following message while booting a S905X based board:
>> 
>> soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected
>> 
>> The S905D string is obviously wrong. The vendor code does:
>> ...
>>         ver = (readl(assist_hw_rev) >> 8) & 0xff;
>>         meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
>>         ver =  (readl(assist_hw_rev) >> 16) & 0xff;
>>         meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
>> ...
>> 
>> while the current code does:
>> ...
>> #define SOCINFO_MINOR  GENMASK(23, 16)
>> #define SOCINFO_PACK   GENMASK(15, 8)
>> ...
>> 
>> This means that the current mainline code has package id and minor
>> version reversed.
>> 
>> Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
>> Signed-off-by: Arnaud Patard <apatard@hupstream.com>
>> Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
>> ===================================================================
>> --- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
>> +++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
>> @@ -20,8 +20,8 @@
>>  #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
>>  
>>  #define SOCINFO_MAJOR	GENMASK(31, 24)
>> -#define SOCINFO_MINOR	GENMASK(23, 16)
>> -#define SOCINFO_PACK	GENMASK(15, 8)
>> +#define SOCINFO_PACK	GENMASK(23, 16)
>> +#define SOCINFO_MINOR	GENMASK(15, 8)
>>  #define SOCINFO_MISC	GENMASK(7, 0)
>>  
>>  static const struct meson_gx_soc_id {
>> 
>> 
>
> Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks for the fix!

Applied to v4.15/fixes with  Neil's ack.

Kevin

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
  2017-11-29 15:09 ` Arnaud Patard
@ 2017-11-29 15:16   ` Neil Armstrong
  -1 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2017-11-29 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 29/11/2017 16:09, Arnaud Patard wrote:
> I've noticed the following message while booting a S905X based board:
> 
> soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected
> 
> The S905D string is obviously wrong. The vendor code does:
> ...
>         ver = (readl(assist_hw_rev) >> 8) & 0xff;
>         meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
>         ver =  (readl(assist_hw_rev) >> 16) & 0xff;
>         meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
> ...
> 
> while the current code does:
> ...
> #define SOCINFO_MINOR  GENMASK(23, 16)
> #define SOCINFO_PACK   GENMASK(15, 8)
> ...
> 
> This means that the current mainline code has package id and minor
> version reversed.
> 
> Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
> Signed-off-by: Arnaud Patard <apatard@hupstream.com>
> Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
> ===================================================================
> --- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
> +++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
> @@ -20,8 +20,8 @@
>  #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
>  
>  #define SOCINFO_MAJOR	GENMASK(31, 24)
> -#define SOCINFO_MINOR	GENMASK(23, 16)
> -#define SOCINFO_PACK	GENMASK(15, 8)
> +#define SOCINFO_PACK	GENMASK(23, 16)
> +#define SOCINFO_MINOR	GENMASK(15, 8)
>  #define SOCINFO_MISC	GENMASK(7, 0)
>  
>  static const struct meson_gx_soc_id {
> 
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29 15:16   ` Neil Armstrong
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2017-11-29 15:16 UTC (permalink / raw)
  To: linus-amlogic

On 29/11/2017 16:09, Arnaud Patard wrote:
> I've noticed the following message while booting a S905X based board:
> 
> soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected
> 
> The S905D string is obviously wrong. The vendor code does:
> ...
>         ver = (readl(assist_hw_rev) >> 8) & 0xff;
>         meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
>         ver =  (readl(assist_hw_rev) >> 16) & 0xff;
>         meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
> ...
> 
> while the current code does:
> ...
> #define SOCINFO_MINOR  GENMASK(23, 16)
> #define SOCINFO_PACK   GENMASK(15, 8)
> ...
> 
> This means that the current mainline code has package id and minor
> version reversed.
> 
> Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
> Signed-off-by: Arnaud Patard <apatard@hupstream.com>
> Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
> ===================================================================
> --- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
> +++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
> @@ -20,8 +20,8 @@
>  #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
>  
>  #define SOCINFO_MAJOR	GENMASK(31, 24)
> -#define SOCINFO_MINOR	GENMASK(23, 16)
> -#define SOCINFO_PACK	GENMASK(15, 8)
> +#define SOCINFO_PACK	GENMASK(23, 16)
> +#define SOCINFO_MINOR	GENMASK(15, 8)
>  #define SOCINFO_MISC	GENMASK(7, 0)
>  
>  static const struct meson_gx_soc_id {
> 
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29 15:09 ` Arnaud Patard
  0 siblings, 0 replies; 10+ messages in thread
From: Arnaud Patard @ 2017-11-29 15:09 UTC (permalink / raw)
  To: linux-arm-kernel

I've noticed the following message while booting a S905X based board:

soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected

The S905D string is obviously wrong. The vendor code does:
...
        ver = (readl(assist_hw_rev) >> 8) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
        ver =  (readl(assist_hw_rev) >> 16) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
...

while the current code does:
...
#define SOCINFO_MINOR  GENMASK(23, 16)
#define SOCINFO_PACK   GENMASK(15, 8)
...

This means that the current mainline code has package id and minor
version reversed.

Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
===================================================================
--- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
+++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
@@ -20,8 +20,8 @@
 #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
 
 #define SOCINFO_MAJOR	GENMASK(31, 24)
-#define SOCINFO_MINOR	GENMASK(23, 16)
-#define SOCINFO_PACK	GENMASK(15, 8)
+#define SOCINFO_PACK	GENMASK(23, 16)
+#define SOCINFO_MINOR	GENMASK(15, 8)
 #define SOCINFO_MISC	GENMASK(7, 0)
 
 static const struct meson_gx_soc_id {

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

* [PATCH] meson-gx-socinfo: Fix package id parsing
@ 2017-11-29 15:09 ` Arnaud Patard
  0 siblings, 0 replies; 10+ messages in thread
From: Arnaud Patard @ 2017-11-29 15:09 UTC (permalink / raw)
  To: linus-amlogic

I've noticed the following message while booting a S905X based board:

soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected

The S905D string is obviously wrong. The vendor code does:
...
        ver = (readl(assist_hw_rev) >> 8) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver;
        ver =  (readl(assist_hw_rev) >> 16) & 0xff;
        meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver;
...

while the current code does:
...
#define SOCINFO_MINOR  GENMASK(23, 16)
#define SOCINFO_PACK   GENMASK(15, 8)
...

This means that the current mainline code has package id and minor
version reversed.

Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver")
Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Index: linux/drivers/soc/amlogic/meson-gx-socinfo.c
===================================================================
--- linux.orig/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.081335917 +0100
+++ linux/drivers/soc/amlogic/meson-gx-socinfo.c	2017-11-29 10:26:49.041335074 +0100
@@ -20,8 +20,8 @@
 #define AO_SEC_SOCINFO_OFFSET	AO_SEC_SD_CFG8
 
 #define SOCINFO_MAJOR	GENMASK(31, 24)
-#define SOCINFO_MINOR	GENMASK(23, 16)
-#define SOCINFO_PACK	GENMASK(15, 8)
+#define SOCINFO_PACK	GENMASK(23, 16)
+#define SOCINFO_MINOR	GENMASK(15, 8)
 #define SOCINFO_MISC	GENMASK(7, 0)
 
 static const struct meson_gx_soc_id {

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

end of thread, other threads:[~2017-11-30  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29  9:30 [PATCH] meson-gx-socinfo: Fix package id parsing Arnaud Patard
2017-11-29  9:30 ` Arnaud Patard
2017-11-29  9:53 ` Neil Armstrong
2017-11-29  9:53   ` Neil Armstrong
2017-11-29 15:09 Arnaud Patard
2017-11-29 15:09 ` Arnaud Patard
2017-11-29 15:16 ` Neil Armstrong
2017-11-29 15:16   ` Neil Armstrong
2017-11-30  0:00   ` Kevin Hilman
2017-11-30  0:00     ` Kevin Hilman

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.