From patchwork Wed Nov 29 15:09:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Arnaud Patard (Rtp)" X-Patchwork-Id: 10082515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5162C6020B for ; Wed, 29 Nov 2017 15:22:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B93E299D3 for ; Wed, 29 Nov 2017 15:22:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9045C299EC; Wed, 29 Nov 2017 15:22:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8BBB299EB for ; Wed, 29 Nov 2017 15:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Subject:To:From:Date: Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CkJmVZ75GNskCqvIhHlzakVw3ETZpl9mPdf3MKH4T8I=; b=kw+0jJF/m+5ZMh h4nAfhvpaHXUJrHTinKQv+MhwQIlgMcFLGjRFAPSsj2HWUgjSRRsFBuf41OJ1HiShBPa0/88upyDw /mhiFaiVJ0MsMCqIIfux3CKVtMqI8ZWXPTQ/cIDR5qIsNhNdPixMabI2u8JX6ZdUmmNdSkWUadUGw oSBbbTvXwURKpDMYEBg+bamvmBJOaOkMHRFJXKd8Jy0UT22vj8Do4n82+a4FxgBXcojO0MpH/Mk2x 16UZs0icHGhH9J/WVorTe4CcakRLKHEQzVw13wEuoLuAMx/9mKZ5pV+nLZa7PTGeKL1vwXX7v0sCV BfR07SRKIkQoYPGqYCvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eK4BT-0000hc-EM; Wed, 29 Nov 2017 15:21:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eK4BP-0000Y6-Uj; Wed, 29 Nov 2017 15:21:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Subject:Cc:To :From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ce2TXTs9thkANqlPAE8Hn29U9B3/a5FzIvYWhmBOYgk=; b=bK0qQGllbRM7htH3YlNF/6uLO1 g6j8V4iy5eaDdDc/+N2Qyj7BCgSB0S4IGI1ii9X0kkvh9BiSefdxfPpmuF6b9Y5CIXN+65sSLq4eQ uomL/m/BQK5Yyp8HpHjVTmU2jnwnJnkuoJkQQRouT1GpYIf/nHaw1EMjkEm1dZrZKKLoirZHOHFY9 SODZJKdy87/dEOhxUl4+5/9GEJ4gV3dFyDQ1MHujSthzoZ0NPR+dNW1bmBJ0YT68bY9UCj+lCN75q O25wJj1SkVMCAEoVv+3iRT7LI2aWdmuFj9zpO0EM42gLtU9isrJSArXmTgQvkZPDfN0ZEbcXWj6Hk 8Rz4mmoA==; Received: from lechat.rtp-net.org ([2001:bc8:3430:1000::c0f:fee]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eK44p-00006F-U9; Wed, 29 Nov 2017 15:15:10 +0000 Received: by lechat.rtp-net.org (Postfix, from userid 1000) id A4BAB18101A; Wed, 29 Nov 2017 15:14:37 +0000 (UTC) Message-Id: <20171129151000.710502415@rtp-net.org> User-Agent: quilt/0.63-1 Date: Wed, 29 Nov 2017 16:09:46 +0100 From: Arnaud Patard To: linux-amlogic@lists.infradead.org Subject: [PATCH] meson-gx-socinfo: Fix package id parsing MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171129_151507_994379_1311E0CE X-CRM114-Status: UNSURE ( 6.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnaud Patard , khilman@baylibre.com, linux-arm-kernel@lists.infradead.org, narmstrong@baylibre.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 {