From mboxrd@z Thu Jan 1 00:00:00 1970 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 BDFF9C43217 for ; Thu, 24 Nov 2022 12:26:12 +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:In-Reply-To:References:Message-ID:Date: Mime-Version: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=i+uUdnS5knArbU7BpRyi2aScXxK5Ib3mdEl/XzpKdBg=; b=JzpuYxvNDLlq8b PhipDk9/VJn/SUjBQp6tNLUQo9mGiqKpFiEyXiDvkui0trtOC0HnWwaFvSRKAKA5vdQSdAbWmHQwS QiStj3ZgQ2ctw0ri90AlcQN7PEH4hTFgbRqahUj40JbHnC7nYv2r3oIf0cRK2Tbl/VIjKvMTy7o9M s6dbRuzOpo1/UgxJWdPZlzAyJn68LcemIQ1jMFXp1Ts/BwX0zmwnRINYtai+QUKSyHZhpMc+ePeFr ADlM36GU05F94MuR1Rkpj2BhfbOKKBH1dhvojoRcY0ZFn+vvLY8ndfabDi+ylkMx0TUFOoiltuP8B hTh12IVxz20PHYYI079Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyBHm-008KQ3-45; Thu, 24 Nov 2022 12:24:58 +0000 Received: from smtpbgbr2.qq.com ([54.207.22.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyBHg-008KJr-6C for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2022 12:24:56 +0000 X-QQ-GoodBg: 2 X-QQ-SSF: 0040000000B00070 X-QQ-FEAT: wPIjJ9FgeVWsBiS/dltYVBSXJxVV701pwLOnQP3FuLCtVv5RREYOD40wdnqrL tBTHpVOhaBlDzyhz9np0hZWZ+zlMn4Xa5Ql9Zn1aV4CEN7oGhI18gkaVFTgSzhNfOlYftr5 uPUptb73EDY33JGsLD/xZYvT1xjDQV6qZMNC4xIOuJubIg1O17Ye/v5iQ44+1LmBm8QXXVs AQTIO93YWsq929L+jnc7+tLzIklAyPaCTf3yyCfUQ9gylueAFecBmPyEIh1zWc+6Gd3W4Mq IOXLSNfc9v23jghaQu6WPhlK0O14RpfZHhspRA4x8Pge3Zal0X5H6TryfUC1TMDFa6DgDuy qlLfHc8arvXNKxUKAg8pluG04zHZy813TAMG/UF X-QQ-BUSINESS-ORIGIN: 2 X-Originating-IP: 223.72.214.84 X-QQ-STYLE: X-QQ-mid: logic633t1669292638t6368341 From: "=?utf-8?B?546L5rSq6L6J?=" To: "=?utf-8?B?TWFyayBSdXRsYW5k?=" Cc: "=?utf-8?B?U3VkZWVwIEhvbGxh?=" , "=?utf-8?B?Q3Jpc3RpYW4gTWFydXNz?=" , "=?utf-8?B?SmFzc2kgQnJhcg==?=" , "=?utf-8?B?bGludXgtYXJtLWtlcm5lbA==?=" , "=?utf-8?B?bGludXgta2VybmVs?=" Subject: Re: [PATCH 3/3] arm_scpi: modify to support acpi Mime-Version: 1.0 Date: Thu, 24 Nov 2022 20:23:58 +0800 X-Priority: 3 Message-ID: X-QQ-MIME: TCMime 1.0 by Tencent X-Mailer: QQMail 2.x X-QQ-Mailer: QQMail 2.x References: In-Reply-To: X-QQ-ReplyHash: 504006716 X-QQ-SENDSIZE: 520 Received: from qq.com (unknown [127.0.0.1]) by smtp.qq.com (ESMTP) with SMTP id ; Thu, 24 Nov 2022 20:23:59 +0800 (CST) Feedback-ID: logic:ucas.com.cn:qybglogicsvr:qybglogicsvr4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221124_042453_364235_1376FF8A X-CRM114-Status: GOOD ( 18.44 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Thinks! When boot from uefi on phytium ft2004(arm64) platform, can't show temp & freq of cpu, but well if boot from uboot for same kernel binary file; So i modified arm_scpi.c and scpi-hwmon.c as patch, and tested ok. Best Regards! Wang Honghui ------------------ Original ------------------From: "Mark Rutland";Date: Thu, Nov 24, 2022 07:03 PMTo: "Wang Honghui"; Cc: "Sudeep Holla"; "Cristian Maruss"; "Jassi Brar"; "linux-arm-kernel"; "linux-kernel"; Subject: Re: [PATCH 3/3] arm_scpi: modify to support acpi On Thu, Nov 24, 2022 at 03:09:31PM +0800, Wang Honghui wrote:> arm_scpi: modify to support acpi> > Signed-off-by: Wang Honghui > @@ -937,55 +952,116 @@ static int scpi_probe(struct platform_device *pdev)> if (ret)> return ret;> > - for (; scpi_drvinfo->num_chans < count; scpi_drvinfo->num_chans++) {> -resource_size_t size;> -int idx = scpi_drvinfo->num_chans;> -struct scpi_chan *pchan = scpi_drvinfo->channels + idx;> -struct mbox_client *cl = &pchan->cl;> -struct device_node *shmem = of_parse_phandle(np, "shmem", idx);> -> -if (!of_match_node(shmem_of_match, shmem))> - return -ENXIO;> + /* Wang Honghui modified to support acpi */> + if (dev->of_node) {[...]> + } else {> +for (; scpi_info->num_chans < count; scpi_info->num_chans++) {> + u32 size;> + u32 addr;> + int idx = scpi_info->num_chans;> + struct scpi_chan *pchan = scpi_info->channels + idx;> + struct mbox_client *cl = &pchan->cl;> + struct fwnode_handle *fn;> +> + fn = dev_fwnode(&(pdev->dev));> + ret = fwnode_property_read_u32(fn, "shmem_start", &addr);> + if (ret < 0) {> + dev_err(dev, "failed to get SCPI payload mem resource\n");> + return ret;> + }> +> + ret = fwnode_property_read_u32(fn, "shmem_size", &size);> + if (ret < 0) {> + dev_err(dev, "failed to ioremap SCPI payload\n");> + return -EADDRNOTAVAIL;> + }ACPI has native mechanisms to describe IO resources, so this doesn't look right at all.Does ARM have ACPI bindings for SCPI? I don't think we should be inventingvendor-specific bindings for this....> + if (!ret) {> + pchan->chan = phytium_mbox_request_channel(cl);... so this looks very wrong.Thanks,Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel