From patchwork Wed Dec 2 19:59:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11946999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CCE1C83013 for ; Wed, 2 Dec 2020 20:01:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 DC57B221FD for ; Wed, 2 Dec 2020 20:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC57B221FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=ZBc0V2VnkDOocFWw5ymzEExSsOKBjlitfPD4+TS8Ru8=; b=O4cK2bbNjYAu5koN8WyY07/JHN QBAP2IIA6cSWjgwaKld8qf/mmE7cnORJPFyhpOKSzuBHwA1/C3X/LNgPz0QmrspuFEffMZ0MG6ZOY UPW4q/Ui70WrtJYFjJXShz3hZy/PUO2SYcD7X9S0aOP+hWmk7UI1AKbuaPcwYPU5jq07cD2VelR9F AX65+N9QrDruWO8+VTk55SDxDORBTUgwhd3+IOeOCemgT9jCidthgzYkB8ilLcpUt4hO38q9LJwWm yWZSMWyS/kxW18sJYOAvshg0SsfF75Sg6NQ9qSfV1Gf3L6KyYZVy45l1ijBviXlH7RjDbv6x0yd1p /RyeRlLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIp-0005UD-ET; Wed, 02 Dec 2020 20:00:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIn-0005TX-2p for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2020 20:00:37 +0000 From: Krzysztof Kozlowski Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] soc: samsung: exynos-chipid: order list of SoCs by name Date: Wed, 2 Dec 2020 21:59:54 +0200 Message-Id: <20201202195955.128633-1-krzk@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201202_150037_221987_FDE7394D X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Marek Szyprowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Bring some order to the list of SoCs. No functional change. Signed-off-by: Krzysztof Kozlowski --- drivers/soc/samsung/exynos-chipid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 8d4d05086906..b4cd0cc00f45 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -20,6 +20,7 @@ static const struct exynos_soc_id { const char *name; unsigned int id; } soc_ids[] = { + /* List ordered by SoC name */ { "EXYNOS3250", 0xE3472000 }, { "EXYNOS4210", 0x43200000 }, /* EVT0 revision */ { "EXYNOS4210", 0x43210000 }, @@ -29,10 +30,10 @@ static const struct exynos_soc_id { { "EXYNOS5260", 0xE5260000 }, { "EXYNOS5410", 0xE5410000 }, { "EXYNOS5420", 0xE5420000 }, + { "EXYNOS5433", 0xE5433000 }, { "EXYNOS5440", 0xE5440000 }, { "EXYNOS5800", 0xE5422000 }, { "EXYNOS7420", 0xE7420000 }, - { "EXYNOS5433", 0xE5433000 }, }; static const char * __init product_id_to_soc_id(unsigned int product_id) From patchwork Wed Dec 2 19:59:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11947001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E6FAC6369E for ; Wed, 2 Dec 2020 20:01:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 EB89922261 for ; Wed, 2 Dec 2020 20:01:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB89922261 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xoW1IHhocokndDN/20hXHxTwptQee5C8zbZPNkJjgL8=; b=U/K4xB/AyJRivDh527re6Uzz+ lMEeRAMXI6zla9kTKrKbyuS8jDg6+7U7wBtKY2VjaYzQ68TgdVaVF/Go8+Df7F+6NjEMDZ/5WJG5T AosJpiCrPZdRBtNmch4JyG8qpVeivsJBH8s4M/lQCQ1J1hYd2ilx/wRz5dtrquCMg0xQV9Sp0epQn trIzE9M7WOK0LdcKf+1dCAJoksbVk9E7mUWUaPx+aAd7rOXU1r7IBUl+qPzHB/uJJTfOks3QGVnP+ Zm0+AzvbQ6caPXsuHPIfdYHuXIDKKD9aA6Xke6HVRyKShLDV+87Ca+0GRSZzxPYraD9Uuzl0DcGoo +7sNyqx3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIr-0005Uh-Dn; Wed, 02 Dec 2020 20:00:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkYIo-0005Ty-D9 for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2020 20:00:39 +0000 From: Krzysztof Kozlowski Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] soc: samsung: exynos-chipid: initialize later - with arch_initcall Date: Wed, 2 Dec 2020 21:59:55 +0200 Message-Id: <20201202195955.128633-2-krzk@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201202195955.128633-1-krzk@kernel.org> References: <20201202195955.128633-1-krzk@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201202_150038_554198_3198F84A X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Marek Szyprowski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Exynos ChipID driver on Exynos SoCs has only informational purpose - to expose the SoC device in sysfs. No other drivers depend on it so there is really no benefit of initializing it early. Instead, initialize everything with arch_initcall which: 1. Allows to use dev_info() as the SoC bus is present (since core_initcall), 2. Could speed things up because of execution in a SMP environment (after bringing up secondary CPUs, unlike early_initcall), 3. Reduces the amount of work to be done early, when the kernel has to bring up critical devices. Signed-off-by: Krzysztof Kozlowski --- drivers/soc/samsung/exynos-chipid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index b4cd0cc00f45..1a76eade2ed6 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -99,9 +99,9 @@ static int __init exynos_chipid_early_init(void) goto err; } - /* it is too early to use dev_info() here (soc_dev is NULL) */ - pr_info("soc soc0: Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", - soc_dev_attr->soc_id, product_id, revision); + dev_info(soc_device_to_device(soc_dev), + "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", + soc_dev_attr->soc_id, product_id, revision); return 0; @@ -111,4 +111,4 @@ static int __init exynos_chipid_early_init(void) return ret; } -early_initcall(exynos_chipid_early_init); +arch_initcall(exynos_chipid_early_init);