From patchwork Sun Oct 31 16:56:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Grimler X-Patchwork-Id: 12595371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7188BC433F5 for ; Sun, 31 Oct 2021 16:59:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3179760F45 for ; Sun, 31 Oct 2021 16:59:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3179760F45 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=grimler.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From: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=D1yPhNPBoD2qyokdm0jg3zUVnd96m0/4DRs5LX1U8Q8=; b=FF0+GC2zdHD4Kj wDiKBptFTgFgaj3Ha3+TU6DkqX+vWkmGNQY6EYxdPAgtDzKevseqA8mrrCngrKqWYxnG5SU8WwCft rL/uwT65D/11kEIvXVSLF4AP6Od6NevyhY9tv4rJoJ+munp+xe6dG7H/WdDl+H2R8ZYyf0occSlDF X1ujczocwtsi2Kjh31/1Jgsr+EN5Mah2mbc+qsjWBZePZFV9Hf5aUK1S+hlpUVqVqyGct1Db08Xpe +ze3SPlqR7SE8UHmkPn/eazAJ3jj4sURlzxKH4vLcKvp5C5rvSEvZHzDt890ilVz1KctrqHlqfdCe IiHNbtTR3SO7nDK5t14g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhEAN-00EPdk-B2; Sun, 31 Oct 2021 16:58:43 +0000 Received: from h02mx20.reliablemail.org ([185.76.66.173]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhEAJ-00EPcd-CV for linux-arm-kernel@lists.infradead.org; Sun, 31 Oct 2021 16:58:41 +0000 X-Halon-Out: c87c1747-3a6b-11ec-930f-f5be715b97e5 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=grimler.se; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type: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=nETgqTUmnIC9S8IKZ+fJ3c8TD0AfhNbJNlYD3lzNIJM=; b=GzDFG6ELjMdFCER4RAaTCjmIRh QRoRMEoUrBKkjE92zHeP+fB8ca1rTdGaulAL8MtrZMIHaugkxt/mjm70aMsOiGEDX4pr4OAeWC1wG 2XbVDaGQkmEKFzeK7i0wpwXCcXtDRql0LfbJfVmoCVVTN/MtHAmhvCNo3wW6I+fQN3vFYh7K8pfmP u45zZZrG0aYaIyKa/CJ3+yrFEvHfXtS/oSWjpTWjMjBirupsykqkxwxzflLo5Kzw7Xvti6jhV0VJq EGMBbAHBm/8XPya/zQWFJ1plCzHlflQns1vx4Cysl3J9cS4P2fkf2nm79zRTpfmSQ+sDoCdtJfjHC HjjN9ofg==; From: Henrik Grimler To: krzysztof.kozlowski@canonical.com, chanho61.park@samsung.com, semen.protsenko@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Henrik Grimler Subject: [PATCH 1/2] soc: samsung: exynos-chipid: print entire PRO_ID reg when probing Date: Sun, 31 Oct 2021 17:56:44 +0100 Message-Id: <20211031165645.1182368-1-henrik@grimler.se> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpsrv07.misshosting.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - grimler.se X-Get-Message-Sender-Via: cpsrv07.misshosting.com: authenticated_id: henrik@grimler.se X-Authenticated-Sender: cpsrv07.misshosting.com: henrik@grimler.se X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211031_095839_777582_8F89ABAC X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Older Exynos socs has one reg PRO_ID containing both product id and revision information. Newer Exynos socs has one Product_ID reg with product id, and one CHIPID_REV reg with revision information. In commit c072c4ef7ef0 ("soc: samsung: exynos-chipid: Pass revision reg offsets") the driver was changed so that the revision part of PRO_ID is masked to 0 when printed during probing. This can give a false impression that the revision is 0, so lets change so entire PRO_ID reg is printed again. Signed-off-by: Henrik Grimler --- Has been tested on exynos4412-i9300, which is compatible with exynos4210-chipid, and on an exynos8895 device compatible with exynos850-chipid. --- drivers/soc/samsung/exynos-chipid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) base-commit: b417d1e88f32645ed62a00d43c347b4386a0a021 diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index a28053ec7e6a..7fe44f71920d 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -33,6 +33,7 @@ struct exynos_chipid_variant { }; struct exynos_chipid_info { + u32 pro_id; u32 product_id; u32 revision; }; @@ -79,6 +80,7 @@ static int exynos_chipid_get_chipid_info(struct regmap *regmap, ret = regmap_read(regmap, EXYNOS_CHIPID_REG_PRO_ID, &val); if (ret < 0) return ret; + soc_info->pro_id = val; soc_info->product_id = val & EXYNOS_MASK; if (data->rev_reg != EXYNOS_CHIPID_REG_PRO_ID) { @@ -146,7 +148,7 @@ static int exynos_chipid_probe(struct platform_device *pdev) platform_set_drvdata(pdev, soc_dev); dev_info(&pdev->dev, "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", - soc_dev_attr->soc_id, soc_info.product_id, soc_info.revision); + soc_dev_attr->soc_id, soc_info.pro_id, soc_info.revision); return 0; From patchwork Sun Oct 31 16:56:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Grimler X-Patchwork-Id: 12595373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C80EC433F5 for ; Sun, 31 Oct 2021 17:00:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC59960E98 for ; Sun, 31 Oct 2021 17:00:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BC59960E98 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=grimler.se Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jbRyj+5FRgPkkCnNcgBh6Iv6D6QTvVdsgFCfmdEN9H4=; b=Lc6Zerg0RouF0j G+iZWxHyhGDAa6xwtibjvVL5mJXAdiVn3y6r5VkfUw3KFVB5NhCepe37oTh4w4rLgY4Qp9h1P0Lfg c8/jD+coaCAOxYcK9wb4NVojqZ3mQpAs+TdqfqLjIt5XLuZOSc5ryKBeFU5PfrD8WwaZlsw1u9dm7 PQVh8KUDNB1krHMYF+S0l2Peo5mED83X10TrMNgD6mr46j625FR8zzNhzXs+lT8b6FCWpS2HyAfHG kUN+vwAnMONeBguqFOwyusVuGnAKNp4AytriDVcDR8MYK6xAQtGEPQ5YsInPQ+wJZ3YejkU7SEfaH yn/9u3OuJt11jHgWTWVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhEAX-00EPfk-Bj; Sun, 31 Oct 2021 16:58:53 +0000 Received: from h02mx15.reliablemail.org ([185.76.66.168]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhEAR-00EPeV-Ls for linux-arm-kernel@lists.infradead.org; Sun, 31 Oct 2021 16:58:49 +0000 X-Halon-Out: cf352d0c-3a6b-11ec-930f-f5be715b97e5 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=grimler.se; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nOl5nlIxqfkxGqt8uVGk5GyJ6n7o+DeMWTuUJU2cxx8=; b=Y7gJJLM8eXhdiLtVOh1W0NCIJ0 TLFj2fDQKTjJyLPYYXAMUHEz7SLpd2VDXMjuP8A6V5KT8y6T6rJKwQvq18CRCDXruWHnTs9BVk608 ZOScUKgg5Lk+w4PArOyB0oME02se6CniZrx7K46sKF8MX+Wbvj1a/x3dR56U5SgXVMaDN3ttBlL81 IQT24y7mp3yoYz3TkRiNCb2S2QJSrhDzps7PnfYS/IjiaSPMelfpxusuuC3+Tds3hnvjIo0QPCV2r O3RC7WLKeARsxvtl3aQslzwD8sKCeyW2zBh/mCZFyjpH77IVxY/GnQifiw0sTa4aNJ+M2/UdzpsTv bdhYqJWA==; From: Henrik Grimler To: krzysztof.kozlowski@canonical.com, chanho61.park@samsung.com, semen.protsenko@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Henrik Grimler Subject: [PATCH 2/2] soc: samsung: exynos-chipid: be more informative when soc is unknown Date: Sun, 31 Oct 2021 17:56:45 +0100 Message-Id: <20211031165645.1182368-2-henrik@grimler.se> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211031165645.1182368-1-henrik@grimler.se> References: <20211031165645.1182368-1-henrik@grimler.se> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpsrv07.misshosting.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - grimler.se X-Get-Message-Sender-Via: cpsrv07.misshosting.com: authenticated_id: henrik@grimler.se X-Authenticated-Sender: cpsrv07.misshosting.com: henrik@grimler.se X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211031_095847_905171_9207E5AE X-CRM114-Status: UNSURE ( 5.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Print the obtained product id that is incompatible. Signed-off-by: Henrik Grimler --- drivers/soc/samsung/exynos-chipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 7fe44f71920d..885d578fd005 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -132,7 +132,7 @@ static int exynos_chipid_probe(struct platform_device *pdev) "%x", soc_info.revision); soc_dev_attr->soc_id = product_id_to_soc_id(soc_info.product_id); if (!soc_dev_attr->soc_id) { - pr_err("Unknown SoC\n"); + pr_err("Exynos: Unknown SoC: 0x%x\n", soc_info.product_id); return -ENODEV; }