From patchwork Wed Oct 19 08:31:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp281671wrs; Wed, 19 Oct 2022 05:02:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ds87OQAA3KZUu+tHIAAi1KosGJLDab4xQZlXFaoiIbP9Cp4P+B735i85X9o52rLdf0YBs X-Received: by 2002:a17:906:730f:b0:791:9b75:2ca1 with SMTP id di15-20020a170906730f00b007919b752ca1mr6141343ejc.140.1666180938594; Wed, 19 Oct 2022 05:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666180938; cv=none; d=google.com; s=arc-20160816; b=b2TsHMyuBPPKoMIHgpsKqO+0Jw7CAfd0t1/9aq1VTkVD+G0Qs+sPR6ywR23Blbnqed 7gLqrxdRDPIZavgvJjJnD0e55uLumseSKLSnjPJQ0bT4P7/rKAXmK/GlCqjjWcenqK5G 0uszYsCDTxJK+fFWnYcbzp2/bZ0UU9B9Q8RqHV5vdMtKl+hfAAQEgkSqhNxv/38y9R2q BCMVFFIZDEbQoki8MbmrDmZRTpKUUL7ZiT0XcSydcUKmRRkY5+cQMjLQHs37hZDCu1UF 2DAo6/tklBNK4MBVcowH39wAf6mkYMIWeFLihsOvvVxWm6MLY7UMrh3o+TK2wFVCsxUU J+rw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gRVaG6uS85aaWcQh02JbwJYNx/ubmeUASCkOmvODBvY=; b=BPpy5QPkTpIQfbKhznUL9FV6FQlrh5Dx3reqoS4Oge1NexF7GhxLliX4wAwqOzPqC/ fqP1MophxncquAKH1QVbplQUnewbYd1SPdFcNV/EFAQbnlQuJ5FDbmR6d5KTCCXWCkfx laEVDNizP2eEtpfr/3bUf8fJtyOIFOIlfDpvola/KrnQ3tPx7D/eAE32p0in0MURxZVU LxaIAOwlMIp8A2A40cw3mQIRDTqFs8Y9fu/WZtdKQIm4IAZsxiJUWlG6wZDgeq0HoSbs Por+BC40iwTBbgUnAcratVpHS+XipX9dtcp+eVNUk8rFIw8HZmYXtLlo/6tpAvJ4s1mq SuWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nm/aBJ2g"; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a056402015300b004597b778b3bsi12425409edu.75.2022.10.19.05.01.50; Wed, 19 Oct 2022 05:02:18 -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=@linuxfoundation.org header.s=korg header.b="nm/aBJ2g"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbiJSL6N (ORCPT + 99 others); Wed, 19 Oct 2022 07:58:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbiJSL5k (ORCPT ); Wed, 19 Oct 2022 07:57:40 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 714C3181CA2; Wed, 19 Oct 2022 04:36:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B7CA6CE2165; Wed, 19 Oct 2022 09:04:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3590C433C1; Wed, 19 Oct 2022 09:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170254; bh=XyyJvjno3/eowPKmgIE2dZVJj4PyKKovVsa8PFz8u30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nm/aBJ2g78/ylR92QyGOevzCO3ej5xh4UWy6+PumftgcuY2da154XD5ctS88MixpR ZZdbHbn/H54Po29AH5c31y7J5IxZZxoGEF2sIb6Jt07Eyg5gHyxrLGoR/MvfjN1bg6 JqIohx/cZE0dZcoXyd19Q4kGSIoCd2y0qrYZNWLg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Baryshkov , Johan Hovold , Vinod Koul , Sasha Levin Subject: [PATCH 6.0 585/862] phy: qcom-qmp-pcie: fix resource mapping for SDM845 QHP PHY Date: Wed, 19 Oct 2022 10:31:12 +0200 Message-Id: <20221019083315.815097879@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747117343641532911?= X-GMAIL-MSGID: =?utf-8?q?1747117343641532911?= From: Dmitry Baryshkov [ Upstream commit 0a40891b83f257b25a2b983758f72f6813f361cb ] On SDM845 one of PCIe PHYs (the QHP one) has the same region for TX and RX registers. Since the commit 4be26f695ffa ("phy: qcom-qmp-pcie: fix memleak on probe deferral") added checking that resources are not allocated beforehand, this PHY can not be probed anymore. Fix this by skipping the map of ->rx resource on the QHP PHY and assign it manually. Fixes: 4be26f695ffa ("phy: qcom-qmp-pcie: fix memleak on probe deferral") Signed-off-by: Dmitry Baryshkov Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20220926172514.880776-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 819bcd975ba4..0baf62d80214 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -2333,7 +2333,10 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id, if (IS_ERR(qphy->tx)) return PTR_ERR(qphy->tx); - qphy->rx = devm_of_iomap(dev, np, 1, NULL); + if (of_device_is_compatible(dev->of_node, "qcom,sdm845-qhp-pcie-phy")) + qphy->rx = qphy->tx; + else + qphy->rx = devm_of_iomap(dev, np, 1, NULL); if (IS_ERR(qphy->rx)) return PTR_ERR(qphy->rx);