meson-gx-socinfo: Fix package id parsing
authorArnaud Patard <arnaud.patard@rtp-net.org>
Wed, 29 Nov 2017 15:09:46 +0000 (16:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:56 +0000 (11:07 +0100)
commit2117bba3cfbb120dee072a11aba4a116f316dff5
treecce976a57c2b3139b45ed71f73d50c15387cf251
parent844dfa1b41887029fce142f83cae07dfb9e6e86e
meson-gx-socinfo: Fix package id parsing

[ Upstream commit 044d71bc6cdee8980d0fdc35ec79a0d5818b2ce3 ]

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:
...
...

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>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/amlogic/meson-gx-socinfo.c