Message ID | 20231016161738.2854352-1-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3588402vqb; Mon, 16 Oct 2023 09:43:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBO5tET/bJ4bao0c1Lu/Clc8T4N6TYr3pFXrcxKcKbzDuVbKbic2Iazi+gKOh5SRhX9LnZ X-Received: by 2002:a05:6a20:7da2:b0:15d:6fd3:8e74 with SMTP id v34-20020a056a207da200b0015d6fd38e74mr42177869pzj.3.1697474596865; Mon, 16 Oct 2023 09:43:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697474596; cv=pass; d=google.com; s=arc-20160816; b=BWIYSA8XbQMeIuq8zryvSB0aIJDsP1o46AETsZWE7LAGZo2Nd9t/W83pdNmsvIC9VE qNY7XQL5rwL5wqanDWdJQ0SoFjOIoS1vtFVBt2HTaFuo+Rv6FS0z+PXwZgUgK9QylHVb qayRZUMH5eJQugC/oec53sBm1kQ5ID1MpG+xvo6wZdYoeRAhZssysh9RHtv+7fi764YE Gfx7G3hcEEv+zROsn22yMX8iSSbF6Ju5eC0fARuepuq1pzXnGn97pHhhbGplkBuOmufN 3jlFt31QYwS1AZz3c9f5gX/JfqRFbgVqjiJfoNTtoe31Q0067egXz7PpQPCmn4Z8BqH6 O/rw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=gFYR+dkGDlgL5yaHVizzXLM62tWzlBzhipd8dcmVGJk=; fh=hcaUxgS2XlQHla+W5HfOGEcJunKFhPD6I/OsnpJytRE=; b=MylLeF2SfLkkXucAZ7+HUjV8i02HpGIkpOMxXDHIeUGHL8ysKCt6c/ZukBEzjesK8Y L59XUWF/Iq6pkA8eQiVa9/6c0+RRFL1f1imBJCckAgk4/QL/whb+CxsvhobvPD3avaiL Z+AjUGvU4cZ0ui2WokuWft2XnbP4YsWuwcrMyei492S963fQF4j/01SXTCWremqifoLU aeJ16YHXRuqnePZRy7RHizCd6Ti1uj5wNHvZJ4uH1gNYKjCuV4jaB/u2fPq8Tr/dgr9w ezkCiMjq9+qzCs4LlV+uIMISgzcLx7Wish7eGTlmMo+SMS+i6q+cIg9nmKHc9ZdrZMTw xKHA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ojGMWOuy; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h11-20020a65480b000000b0057806be7290si10712792pgs.451.2023.10.16.09.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:43:16 -0700 (PDT) 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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ojGMWOuy; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CC56C8076676; Mon, 16 Oct 2023 09:43:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234551AbjJPQj4 (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 12:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234253AbjJPQiN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 12:38:13 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2084.outbound.protection.outlook.com [40.107.21.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD952111; Mon, 16 Oct 2023 09:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nO3ZMD9wR/uu4B7xUFq/JnY46Wd8FSqSX6IuxdQOLUqGvfKIlHNJYa1wEepWpyYy1iYjmTmF/eoxIHQK1z//F08uoy8NQFfwHGbUF7nwq5mURl0+pK/ika5bvYDnbIhQClOsVRLtHMI5jHhdMq8I9H0QfAUyG/+K06LIEf0uWM4rfhpLkQIqvhuucPI8XCsSXoyWydQtW10zht2RLcvw6E/9j09Fo74uUiZlLZbHJ5AxcCS2lDqTv4pWvhYy1gBCnzZ4QIV9Gis+gWYhJEsCbr4TcnvVrJiyq1JecNI6JCAT3aUEwDibCTYH5vZfqFcRdLNuDQopj3i98nRVmHa9Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gFYR+dkGDlgL5yaHVizzXLM62tWzlBzhipd8dcmVGJk=; b=IYjIjipDUn3QxtdQB9tE8mV0wFjpJy00Y6rmtcU8oXNFikJNLWVQAuWJ1uKeeIruxJZLi/iE3Yl8i9dOJPlusmXN6AsIYKZiAB2jiJaZt6kKx/hJ7SuilfwJm5np+iqIVTTGOTRYTK1pmZsj1bA4y52QPySdu1ZLmuNMG+DsZuddDhw8qNtbv3aOe2uRT/RmCQqsG0O15ghNh/9KFEjSH3ABjpyolP/5429fzt5S6L9Hqn9/bYdBZaZCFeI5V3bSk6/zShHvcgSpi7bPTKfu4r/XWqzwL1zAsM7W+W83heA+y5JVsBoRYL6bKWxgB0eevT2aNg26evDnzUbMITd4oQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gFYR+dkGDlgL5yaHVizzXLM62tWzlBzhipd8dcmVGJk=; b=ojGMWOuybwzq3ITD2ACBXsau3KQ64J7F1hvWNSMHBJwSMyLm3AHntUO9fAmtQgIAV5+lwUrej3k3bPSH3LzrlTV/C30rWBi1gsNJg4lRPObUyHzgTqAohaRDvJBszlYbUa0Ek9X9F1B8VKipm1f5nDfkSqI6H0gYXK41g4iMEZM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AM9PR04MB7489.eurprd04.prod.outlook.com (2603:10a6:20b:281::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Mon, 16 Oct 2023 16:17:57 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6886.034; Mon, 16 Oct 2023 16:17:56 +0000 From: Frank Li <Frank.Li@nxp.com> To: lpieralisi@kernel.org Cc: Frank.li@nxp.com, bhelgaas@google.com, helgaas@kernel.org, imx@lists.linux.dev, kw@linux.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, minghuan.Lian@nxp.com, mingkai.hu@nxp.com, robh@kernel.org, roy.zang@nxp.com Subject: [PATCH v2 1/3] PCI: layerscape: Add function pointer for exit_from_l2() Date: Mon, 16 Oct 2023 12:17:36 -0400 Message-Id: <20231016161738.2854352-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR11CA0085.namprd11.prod.outlook.com (2603:10b6:a03:f4::26) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AM9PR04MB7489:EE_ X-MS-Office365-Filtering-Correlation-Id: fe367f43-d6a4-4929-a475-08dbce637522 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Di7xGs++ICMPpBovJfRL8Tf7auA1CEPOY9D1oXyJfVdvZXOnPXlSBBBNiQOXm24xtBuxvLGLG5AythzxurknFMn600eBLY4b+9aJ7w2pqaj2Yi81sj6O5W0ujz+gWupMt6GjnA6WfBTf0QqFerkVzVsM5NuqWHqc9HfcsnTu9c/FytLZt9jEUgccEGQxN08qSwB4E13rFzXBSdCoZT3Vm8Ww7nmYuON2niC2Ntjh1Dx0shk9kzr8Vcy8cCJSG0K054wlZ04bMmhajibPWhLdCZGh/TYOBPp9Wim3vc8MBtXAr3IKsAgDExeP+5rYgcqdvfgBQ+3lNMRlPQIXe8zN3yaWhbT+eZQkpTCWoYpF0k9XHh+p33ShnlOSteoUq/XSfEZKxW41NAxfRcCCbj+biJUsameGjKvaIN4qeP0TnJv5WG0lMrLcIlNQySi+DThjdh8mA4S9bJKQrwfa9SbqziTFsV9dKOrd2Mmm0sJGqIEMB4p1WipSQ+blfJKIBzRoEE/X6uJbxvYX1iBXrMdA1PztqXnPp6dfFXQWxBUI7pjRnhTZH5NjwhtslWWnSrt2By5xBR/aZxUGxZoHBwJ/mFTik0Vr0cJnOLdU5F0sSXSTX/25/zY8BFQ0cCz3TGms X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(376002)(136003)(396003)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(86362001)(38350700005)(36756003)(478600001)(6486002)(41300700001)(52116002)(5660300002)(2906002)(6666004)(6506007)(38100700002)(2616005)(1076003)(26005)(66476007)(66946007)(8936002)(6916009)(316002)(66556008)(8676002)(4326008)(83380400001)(6512007)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rSCJkDwpHnlMxPzR9m3KCZoKjCwKyjq4neGw9NwwikRoLsKLVblB/dZ7gAYpny7//a6LHt15eHvw8CTrMr05tY9f2idQLeQopwME7iBjrPNtz+87FXTFUCaJdlq7ZEw+Zn5MRxyBKP7J31MXrtuECDJmKkaP9EG4tn+Q03Diya2gVbHntsbT1o7T3Ua7HNdOT0A+oxPkQ4OtYloaxjYF19Py17PoILf68hWoTFAtyN4oH8L0qnNJmXbxpMqY8kb0Qnm/ndnagf6bBvED2Tw0C31oaAcxOFr3HdXPvUVcQUyECaETEfPWdGIFPasmowGWXJ3EneM5kXqCwt/tbxHUlkaN/t9Yj9nwd7nAiftYYKmblhXeaVRvyXnJ+JLLaX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sFYeACi/9GpiDSCFfTyRp7J0L/fxJ1SKI5hUVU/tj5ufAUC38GLU/TRWMNaG/Usl+kYVcGrT8JXAiyCSjltjftpIbdcwauamnCFNeKk+yfxGRp99vTMg29AcZ71Q6lPUaw1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe367f43-d6a4-4929-a475-08dbce637522 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 16:17:56.8142 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 383srz7A+or7VhCV9lFVD12TobzlqVB1U2PO7jqhCP9TJWxDvWOt3UcuCHZBkBHHiCztgTDkSxFcrfe4fb6cZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7489 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> 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, 16 Oct 2023 09:43:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779931122509605212 X-GMAIL-MSGID: 1779931122509605212 |
Series |
[v2,1/3] PCI: layerscape: Add function pointer for exit_from_l2()
|
|
Commit Message
Frank Li
Oct. 16, 2023, 4:17 p.m. UTC
Difference layerscape chip have not difference exit_from_l2() method.
Using function pointer for ls1028. It prepare for other layerscape
suspend/resume support.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Notes:
Change from v1 to v2
- change subject 'a' to 'A'
drivers/pci/controller/dwc/pci-layerscape.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c index b931d597656f..20c48c06e224 100644 --- a/drivers/pci/controller/dwc/pci-layerscape.c +++ b/drivers/pci/controller/dwc/pci-layerscape.c @@ -39,6 +39,8 @@ struct ls_pcie_drvdata { const u32 pf_off; + const struct dw_pcie_host_ops *ops; + void (*exit_from_l2)(struct dw_pcie_rp *pp); bool pm_support; }; @@ -180,6 +182,7 @@ static const struct ls_pcie_drvdata ls1021a_drvdata = { static const struct ls_pcie_drvdata layerscape_drvdata = { .pf_off = 0xc0000, .pm_support = true, + .exit_from_l2 = ls_pcie_exit_from_l2, }; static const struct of_device_id ls_pcie_of_match[] = { @@ -213,7 +216,7 @@ static int ls_pcie_probe(struct platform_device *pdev) pcie->drvdata = of_device_get_match_data(dev); pci->dev = dev; - pci->pp.ops = &ls_pcie_host_ops; + pci->pp.ops = pcie->drvdata->ops ? pcie->drvdata->ops : &ls_pcie_host_ops; pcie->pci = pci; @@ -251,7 +254,7 @@ static int ls_pcie_resume_noirq(struct device *dev) if (!pcie->drvdata->pm_support) return 0; - ls_pcie_exit_from_l2(&pcie->pci->pp); + pcie->drvdata->exit_from_l2(&pcie->pci->pp); return dw_pcie_resume_noirq(pcie->pci); }