From patchwork Sat Apr 24 16:21:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 12222679 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 9B4DFC433B4 for ; Sat, 24 Apr 2021 16:26:33 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 1C67C61284 for ; Sat, 24 Apr 2021 16:26:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C67C61284 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net 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=desiato.20200630; 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=BogQZBzzAYwXa81s8Rqu/ZHrV3w4wIR/TCmVOXQmjdc=; b=jHV7V8ydys6fJkC5EnmpvHLCeB VbSuPEsx7eymSV+V08SnArrDyHmlssFVDBBrouuECjl6pP983regfgboHsfUb4IYLzSmcibr+aw0t BBQEHq+UslOAS56bX8stZTF459QMfXknpe2lId4kn3JPG0jB9NSaW7ioUKL8C+fOMATaoplzGWl4W 9o9GaEW0EW6wTpjB9sqDJIpTvfLBlRfJ+00DxRa0l2XQTT/kwVbw4ED5PaonBLA9oUfAgh25gT3Ze SgTm2nvh5O/Z5A+9RgVoiGeggTvH5x6/JkQ40wrOXR/q3d+haefFOrC4jmWa4a5tcn8P34xgmHT/7 JpHJNZeg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1laL55-0047WK-At; Sat, 24 Apr 2021 16:24:31 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1laL50-0047W4-5t for linux-arm-kernel@desiato.infradead.org; Sat, 24 Apr 2021 16:24:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=woVnYAhT15f6JXsc4DQ7+1B0XLIDYaCghrVxZ66M01I=; b=U5dIRsya3HkqZ+wKD5/E/vyJxQ htD0IqrzR1GNw9cqePdb/EGLkKceyR6wkGTIgwaf4GQeopAUKiHvdSgW9q0y2AjnAwSoNux56GFZQ h4uT8YfOpAxS/pXjFL8VQ5Bglo10OJXfiYWw5QjeSfFJuP/awlQWqIHt4s8oA0LfdHqguDkhmQsOe VcNpCpJJY2fSGtAbezuT5oibFosJ71//7/WCSyZtATumfH/yohtise3+r72Sf/MzfwdqKqWEzv8K0 /rcHGI8qsLqe1jGJwSXYp2R/Vjh/YrbMLSdiFKH5x7H5cUz0qWJJEOPmybShpnzorwcw81efxiY8c fetSioSA==; Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1laL4u-00F5Fm-UP for linux-arm-kernel@lists.infradead.org; Sat, 24 Apr 2021 16:24:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619281452; bh=9YgyoONvVXEooC+qoFrTDEtEi/Z90uUO1lgp3U/cgpI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=QH6PsWZU45X5LqzVp6bli6OdEdOAWBbb1Jsqw5e/RJPLtdl30NJfzlZ36vh2EA91Y MSrY93zOnYU9xZrP4ckBwcFZsxvxcP2Vd3L5TKIGX/SA169/SDh+HNiTQpIW8ABaxc vkKuox69k1teliJlHXO4xwEwpr9rIDnmhj1Nf8IM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.195.179]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxDou-1lPR242lg0-00xeMC; Sat, 24 Apr 2021 18:24:12 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-arm-kernel@lists.infradead.org Cc: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , linux-kernel@vger.kernel.org Subject: [PATCH] ARM: imx: Initialize SoC ID on i.MX50 Date: Sat, 24 Apr 2021 18:21:27 +0200 Message-Id: <20210424162133.680213-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:eZ2t3utlUfuvWD5sJyGBN+Y0h9lNn/X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xf4XTItH35XeGrvx/hJsi1RvF+ft9UhJ+J lrrpudgdsyjDdP6WdEOzQ74ByTKDJCakjjib35I9phGukANH0c5JG91TCDeZndfeqXXn9W1Av 2CeV8+65IBGxPt/5nz9KsaA+/2DLdo/8sY/hD0vK3ezJ5nhgxGSh4dgGGQbO6sNzeCRrFitVK MNjpbjrr58AuH866KZLHmiX+kwUdJyIMvq56maz2nQcGzYCAryOKFaIZ5egRXWc0ynGqu2qrj ko0P6AgUl/OdBKy02mg3CVifOr+/oHAV0y+D3xaiBBJzZ8LvsdYa9L1sz21COz2Mu/mweUADb CnLG4xyi3kZiDPiDvF59sYJivKsB+cbqUWO/R9WSYKtJrSyGZnfzizM76ut47v84ekPCwLfCv h0NuN+RNFLIoSyuY4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210424_092421_338920_AE5EDD0B X-CRM114-Status: GOOD ( 11.71 ) 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 As on i.MX51 and i.MX53, initialize the SoC ID based on the SoC compatible string of the board. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/mach-imx50.c | 7 +++++++ drivers/soc/imx/soc-imx.c | 3 +++ include/soc/imx/cpu.h | 1 + 3 files changed, 11 insertions(+) -- 2.30.2 diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index f4da205f57db9..a2d35f9ba474a 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c @@ -9,6 +9,12 @@ #include #include "common.h" +#include "hardware.h" + +static void __init imx50_init_early(void) +{ + mxc_set_cpu_type(MXC_CPU_MX50); +} static const char * const imx50_dt_board_compat[] __initconst = { "fsl,imx50", @@ -16,5 +22,6 @@ static const char * const imx50_dt_board_compat[] __initconst = { }; DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)") + .init_early = imx50_init_early, .dt_compat = imx50_dt_board_compat, MACHINE_END diff --git a/drivers/soc/imx/soc-imx.c b/drivers/soc/imx/soc-imx.c index 01bfea1cb64a8..e11d237b883a9 100644 --- a/drivers/soc/imx/soc-imx.c +++ b/drivers/soc/imx/soc-imx.c @@ -67,6 +67,9 @@ static int __init imx_soc_device_init(void) case MXC_CPU_MX35: soc_id = "i.MX35"; break; + case MXC_CPU_MX50: + soc_id = "i.MX50"; + break; case MXC_CPU_MX51: soc_id = "i.MX51"; break; diff --git a/include/soc/imx/cpu.h b/include/soc/imx/cpu.h index 42d6aeb951fa6..0bf610acafd06 100644 --- a/include/soc/imx/cpu.h +++ b/include/soc/imx/cpu.h @@ -9,6 +9,7 @@ #define MXC_CPU_MX27 27 #define MXC_CPU_MX31 31 #define MXC_CPU_MX35 35 +#define MXC_CPU_MX50 50 #define MXC_CPU_MX51 51 #define MXC_CPU_MX53 53 #define MXC_CPU_IMX6SL 0x60