Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1012904rwi; Wed, 19 Oct 2022 05:50:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Y+Nart8yTe5BR7qMiqw6aSUdeQ1V/A1oKOi6VZ0iQNBZQWr5n3zu1PJpJPtmByZmuWWlb X-Received: by 2002:aa7:cfc4:0:b0:459:7fa7:ee29 with SMTP id r4-20020aa7cfc4000000b004597fa7ee29mr7145297edy.414.1666183809252; Wed, 19 Oct 2022 05:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666183809; cv=none; d=google.com; s=arc-20160816; b=W3p1YZaExgYKwtjLDovfNWhsvkDGOfctxXm7ES/oeb42vlcHb49rvCwsREIhblUcZ2 nuwzqwTewYJi6xascYW8ZTtl8wytxrirb4Y4xyl46PG0fF9k4KMA7hnOW90odKc8vh8N jCD5SFQLJbRyKHtbKkyADjmn+dYQa0tfbgEDrtS3RhrtpWwzu5ZUXelU3X0qVMBh+sO7 dWLvfRhGD35RQbzviUCGtHQ8I5K0e3JdpLaklbDfyXDh180g0GhOCGU5VFhtXRqA7AcV OVHdzo8Vs6kiN0kf+BKGjtjVcIso3khF1zCEB2+RfJLTMA3wSch6yQsm33KL1T3Ru+eI xz7w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lg22-20020a170906f89600b0078c959aea8bsi11726134ejb.324.2022.10.19.05.49.41; Wed, 19 Oct 2022 05:50:09 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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); -- 2.35.1