From patchwork Wed Apr 7 19:02:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1463486 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=bnk+VAk9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FFv574Vhbz9sV5 for ; Thu, 8 Apr 2021 05:06:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0149F8187C; Wed, 7 Apr 2021 21:06:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.b="bnk+VAk9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A10A1817A9; Wed, 7 Apr 2021 21:03:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from smtpcmd11117.aruba.it (smtpcmd11117.aruba.it [62.149.156.117]) by phobos.denx.de (Postfix) with ESMTP id 09D8E81578 for ; Wed, 7 Apr 2021 21:03:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=giulio.benetti@benettiengineering.com Received: from ubuntu.localdomain ([146.241.148.6]) by Aruba Outgoing Smtp with ESMTPSA id UDSFlLCIQkeOqUDSIl4KvK; Wed, 07 Apr 2021 21:03:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1617822190; bh=awzCTJOgm+P5bz8D5WuYWDCHlNvaQuAGOEwL5w/6gUg=; h=From:To:Subject:Date:MIME-Version; b=bnk+VAk9YTEuXY6snBss7WplJOQx2TQPmnIXFkLAIUV8Tlq/tEkcnnjokUcxAUcW6 swPt6IdcSFMg2uVNFcDpcV/UD4Ot9uZETVZEnHw4uYorvnODqM5cKrEwczsOVUx8r9 sVkEdtefrFZtbc7T/7GY8qrBI+81hARwnSgq7uaAOhzfDutSURRpT45V0h0axPzgot IBTIeY5+d51IpGQC3KuCTWt5UjRXsbBSxm//gUP9fm6EXzXOgVF6OdXDahTYh3J/OF R/Hu9LVe3+6cXnqh5cfuC2KOj0thFTph57QSlD1fQmsORsQRIAZ/ukfq0dkiDYu+bo NSKhJTpSvb/BA== From: Giulio Benetti To: Stefano Babic , Fabio Estevam Cc: "NXP i.MX U-Boot Team" , Simon Glass , Rick Chen , Sean Anderson , Bin Meng , Claudiu Beznea , Jesse Taube , u-boot@lists.denx.de, Giulio Benetti Subject: [PATCH 01/16] arm: imxrt: soc: make mpu regions generic Date: Wed, 7 Apr 2021 21:02:49 +0200 Message-Id: <20210407190304.1478921-2-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210407190304.1478921-1-giulio.benetti@benettiengineering.com> References: <20210407190304.1478921-1-giulio.benetti@benettiengineering.com> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfAzieATh1vwtYuag958DVWLB2uCEwGdp34DDFtEN2ebQDWtwGA3OsobxPaq+Dgr2w0EhnO76Ql/FbP+4YhYqv0xXLxHKzNiiMWldX2YP0CsRf7CbouSH BCdRYGOwCh0KcBOK6sifSlxCzh+f4qTwyj+Z3/Hwu3CawVw4S9TkUnzbtBHhHgi4pw/MqvkADjblgg22Pm66Ju1hwA646vLmbP8lFSFlhdMboVqCM+w/iOZ6 07QDAI7JAB9nkXzbtNS0BOcmYchvWX//3mF/IR9L5GAvB+FBg7Uba6uUD/um5J2ZqgHIShS9W7M+0+gUwkFLkEBO1zmlEVLSdO1pi5ELrPGVlv2Fmd9f13mC I79+n2k41UiE5F0s8quvk9qm2D9RWbQkq041UNxK9zCsKtRwVPQF10YjOho/sk4sRGHofTHrivhKXzPpQaxQTI+2vwVCyc/y3rKB0Vk3xFfHG1HH4zs7Y+EC mFtmx6ZCxpO1Aj7ZePMLasRaMSgcjo4C6p29vCjVNvjwE3y07VOdh3Qcuy0= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean This mpu handling works for every i.MXRT SoC that we have, so let's generalize imxrt1050_region_config to imxrt_region_config. Signed-off-by: Giulio Benetti --- arch/arm/mach-imx/imxrt/soc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c index 8e7d15160d..c533f3554a 100644 --- a/arch/arm/mach-imx/imxrt/soc.c +++ b/arch/arm/mach-imx/imxrt/soc.c @@ -14,7 +14,7 @@ int arch_cpu_init(void) { int i; - struct mpu_region_config imxrt1050_region_config[] = { + struct mpu_region_config imxrt_region_config[] = { { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, STRONG_ORDER, REGION_4GB }, { PHYS_SDRAM, REGION_1, XN_DIS, PRIV_RW_USR_RW, @@ -29,8 +29,8 @@ int arch_cpu_init(void) * the whole 4GB address space. */ disable_mpu(); - for (i = 0; i < ARRAY_SIZE(imxrt1050_region_config); i++) - mpu_config(&imxrt1050_region_config[i]); + for (i = 0; i < ARRAY_SIZE(imxrt_region_config); i++) + mpu_config(&imxrt_region_config[i]); enable_mpu(); return 0;