From patchwork Tue Jan 24 11:23:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 13113996 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6FD6AC25B50 for ; Tue, 24 Jan 2023 12:31:23 +0000 (UTC) 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=NGMR+jnbsYCfbmh9TSGhpGr6RJOFGQBESgZHKhT+wdU=; b=qp79OUentn/fuS cAO9ACv7uBkJCXSHg80yL1qMfaui4BxRdWOvPRi7+oNVmgVTMlnSXQZTklKg4GXNXrI3qOfMGcRwF /UETJaV4MZXItN6oR1NQbPTmEAkDNw638qBi01COscW5nPRZ11+EhXXARW0IUlf/M8OceoA7nkK0r rRtdaASIRa+NSLvDK6eNXMPy1VFqMlieEhWP3NGsoJZm026WqK9sm5hLGzGdJ1ykX8gIPoPXmrcuw wqhkr3oKzuaz3Kx1ykxrmblNYyw3P34TQ/1qMgArxOcf+dMkH7iuL0K0hqerlU4s+d/VSn8Jcx2wA zICQcE74cvq+qKG7UXpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKIRi-003kJ0-2B; Tue, 24 Jan 2023 12:30:38 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKHPU-003Ppq-Bj for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2023 11:24:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1674559456; x=1706095456; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JscX8uGA9J9NS0UAyCvYDfV3eL+GjVw5IIsACFtx3L8=; b=wBtUeBSrOqgdT+Dwt92ZfFsb+Lp1I2gMoI5E3PtMzMWF8iK/2ccdQWev mdflII4beIyl1GhhzDonyUN6NcyYs0H3yzKUu6+RSEaBdCEAm2i3d+RZ0 tHE8a2J+Ehwl55vGujsX899XPGwNeKzll/s3pmG2USRqQtIyTNr6TlsjM NY2W0ppRc1mMkJDlFpbnwMXHFGT+5i/SejgYalVyhpFlg72YRCfFfwgRv DrvnPCCq38LYsTjJlgv1j56SL3cdTF2P0y7DBf78vnGGsw1lZgOiurgKZ 8WUsBJKJbIg31+4xV2OfybsukowsvE4A3G/m4m3t3W8hHtL4CpupAmG1K A==; X-IronPort-AV: E=Sophos;i="5.97,242,1669100400"; d="scan'208";a="209045151" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Jan 2023 04:24:15 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 24 Jan 2023 04:24:15 -0700 Received: from ROU-LT-M43238L.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Tue, 24 Jan 2023 04:24:13 -0700 From: To: , Alexandre Belloni , CC: , Subject: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls Date: Tue, 24 Jan 2023 12:23:48 +0100 Message-ID: <20230124112348.74198-1-nicolas.ferre@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20180711161443.GY16084@piout.net> References: <20180711161443.GY16084@piout.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_032416_431051_CC37F21D X-CRM114-Status: GOOD ( 14.37 ) 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 From: Rob Herring DO NOT APPLY: breaking boot on at91 (sama5d3 xplained / NAND at least) The DT core will call of_platform_default_populate, so it is not necessary for machine specific code to call it unless there are custom match entries, auxdata or parent device. Neither of those apply here, so remove the call. Cc: Alexandre Belloni Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring [nicolas.ferre@microchip.com: update to newest kernel, add sama7.c file] Signed-off-by: Nicolas Ferre --- Rob, Alexandre, This is the updated patch by Rob. Tested on sama5d3 xplained platform it fails at least with NAND and, as you observed Alexandre, SRAM. The pinctrl patch [1] applied seem to solve the problem with GPIO/pinctrl. So, this move is not ready now, but we can make progress, little by little. Best regards, Nicolas arch/arm/mach-at91/at91rm9200.c | 5 ----- arch/arm/mach-at91/at91sam9.c | 5 ----- arch/arm/mach-at91/sama5.c | 7 +------ arch/arm/mach-at91/sama7.c | 4 ---- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 4f8186211619..e262f5459c76 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -7,17 +7,12 @@ * 2012 Joachim Eastwood */ -#include -#include - #include #include "generic.h" static void __init at91rm9200_dt_device_init(void) { - of_platform_default_populate(NULL, NULL, NULL); - at91rm9200_pm_init(); } diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c index 7e572189a5eb..74b4dd8403a2 100644 --- a/arch/arm/mach-at91/at91sam9.c +++ b/arch/arm/mach-at91/at91sam9.c @@ -6,9 +6,6 @@ * 2011 Nicolas Ferre */ -#include -#include - #include #include @@ -16,8 +13,6 @@ static void __init at91sam9_init(void) { - of_platform_default_populate(NULL, NULL, NULL); - at91sam9_pm_init(); } diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c index bf2b5c6a18c6..79dfa257b3b4 100644 --- a/arch/arm/mach-at91/sama5.c +++ b/arch/arm/mach-at91/sama5.c @@ -6,14 +6,11 @@ * 2013 Ludovic Desroches */ -#include -#include - -#include #include #include #include #include +#include #include "generic.h" #include "sam_secure.h" @@ -32,7 +29,6 @@ static void __init sama5_secure_cache_init(void) static void __init sama5_dt_device_init(void) { - of_platform_default_populate(NULL, NULL, NULL); sama5_pm_init(); } @@ -61,7 +57,6 @@ MACHINE_END static void __init sama5d2_init(void) { - of_platform_default_populate(NULL, NULL, NULL); sama5d2_pm_init(); } diff --git a/arch/arm/mach-at91/sama7.c b/arch/arm/mach-at91/sama7.c index bd43733ede18..5faccfe9a9bb 100644 --- a/arch/arm/mach-at91/sama7.c +++ b/arch/arm/mach-at91/sama7.c @@ -6,9 +6,6 @@ * */ -#include -#include - #include #include @@ -16,7 +13,6 @@ static void __init sama7_dt_device_init(void) { - of_platform_default_populate(NULL, NULL, NULL); sama7_pm_init(); }