Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1701886pxb; Mon, 8 Mar 2021 04:25:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjwjqRlcb9OZmqiDRAO7GgXB3zrZlKfNvDT2ghdlrHpra4hZGa2I9hiVj1VuWDHk5sHd+b X-Received: by 2002:a17:906:5acd:: with SMTP id x13mr14577895ejs.211.1615206347660; Mon, 08 Mar 2021 04:25:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615206347; cv=none; d=google.com; s=arc-20160816; b=TfB/KeG5mDXq4FvkeS7kEHpg+abGRWhEnGHQpnGXYG7sda3dcVYnR8le0vr5Qi7SqP +AA3c4ksTtHkLSWzLF8TU4Quh9zBkTBZANgIDWFtF52+mqMj4iJTd6XrNLC0M2YkXUoy qmekux9gEPCXF4voSf2dN/92wylsMlxV18ZeDgsye9ovsPqr1mN0GQR/SjcMVZGiLYcI HW5qqY8uJZhWUSY/jt8MZHaAXgEzOnwvdf0PvIzvhIEtKzNeKxzWkvy2WxBQX8IrGStM Aeid25ocihNV5kObgjhI0O5dSO/7zGHezFikmh8+DHAZssr4vIDqPbidNHxL80XDY3mj QK9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bU507S1BeKoxvrSGJORQT10o2qm62v360VHaqul1ih0=; b=VLGqfomPGuEuUfh13yr7qNvSggUazgHM426SVGmcnYKIEhoa6ixsaMs6Ghp/2IAgrt CewD5i0H32gGct6pCgO/3/SM99t/YW8ZQDWFbc1nAhUv/CP8MOg79fLv74kOOreqK6af uS3ZATM17eFSUfIf6VpEgdf/DoVsjGxO2Vi2S61dtwuqcLD2TjuFyCy3ctN1nayw9hY3 1cNkLP4tCl3KvdKsHy3ofxjRyGH+0Z3Lou8H1lbzUnlqSHbRR3AyKqTgggH9zfGxK32u sH4oYnbRIx24BN7iFkXlP2Jklad/OE9U7t5AwXsix9J4J7xyu8c7K8PI2FJbW8U4xb61 Tzmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si6953531ejy.135.2021.03.08.04.25.24; Mon, 08 Mar 2021 04:25:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231760AbhCHMV5 (ORCPT + 99 others); Mon, 8 Mar 2021 07:21:57 -0500 Received: from muru.com ([72.249.23.125]:40780 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231653AbhCHMVb (ORCPT ); Mon, 8 Mar 2021 07:21:31 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 8DBBF8117; Mon, 8 Mar 2021 12:22:11 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Nishanth Menon , Suman Anna , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Santosh Shilimkar , Stephen Boyd , Tero Kristo Subject: [PATCH 1/4] ARM: OMAP2+: Init both prm and prcm nodes early for clocks Date: Mon, 8 Mar 2021 14:21:15 +0200 Message-Id: <20210308122118.62460-2-tony@atomide.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308122118.62460-1-tony@atomide.com> References: <20210308122118.62460-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to probe both prm and prcm nodes early for clocks as they are needed by system timers. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/pdata-quirks.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -569,10 +569,29 @@ static void pdata_quirks_check(struct pdata_init *quirks) } } -void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table) +static const char * const pdata_quirks_init_nodes[] = { + "prcm", + "prm", +}; + +void __init +pdata_quirks_init_clocks(const struct of_device_id *omap_dt_match_table) { struct device_node *np; + int i; + + for (i = 0; i < ARRAY_SIZE(pdata_quirks_init_nodes); i++) { + np = of_find_node_by_name(NULL, pdata_quirks_init_nodes[i]); + if (!np) + continue; + of_platform_populate(np, omap_dt_match_table, + omap_auxdata_lookup, NULL); + } +} + +void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table) +{ /* * We still need this for omap2420 and omap3 PM to work, others are * using drivers/misc/sram.c already. @@ -585,13 +604,7 @@ void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table) omap3_mcbsp_init(); pdata_quirks_check(auxdata_quirks); - /* Populate always-on PRCM in l4_wkup to probe l4_wkup */ - np = of_find_node_by_name(NULL, "prcm"); - if (!np) - np = of_find_node_by_name(NULL, "prm"); - if (np) - of_platform_populate(np, omap_dt_match_table, - omap_auxdata_lookup, NULL); + pdata_quirks_init_clocks(omap_dt_match_table); of_platform_populate(NULL, omap_dt_match_table, omap_auxdata_lookup, NULL); -- 2.30.1