Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2648458rdb; Mon, 4 Dec 2023 03:51:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyNL87lctrCnNcwEDJKyLW7pxMS+2pYfb58ZvtaIFFAJiVarc8nhEQrjA/r6Lw+d4Cv4Bn X-Received: by 2002:aa7:9815:0:b0:6ce:4cc8:99db with SMTP id e21-20020aa79815000000b006ce4cc899dbmr725215pfl.66.1701690676580; Mon, 04 Dec 2023 03:51:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701690676; cv=none; d=google.com; s=arc-20160816; b=a+zYnT6k7ZsSEOLIaJKoYUCaayfCRJUVxdh0oLIlq4faFY3cPbwXmY+y8LqMNhKnHb iW461w24ulgXSPMW46SqtyA9gf3+WQg3tK5fpQkA/ffJtGexdfj+2cXH8VqTOk9AT3ob UTwM3md7cwKS5SV+8ZLryWJpeYqKsBD7+5w9CBY7jAu7pm3G/9c50QJA5HWNs1G+E5b0 Q7Rh5gVhKcSkVYrhkcm5As53uHT6nQh5D42j1j0ou4YhPAvTVwyTqUSGqUqeQxUd27yO 0HuDPN/GJ3q12CipbnSVnn3ShHUiv6tugBIdLg+qlMoL4yL8BAK9cmALA/X3QisMvEwa wPyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=BQ8wrUvsRQvrD5Z7Q2ZVUp+Q+YA+5epV6DgjnV+h6Ds=; fh=bYYeCqBxkLtl1kWsk8OOCkbj3abGxVAJF1rZR07HU1c=; b=E8OHvk3mW2S0O5y70VywncyXqO1GTSd2d9WCMlPpwQyLD+LjfO7WB3yNXLqlaNHxOp r6C5PnLoN8Wcdq8NMd9ALbyiIrYzABCNmWbVGHGxveEmm7Hwaf1NLMzp7RoevyH3YrFk 651+oW0wqSF0xhCJt/qKupzG2Uqmyz/gSaFw2r060pu2glsUeEgsvGy4MhOh2d1Uw3kn xQafBGJwB5vnsAGqoVASAygud7KMv3zk5kZdSgQWX8Vt1ChEpz7GHB61MXQRZ0qOI6nJ rq2ZVTUl1en+j3Zxxlq9yap/8CvPBS65q5N7ZFHyidcD+EVLYg7DBfV+xS6soTIhBo0M t2dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p1-20020a63c141000000b005c68d9545c7si1625556pgi.334.2023.12.04.03.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 03:51:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0A5A38093F4E; Mon, 4 Dec 2023 03:51:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232898AbjLDLux (ORCPT + 99 others); Mon, 4 Dec 2023 06:50:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjLDLuw (ORCPT ); Mon, 4 Dec 2023 06:50:52 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9995B6; Mon, 4 Dec 2023 03:50:58 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C3CED152B; Mon, 4 Dec 2023 03:51:45 -0800 (PST) Received: from [10.163.35.18] (unknown [10.163.35.18]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B9B63F5A1; Mon, 4 Dec 2023 03:50:53 -0800 (PST) Message-ID: Date: Mon, 4 Dec 2023 17:20:49 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 6/7] coresight: stm: Move ACPI support from AMBA driver to platform driver Content-Language: en-US To: James Clark , linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Lorenzo Pieralisi , Sudeep Holla , Mike Leach , Maxime Coquelin , Alexandre Torgue , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com References: <20231201062053.1268492-1-anshuman.khandual@arm.com> <20231201062053.1268492-7-anshuman.khandual@arm.com> <0adc3a16-0fc4-2a25-cd48-4667881b9490@arm.com> From: Anshuman Khandual In-Reply-To: <0adc3a16-0fc4-2a25-cd48-4667881b9490@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 03:51:08 -0800 (PST) On 12/4/23 15:53, James Clark wrote: > > > On 01/12/2023 06:20, Anshuman Khandual wrote: >> Add support for the stm devices in the platform driver, which can then be >> used on ACPI based platforms. This change would now allow runtime power >> management for ACPI based systems. The driver would try to enable the APB >> clock if available. >> >> Cc: Lorenzo Pieralisi >> Cc: Sudeep Holla >> Cc: Suzuki K Poulose >> Cc: Mike Leach >> Cc: James Clark >> Cc: Maxime Coquelin >> Cc: Alexandre Torgue >> Cc: linux-acpi@vger.kernel.org >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: linux-kernel@vger.kernel.org >> Cc: coresight@lists.linaro.org >> Cc: linux-stm32@st-md-mailman.stormreply.com >> Signed-off-by: Anshuman Khandual >> --- > [...] >> >> -module_amba_driver(stm_driver); >> +static int stm_platform_probe(struct platform_device *pdev) >> +{ >> + struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> + int ret = 0; >> + >> + pm_runtime_get_noresume(&pdev->dev); >> + pm_runtime_set_active(&pdev->dev); >> + pm_runtime_enable(&pdev->dev); >> + >> + ret = __stm_probe(&pdev->dev, res, NULL); > > Very minor nit, but this used to print this: > > coresight stm0: STM500 initialized > > And now it prints this: > > coresight stm0: (null) initialized > > (null) kind of makes it look a little bit like something has gone wrong. > Maybe we could just put "initialised" if you don't have a string from ACPI? __stm_probe() gets called from both AMBA and platform driver paths. Even though a NULL check inside dev_info(..."%s initialized\n",...) could be added, but how to differentiate it from a scenario when coresight_get_uci_data() returns NULL ?