Message ID | 20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp528532vqx; Mon, 3 Jul 2023 06:34:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHemYgT7CGMQutQt3iXtCGAHflfyQO2jyIcGBXgZYOh8xj2MUalK4xHX3rNvuhdP4xSb2Bc X-Received: by 2002:a17:90b:889:b0:263:204c:3c80 with SMTP id bj9-20020a17090b088900b00263204c3c80mr11940427pjb.4.1688391289564; Mon, 03 Jul 2023 06:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688391289; cv=none; d=google.com; s=arc-20160816; b=N3gahdl0VTFnVUALNXY5zg7erxEIaB0ZrvZR3BVr4MgMRlsU6b9cU+pk+oFRg/FT8U rw8/vEFQ+6vCaDD488PBLDtczygRx/JtN7SJdXbQ6e3cJUPdVERyyrc7tWCHfFgFz4Fg Ai3Ero2iknNryfAB80/jckH8sQjNX5smcHfoFJvlkwId34P6/wurr/74v7/svl+EmEpD nsdYWStg7DKpFYcPIIOSZRIIAFoOgZVRmu+vEAWSTrZMfDqn4i9tOq6JT9r1ZRMzLj+t Zy90T3dt2wCmTmUq76JfZ9iug4A4GQWjo+KAWgcGsMzOv6021q5LC0owF+KYPBkok7Qo mhCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; fh=EV+5bRVCKNG17q531vPQpoKiuN4tfzBrxhdEOIK2W5o=; b=p66lJOylp76veeLxvSE8xJSwzxuqTeFh//G0OPC90Bb40vGOaiGtvyCaPKHB8mqW/m f9tAOeu+6NYxXmLKkVLzIkqTe8+p5WohBV1d9bfKXCTsfpNGZ4mnCDVpbpvsoXY81BMO JZ+nkSIDTq61rol5NoHdofHA2XWsyBg8vzu92AjOWYcoRr7YBFuBNTGME3omDtMqycuD fcRMOmMXQOm6XHNtXvpFLPyVMdGUoHRqGwLER9+G0FMEaMfvbkFdqNRlMAJJ5G6uB1+a qiiDqGAQ6ygKNqWleV/HjCEBeYhIvAlwaXE7H78UkyUevjqClkdF0qZSZSakiqpL0tDa NA2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qW3/NAVc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a17090a550c00b00252835d797asi17840002pji.26.2023.07.03.06.34.35; Mon, 03 Jul 2023 06:34:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qW3/NAVc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231661AbjGCNbb (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Mon, 3 Jul 2023 09:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbjGCNbX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 09:31:23 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A862E6A for <linux-kernel@vger.kernel.org>; Mon, 3 Jul 2023 06:31:21 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4fb5bcb9a28so6855832e87.3 for <linux-kernel@vger.kernel.org>; Mon, 03 Jul 2023 06:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688391079; x=1690983079; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; b=qW3/NAVcPirJqJtbsyH+kRmHKIvIUgTk/AzW93yk8n28IMpfwy1cuLTyLConHraNgl 4uf84sfG2b8Xp/SDX/h3gnP3OhZj4hdDuRc335s4naLazI3i9wOfhxEU/zraW3/K9MJs aXqhZfHsKeZOMinT5nsmYYKXU4h9UnVdybQY5VOWEZc+DRJcPPvXCMDFYQfgZAzUPSjn K4NtELU6FwE1q9I1H7jmSGC1UT6SrbrCZM5jpmVC4LV7nXUl/f+Y1opJCZl/Y/RmCyl/ LvwYlFA36QDaGkNCS5eRMbcMQjwuWXGAnG0c/Y0yERirIg6s5uL96ZnoE3lbrmVPUfw6 25Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688391079; x=1690983079; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0Tw3K884EqPljezRBvFH8q3oj/FtWnGBPlC6pRuCDw=; b=BnslGKzGDRwnPJuDNUESv6KYqr6P6izMMvcarUGdcnjyCKxslRufw0b3XmEstXB2cy 5Y3vgElH7BJ1v1R+dvUCOVdzpODlJ3OTJIPyfnanVfdkWDyxH1C3Xzy0xWHpOeIoTFlY lOAH3fRjNFyCIJ9ny2qSa489SDYFDhV7AMxbkWB+91lFmmbvMMN/aANImgR82/S+Ph8l 09VYF7WGgDbLBiK4TPHwiuIZ8TmKxXaikZ9hHfb+MAuNqd4lL9zz0SGU16pUb9hUv+BU rhC6p2kW6tjmwvR2R4zyZv/HfDchwgFSvvPowN2FiItF9/omNptc09iQfuOliiXQf36h r5EQ== X-Gm-Message-State: ABy/qLZSrjRlXU4N9xo1GiT/86DQdr+GWatk5DQDY00E3npWMfUbHmUR 0DN1uF6RA7uAUqBI8HSfCYPhYg== X-Received: by 2002:a05:6512:36d1:b0:4fb:9d61:db4d with SMTP id e17-20020a05651236d100b004fb9d61db4dmr6401322lfs.18.1688391079411; Mon, 03 Jul 2023 06:31:19 -0700 (PDT) Received: from [192.168.1.101] (abyj26.neoplus.adsl.tpnet.pl. [83.9.29.26]) by smtp.gmail.com with ESMTPSA id ep7-20020a056512484700b004fbb1f70ceesm833417lfb.227.2023.07.03.06.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 06:31:19 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Mon, 03 Jul 2023 15:31:13 +0200 Subject: [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc paths MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org> References: <20230703-topic-8250_qup_icc-v1-0-fea39aa07525@linaro.org> In-Reply-To: <20230703-topic-8250_qup_icc-v1-0-fea39aa07525@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andi Shyti <andi.shyti@kernel.org> Cc: Marijn Suijten <marijn.suijten@somainline.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-i2c@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688391072; l=1230; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=co9BdW2nWkUZOcUTizkeFw8YjDRYAbLHFxUe7vw2Hi8=; b=Ujk0LJDy05oagsVI8a6ZmnNEpYOuoJq5uyL6lqwIgDGgLZ20MpLNP89MZUyPsBsmv07eQPoRN Ej8VC4qyRHWCZhU8eSpTrxsn3vV2PM+Q5TalSz6YgYzA2YdP3bIRV8v X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770406584701580924?= X-GMAIL-MSGID: =?utf-8?q?1770406584701580924?= |
Series |
Add interconnects to QUPs on SM8250
|
|
Commit Message
Konrad Dybcio
July 3, 2023, 1:31 p.m. UTC
Not all SoCs provide all the usual paths. By the looks of it, at least
SM8150 and SM8250 don't have one that would resemble "qup-core".
Check for the error that icc_get throws and assign a NULL value to each
path that can't be found to effectively allow any combination of icc paths
(which, like previously, includes no icc paths). The ICC APIs gracefully
handle a NULL path by exiting early.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/qcom-geni-se.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Comments
On 03/07/2023 16:31, Konrad Dybcio wrote: > Not all SoCs provide all the usual paths. By the looks of it, at least > SM8150 and SM8250 don't have one that would resemble "qup-core". > > Check for the error that icc_get throws and assign a NULL value to each > path that can't be found to effectively allow any combination of icc paths > (which, like previously, includes no icc paths). The ICC APIs gracefully > handle a NULL path by exiting early. > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > drivers/soc/qcom/qcom-geni-se.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c > index ba788762835f..a5e2e8925c8e 100644 > --- a/drivers/soc/qcom/qcom-geni-se.c > +++ b/drivers/soc/qcom/qcom-geni-se.c > @@ -813,8 +813,13 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr) > continue; > > se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]); Would it make sense to add (devm_)of_icc_get_optional instead? I think we already have several usecases for such API call For this patch: Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > - if (IS_ERR(se->icc_paths[i].path)) > - goto err; > + if (IS_ERR(se->icc_paths[i].path)) { > + /* Not all SoCs implement all the paths */ > + if (PTR_ERR(se->icc_paths[i].path) == -ENODATA) > + se->icc_paths[i].path = NULL; > + else > + goto err; > + } > } > > return 0; >
diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c index ba788762835f..a5e2e8925c8e 100644 --- a/drivers/soc/qcom/qcom-geni-se.c +++ b/drivers/soc/qcom/qcom-geni-se.c @@ -813,8 +813,13 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr) continue; se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]); - if (IS_ERR(se->icc_paths[i].path)) - goto err; + if (IS_ERR(se->icc_paths[i].path)) { + /* Not all SoCs implement all the paths */ + if (PTR_ERR(se->icc_paths[i].path) == -ENODATA) + se->icc_paths[i].path = NULL; + else + goto err; + } } return 0;