Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1854199pxb; Mon, 8 Mar 2021 07:57:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJznmSsk28/ei0gBU+ghAMNxxopahv3AaDHVdGhVQnZvH2ja7SnUOikua0TWWvlSsrh8P2cc X-Received: by 2002:a17:906:3882:: with SMTP id q2mr10841603ejd.540.1615219073769; Mon, 08 Mar 2021 07:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615219073; cv=none; d=google.com; s=arc-20160816; b=Wk94zmpk0cpw02KsMqIvE+2ndm0ajH0GiUxWaiY+5L6C7ULoQFmWNO93WmFCg5lIZ1 t7Voy29DeOHIHI0YzMywWZRQic7s149dLYlhxlcPXFHxyeHwT0Gv4z3GdTFEPaEct31V bDZWyQ47bV+10F8QrTAwQtwqlBTY8ts4PH7PuWMKOKx8xnwQOa8AiQSbNpFfK2UUZ5A8 KEa6Aao0qY/qnazGVk0LHS1/fgYPuJJJVOny1P+mLcEhpO8E3f5jfXjhvAHstDqV2JW2 diffxEHLLKaljUUiQtse6vhbyZD+TFbelMXnJX1II0byaYePGbjB2q91tcQnE5k7JdLh KHGg== 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=jF8USmQ9D5u+rSq252gNJqWmmZwyUliFzGkSwkRyS4o=; b=gai7AL1ZnFbUSQTCthXzkaAI8gqVXB3arcG00URL+ItZQrC6EoufDotliU5bqOBbbE XsUzvVl0hlMLEDKr7DbtVGLZTyqjelffam22T4m4b1Sp19H2B4Yqt3AD0cDEhnmMNNH6 AIDrI/DAsP3T2JxMytWHeGWBpHgyJryJZQVz7IW7V6GVctz8ukznSN+0Z3unQ1T06yCe 9a+2fMEdhdceS0FYxwVq7Qm3B8z+1Suv+0/zXtAp7Qb2rLwQHWIm4EX7XtNOkK7lCI++ 6fg167K++25wwTPrSHrIIwZ5ouM921+oYwSQGleAAPArLKBR/Tg6+M90RIc31cpgF+tY u6MQ== 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 va6si6818868ejb.735.2021.03.08.07.57.31; Mon, 08 Mar 2021 07:57:53 -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 S231922AbhCHMWB (ORCPT + 99 others); Mon, 8 Mar 2021 07:22:01 -0500 Received: from muru.com ([72.249.23.125]:40814 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbhCHMVj (ORCPT ); Mon, 8 Mar 2021 07:21:39 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 83E11819C; Mon, 8 Mar 2021 12:22:19 +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 4/4] bus: ti-sysc: Check for old incomplete dtb Date: Mon, 8 Mar 2021 14:21:18 +0200 Message-Id: <20210308122118.62460-5-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 Let's be nice and show an error on the SoCs about old imcomplete devicetree if the dtb is still using "simple-bus" instead of "simple-pm-bus" for the root OCP node. Signed-off-by: Tony Lindgren --- drivers/bus/ti-sysc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2858,6 +2858,7 @@ static int sysc_init_soc(struct sysc *ddata) const struct soc_device_attribute *match; struct ti_sysc_platform_data *pdata; unsigned long features = 0; + struct device_node *np; if (sysc_soc) return 0; @@ -2878,6 +2879,21 @@ static int sysc_init_soc(struct sysc *ddata) if (match && match->data) sysc_soc->soc = (int)match->data; + /* + * Check and warn about possible old incomplete dtb. We now want to see + * simple-pm-bus instead of simple-bus in the dtb for genpd using SoCs. + */ + switch (sysc_soc->soc) { + case SOC_AM3: + case SOC_AM4: + np = of_find_node_by_path("/ocp"); + WARN_ONCE(np && of_device_is_compatible(np, "simple-bus"), + "ti-sysc: Incomplete old dtb, please update\n"); + break; + default: + break; + } + /* Ignore devices that are not available on HS and EMU SoCs */ if (!sysc_soc->general_purpose) { switch (sysc_soc->soc) { -- 2.30.1