From patchwork Wed Nov 29 09:30:01 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: 10081695 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 D71B6602BC for ; Wed, 29 Nov 2017 09:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C886529759 for ; Wed, 29 Nov 2017 09:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD5F82976A; Wed, 29 Nov 2017 09:34:53 +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 29A5B29759 for ; Wed, 29 Nov 2017 09:34:52 +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=k76fIZsFx6O2hwVDiUvM66fuOiDBXMGKQBVH8+K4Pns=; b=dr7Vh0KBQf072f paG2KX0ckNbFyIxlB14mzRoUFnVxKytzBpOHqj09sZ6xqY6c5sswvoHcMQFxl2wwQZA0BDryCnASS kXg+w/BkR2N/zlfE+5vO3/mzH+syevkzW6S+LeOw6Kx2dKmcAJZmDc9Z52WBqlDsNLk6GePTHmPw5 Gv2IJZheHvar4yayiho3BaLo7gqZBHZkulamcGgX1iZpHr+ant3zG5n5h6s/EavsMOt4yZZ5nAlDL 0Pa2nfIbJL7tuZHqo57OUIKkmCwXK5LbI4XbVO7rhJXX5iB4DFw/eUCtPgBnM87yCDd6mBUa8QgfX FLgWCXnR2y+tZVGpNXtA==; 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 1eJylX-0006Fd-U3; Wed, 29 Nov 2017 09:34:51 +0000 Received: from lechat.rtp-net.org ([51.15.165.164]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eJylT-0006Dv-Qt; Wed, 29 Nov 2017 09:34:49 +0000 Received: by lechat.rtp-net.org (Postfix, from userid 1000) id 176B2181003; Wed, 29 Nov 2017 09:34:21 +0000 (UTC) Message-Id: <20171129093018.129341243@rtp-net.org> User-Agent: quilt/0.63-1 Date: Wed, 29 Nov 2017 10:30:01 +0100 From: Arnaud Patard To: linux-amlogic@lists.infradead.org Subject: [PATCH] meson-gx-socinfo: Fix package id parsing MIME-Version: 1.0 Content-Disposition: inline; filename=soc-meson-fix-ids.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171129_013448_024059_A0B8E06A X-CRM114-Status: UNSURE ( 6.40 ) 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. Signed-off-by: Arnaud Patard 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 {