From patchwork Mon Oct 5 08:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 11816351 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0471C6CA for ; Mon, 5 Oct 2020 09:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD4F52074F for ; Mon, 5 Oct 2020 09:16:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="Sx4Pjvnf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbgJEJQd (ORCPT ); Mon, 5 Oct 2020 05:16:33 -0400 Received: from mail-bn7nam10on2084.outbound.protection.outlook.com ([40.107.92.84]:59364 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725891AbgJEJQc (ORCPT ); Mon, 5 Oct 2020 05:16:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cjcr4NgmHzkPO65EU5sya3q+bVFFEKaHAw2woCqEntTmig4j3CnIImPK9DT+f4ffxeqBiJBSvgAi45r/6+EzEFO/rVRoz4n5PQKNhSXFIzaPEG1A1Aowz/1CBg78jIj17HNCkZcWtMkEmrLleYybQk1wR8SyW6b7YcfFFg6lcHHqhzUwOYJLCGGq5mPgPnW/8C/+UtjwD6VJgo8sfHj4yLfA9AbCmICasdBQ8dGSG6G6oIvNW//rE/oU0MfZX5Av4ssTRb+k8hV6cOVofpwEecFphpQ3CY8sbM13rwiC0ei+0rhDV4reDQDLVeDhezaz+I5K6CBWPNZttzI5ekR7ug== 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-SenderADCheck; bh=keYn3xZSeTe02oYkXhucLonJ2fdQs/o//mSCHTY2f1o=; b=V6Zyk47RE/IzsfREN4g8T4uk+yU/H57W6td/ipII94ohymP2/ebsn5jMLtJHEk3gSIZm4qx7eHe2g/FhrqIypx1minmMOCuLncJth2T2tpQ6L1f9YyBxJb3PJwkht02UjOViv8D2DKVsV2qL2klSA6FRmvj0njyj9phmrdFpaOPMKQR3R/tQHKDU1aPJGYic0QsY3Lt7l8SO92pUOLcb4hW8SNGrBnBNmAf9PL2Wk+yXTHl7PuDSHcLRoLZOqRRsGiKIVtUyo/uv6Jb3cMcHUD+EwUvfCBYy4q7rG/+/lvpORI+W0lhYwKB5eXM8SFKYcirkL0DpZXAj9MyihHqxOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=keYn3xZSeTe02oYkXhucLonJ2fdQs/o//mSCHTY2f1o=; b=Sx4Pjvnfw4gIwh9TEcVsv1UgPumkzhWtfmk0vk9WVfJjJvYXtbP/a0IFRaxpEVkYoJVKlpOIYOWwUG2HWyD+geoU7ZFjQ604bN4+2CqG/Q5JS9z7b89sTRaZ3ouI8zdQFK1ISZKkQ5uB5/kYHGRwjklCO142r8WAC3f0R0byd+Y= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) by DS7PR03MB5560.namprd03.prod.outlook.com (2603:10b6:5:2d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Mon, 5 Oct 2020 09:16:29 +0000 Received: from DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38]) by DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38%7]) with mapi id 15.20.3433.044; Mon, 5 Oct 2020 09:16:29 +0000 Date: Mon, 5 Oct 2020 16:57:33 +0800 From: Jisheng Zhang To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jonathan Chocron , Jingoo Han , Gustavo Pimentel Cc: NXP Linux Team , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH dwc-next 1/3] PCI: dwc: Don't assume the ops in dw_pcie always exists Message-ID: <20201005165733.1dc15ce0@xhacker.debian> In-Reply-To: <20201005165657.0fd31b10@xhacker.debian> References: <20201005165657.0fd31b10@xhacker.debian> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) To DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (124.74.246.114) by TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Mon, 5 Oct 2020 09:16:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b34c4805-8003-46f5-4023-08d8690f5806 X-MS-TrafficTypeDiagnostic: DS7PR03MB5560: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AQrz36fnz30Y7/IOWJplgw3TOtMQkCQBCRZSpokWhBKdyQgVELlFohTFbiTSpPyJAZ6dUMBBUuzIAPEe93ODPy+XlqLjz3FVK2jbryAbRp63lUXXQyajCsAp//bysmr6ACgqsWM9+BQ4HbvelY5tPO5rOluIV0D/dKsls+H5wuXLZIAwRsC19PO0NuOt00SDbNU+fV2SdmceSLo1XtkHxycv+U5Falasv5lEnDi/Q5n+dgaHcXjAZyGcil9h5f8o6NhhLj0r6LiP5zSOU5ATuElpMh7b9ABRl8hNMoD8cqKA9Ja0jdxSvyOsV4JE/nLjVU39bqqw9cJxpUKtU9q9BBR3ORE46qbvFARsuC9eYmEDt3s+f4LftT6RKL644+Eq X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB4555.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(39850400004)(396003)(346002)(376002)(136003)(2906002)(8936002)(9686003)(16526019)(66946007)(66556008)(66476007)(186003)(26005)(8676002)(7416002)(55016002)(83380400001)(1076003)(5660300002)(6666004)(478600001)(52116002)(7696005)(316002)(110136005)(6506007)(4326008)(956004)(86362001)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 3J0/kGRQnzbg4YkzOxW+Ndir6zZ/WcR1IW3B7Qd8JNQtTZEd+AQE5xrugqZk031nyMFmM1GhqpEzlCfkUzHIOcfb0rqALgIJ11he7dxwG5qJJHy1yb2XzN9muF93GXHrxL3XlrtUkj4LP8tS2mj/7U0xzh7t53bRM9IdnDd+VNBW/avbG4z6D0lROODPEry2ldGnFFIOuUIMduygqNblVtSK8jND4YXBedEdDtCkdq9Zm67Nu+ROwdH9OdGa/kCJrPkM0knLJLYLW2kDJiP51ilM+zGL2o7xXpntkg8Ur+y5OJRLfZf9+lVrfYMeqqcNsDfhsKnbZ8uyjsIrbWQPoWfLt7Ajy/znP4lGgXkQi5X4iRrX10P3XZPZFmdGP4q4zt2z0/ad+GBwbzHgZ0JzsBDfhdaXbE4bA+nP1dzMvpBqnnKNOYbD7ECJXNXaw+KIZex+dnb5L9RIM0ElmLZCrY/bS95WEwLKpGQwrz6m+nxj3BAtQvHy7Gl9q/d8dXBxJh5Ekrb9xZW6e3EovY6NJvJtRp4Lr4HyqoTWco+brpE53T1gTqSGLCkTtyUUrwFLDoKQ61ViRgOvl80KzJL3jc++lzvLlTH14T5f2Yh5GIg32m4mbTYxwR4ETN0O8gSCKFRLd7EBCKt8jOVEqkGKZA== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: b34c4805-8003-46f5-4023-08d8690f5806 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4555.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2020 09:16:29.7264 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EY7vUHOO+iNIZKK+P6TuWSegGCuPpa14zVXafWXq9CWaIb9eFv2wNatJCjVpzXPWhotFADZO5M0j1CEVXFyjiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR03MB5560 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Some designware based device driver especially host only driver may work well with the default read_dbi/write_dbi/link_up implementation in pcie-designware.c, thus remove the assumption to simplify those drivers. Signed-off-by: Jisheng Zhang --- drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +++----- drivers/pci/controller/dwc/pcie-designware.c | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index ad7da4ea43a5..411b7624331d 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -432,10 +432,8 @@ static void dw_pcie_ep_stop(struct pci_epc *epc) struct dw_pcie_ep *ep = epc_get_drvdata(epc); struct dw_pcie *pci = to_dw_pcie_from_ep(ep); - if (!pci->ops->stop_link) - return; - - pci->ops->stop_link(pci); + if (pci->ops && pci->ops->stop_link) + pci->ops->stop_link(pci); } static int dw_pcie_ep_start(struct pci_epc *epc) @@ -443,7 +441,7 @@ static int dw_pcie_ep_start(struct pci_epc *epc) struct dw_pcie_ep *ep = epc_get_drvdata(epc); struct dw_pcie *pci = to_dw_pcie_from_ep(ep); - if (!pci->ops->start_link) + if (!pci->ops || !pci->ops->start_link) return -EINVAL; return pci->ops->start_link(pci); diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index 3c1f17c78241..2a6109109029 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -140,7 +140,7 @@ u32 dw_pcie_read_dbi(struct dw_pcie *pci, u32 reg, size_t size) int ret; u32 val; - if (pci->ops->read_dbi) + if (pci->ops && pci->ops->read_dbi) return pci->ops->read_dbi(pci, pci->dbi_base, reg, size); ret = dw_pcie_read(pci->dbi_base + reg, size, &val); @@ -155,7 +155,7 @@ void dw_pcie_write_dbi(struct dw_pcie *pci, u32 reg, size_t size, u32 val) { int ret; - if (pci->ops->write_dbi) { + if (pci->ops && pci->ops->write_dbi) { pci->ops->write_dbi(pci, pci->dbi_base, reg, size, val); return; } @@ -170,7 +170,7 @@ void dw_pcie_write_dbi2(struct dw_pcie *pci, u32 reg, size_t size, u32 val) { int ret; - if (pci->ops->write_dbi2) { + if (pci->ops && pci->ops->write_dbi2) { pci->ops->write_dbi2(pci, pci->dbi_base2, reg, size, val); return; } @@ -185,7 +185,7 @@ static u32 dw_pcie_readl_atu(struct dw_pcie *pci, u32 reg) int ret; u32 val; - if (pci->ops->read_dbi) + if (pci->ops && pci->ops->read_dbi) return pci->ops->read_dbi(pci, pci->atu_base, reg, 4); ret = dw_pcie_read(pci->atu_base + reg, 4, &val); @@ -199,7 +199,7 @@ static void dw_pcie_writel_atu(struct dw_pcie *pci, u32 reg, u32 val) { int ret; - if (pci->ops->write_dbi) { + if (pci->ops && pci->ops->write_dbi) { pci->ops->write_dbi(pci, pci->atu_base, reg, 4, val); return; } @@ -270,7 +270,7 @@ static void __dw_pcie_prog_outbound_atu(struct dw_pcie *pci, u8 func_no, { u32 retries, val; - if (pci->ops->cpu_addr_fixup) + if (pci->ops && pci->ops->cpu_addr_fixup) cpu_addr = pci->ops->cpu_addr_fixup(pci, cpu_addr); if (pci->iatu_unroll_enabled) { @@ -478,7 +478,7 @@ int dw_pcie_link_up(struct dw_pcie *pci) { u32 val; - if (pci->ops->link_up) + if (pci->ops && pci->ops->link_up) return pci->ops->link_up(pci); val = readl(pci->dbi_base + PCIE_PORT_DEBUG1); From patchwork Mon Oct 5 08:57:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 11816353 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B3E16CA for ; Mon, 5 Oct 2020 09:16:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7589206C3 for ; Mon, 5 Oct 2020 09:16:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="Pot7Mxu2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725960AbgJEJQk (ORCPT ); Mon, 5 Oct 2020 05:16:40 -0400 Received: from mail-eopbgr680053.outbound.protection.outlook.com ([40.107.68.53]:57843 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725891AbgJEJQj (ORCPT ); Mon, 5 Oct 2020 05:16:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ly6732tWUQ5zbeEJBo/VMoyqqoycYalCdIw4xLu+1d9kxFVyGc5/uL9aZq+jSGnh2+Z4DNL+qlQAXUcOza1m0cvMjgOMEWcQqAry5MzFEwEnc3w/0Pbi0FwPGaVOzKnxZGJ99jxOigHzqm2nO5/KUTg2gcJRbE9gG8UNtHSTITofgq8inzclHdQ6fAMd4rOnovVCD6eg5smr7ZWhZmAhzTT+TsV4AFSrLzql+9QSjZL7PKQwYXGDivcmrLKZG1WuzuCl8xPtyRLXf4xX5Ei0OralWvDt/bA8Ys+MjnBVTWH5SwfT45q1lfkBrlx8dVP4tjJGJTyYbWSHg94Xv0k4Ng== 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-SenderADCheck; bh=ZGXBUboTiCCQic9XHlxf0IEpm2dc4XrxLTGozKlcyv8=; b=I4WGm83C6DqPwA6iUmQMH7/Hssmvb+SS/QLXaN8SST6VF40JcxRTzfNU+FeVAQp/8uws2aCToXiIPXTBPqFy4jCt2OJ3D1MQ0APZRtFTrRTFrGVYFDIPOZKsD76Rjeu9tL1hku1eT1sHI+9w/HHnuyiAkH5FLMx5QtglC4Pl4N7fsl723CQIqU+rixq3TB4SbHUePKFFaf+13XY0fWgrjQyqp+c/vOnnEBcFAP/sXxRI30RyD5IxtYdBKKKKrrcybw2wvprbmp0ZvX1BLhGU9owAOVlYxf4CwzuHPnnqbUfwVf1odDD39RfvJBLQMdMXTzfnpJVAL3io5pp47Hg2JA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZGXBUboTiCCQic9XHlxf0IEpm2dc4XrxLTGozKlcyv8=; b=Pot7Mxu2LyBSpBtkfTAETdTm0uaivqsR2sP9ERqhcU3YeuBJ+HKPhwWyP7FWS2g+X7GvqA5zX2Z5/APNAnoYUs5oyb6E/eR4JLVq3y/AdcTsHE+6DxlHqnf16thCCSq4CtUzmHAA+my5ipYaiRt1sn9Cqt3mkqieuhc3jwyT220= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) by DS7PR03MB5560.namprd03.prod.outlook.com (2603:10b6:5:2d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Mon, 5 Oct 2020 09:16:37 +0000 Received: from DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38]) by DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38%7]) with mapi id 15.20.3433.044; Mon, 5 Oct 2020 09:16:37 +0000 Date: Mon, 5 Oct 2020 16:57:53 +0800 From: Jisheng Zhang To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jonathan Chocron , Jingoo Han , Gustavo Pimentel Cc: NXP Linux Team , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH dwc-next 2/3] PCI: dwc: al: Remove useless dw_pcie_ops Message-ID: <20201005165753.2f98b3fd@xhacker.debian> In-Reply-To: <20201005165657.0fd31b10@xhacker.debian> References: <20201005165657.0fd31b10@xhacker.debian> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) To DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (124.74.246.114) by TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Mon, 5 Oct 2020 09:16:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72568b87-76d9-4e50-9105-08d8690f5c50 X-MS-TrafficTypeDiagnostic: DS7PR03MB5560: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:639; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PEGSRvdnM2vzJDvwaNd8J4zJhExmFRQISkZKvblGQshG6d/vdPeVJXrIwVz1mMwXwPdv76NPKsebeUAHcZ95r9+NGgYKLSXRAcT+9mXoXZFIN22+VR5IxNt6zqZp0OqcwpR4OTccrR5Lq3ejJMULI2ap+MaUiKqwsak3e3KUWcFzbo7ZsH+SvySmohjJcJTrbEflhqOEHczOqN4aSsWM2fLyCGnv1GA9bEee5MEKiCnhVKht7NeXxErMwAwvszR95ntUSkB1sKHZ5d5/vZYOn0NTsdlgsRGoEE+p3wEk27Nhf66P0pkNgvWt/rKoi8dzs5RhCFx1ykGwDjTnp7321woGzgFefDKykJkJ55rUQV8GQtpjfmu7Ei6u2s2b9CdT X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB4555.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(2906002)(8936002)(9686003)(16526019)(66946007)(66556008)(66476007)(186003)(26005)(8676002)(7416002)(55016002)(83380400001)(4744005)(1076003)(5660300002)(6666004)(498600001)(52116002)(7696005)(110136005)(6506007)(4326008)(956004)(86362001)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: c4gnWpUI0Dais8w9DChT7uLMgcW/O2wsihBp09UzcX7uF5zrwqIBmmcIJG4VRRwaPNUi1U/U5wWQyJ8YjzuotTQqlfllc7UeMSiBh+RTajrC16Y2Odlyz9yfDAwtdGW7KrEr6LWtrBNQ+kxreFztffw6u+lR8QGOvklP3U8DhRlV1Dqw1szEj1jKf9OIjJ/zo6u7rdmyzqD+fCLOsY2yCOlovq1Zpcpb9/5ZeGrCSULYcmGuO+JgbIXGaophq8XMNIkQV6Vp9in/czRjCSAV6lWliGaciHk7KH/8zh7v6ACoS6lCdBderstIW3vixqcDwIhjlefnpj5YMhDUugCOi7AkRH70wC/OEnOhT+T5I/GbvkB36CKxdXC1pZ7Lj+F6uPE0n6/MQY89YWaeBJu+JbTrC4vmaZGewHboJROEP2Vh0wagZC96Wss32q60zsURi8FfdHRvydOGpbDWcZAWHLN870mP88DYadXHORaBQ6jjznNCwXR/bjjRU58UsX7DpqIL4XDigt4FKVxRrzoOARyTyYpu916fojI2i735LN0Xo7qfBEyikkYTU6A3F0sxw3MsvY16V4O7QznEDzxYIgEIemZZJ2gVIxECjnWlBg5I5le1cYOdVekI2BKbWiETDrOO6qrbw+lFa3NSdwCpnQ== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72568b87-76d9-4e50-9105-08d8690f5c50 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4555.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2020 09:16:36.9563 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qf1WKywWZqS36flVD9pEfiofQ7xSyWdZFfe1H37BebSgbAXUh5nUN4GcwkpqB2epiEEsb+rr27g7ev8zkZGCdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR03MB5560 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org We have removed the dw_pcie_ops always exists assumption in dwc core driver, we can remove the useless dw_pcie_ops now. Signed-off-by: Jisheng Zhang --- drivers/pci/controller/dwc/pcie-al.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-al.c b/drivers/pci/controller/dwc/pcie-al.c index f973fbca90cf..a1fe1b847ef1 100644 --- a/drivers/pci/controller/dwc/pcie-al.c +++ b/drivers/pci/controller/dwc/pcie-al.c @@ -339,9 +339,6 @@ static int al_add_pcie_port(struct pcie_port *pp, return 0; } -static const struct dw_pcie_ops dw_pcie_ops = { -}; - static int al_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -360,7 +357,6 @@ static int al_pcie_probe(struct platform_device *pdev) return -ENOMEM; pci->dev = dev; - pci->ops = &dw_pcie_ops; al_pcie->pci = pci; al_pcie->dev = dev; From patchwork Mon Oct 5 09:03:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 11816359 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52E8792C for ; Mon, 5 Oct 2020 09:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FDE1206C3 for ; Mon, 5 Oct 2020 09:16:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Synaptics.onmicrosoft.com header.i=@Synaptics.onmicrosoft.com header.b="HtoOZOVY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbgJEJQu (ORCPT ); Mon, 5 Oct 2020 05:16:50 -0400 Received: from mail-eopbgr680081.outbound.protection.outlook.com ([40.107.68.81]:49939 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725891AbgJEJQu (ORCPT ); Mon, 5 Oct 2020 05:16:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OLe9DEwMcf5+bwqNTYeJJkGxl2Ntb8Fmn4oCIn/XOLeM8XN8PTDKDlYbuX3KFUB6K3zxesxmUqrrL/YxzAWR9pKtBuSIRPGGe2UyEukl6MqZKo7kexeenh59U454azPNC4NPk4W3eGLud2SYgiqOEFzly5vsIgNKPVMqn4+qDLU24jKBYTbNzFSjbXcjkN8BlejLnGL+UHogxsjOoEAuV1lSGGki8UiDjtVMxZvt2WTjJPrhmt1dhUdY5W1idATKTnCXsVAj6QCtzNN8oiSiRwA1xqHFMines+d5TMQNJsUnfaRQOpXa2mfIUXnmrdaEkWE+eA3Xawdc2LYAJD4hpQ== 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-SenderADCheck; bh=ECZRctN+O108XAOkiGEksdZCMGTb5t6HY4e92TF/9fw=; b=MaVEewFX00md8B0Iw09q+6x4Up9GJYMV7agqwXkZ5f3Zbva4sQ9Ofec1GOOYt9lyTYKbOxENWmIoOH9oQOrdoVwM22EN1qcE4gUDDsN6gnrnXRLVGNkd1gFjbV4kn7Vpfrh2XP7phYaSXLSJxYWpAT8Rag9rskPBS0C4rC4Jse+aeuNt9DQId+x5yr+xTYFwbuzYGAifXxWeMtfeF0wqwv5ek/2r/grviG595uGa8t52MAVKlTXdeWdcBOfvXg/7bL00gi0OjKNgwVlX7qrGMVxSdophlRT0Xdl0vKy+FAi+mGsfRreRWDW8hpJg4D5jQAdZ5YIGcscchjYgnkrOkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ECZRctN+O108XAOkiGEksdZCMGTb5t6HY4e92TF/9fw=; b=HtoOZOVYiBjh+Cv6FRJnmKUiM+gwlHx1N+n04lTPHQuYV77pbmZL01z76RwTRMp+B48cU00BP5UuGj9xqY9rY9E73Kuk/fKvMN4YkWWoreR/V9BnT3SzSyrk0kLBTD4R1y3h6SWIrBKpwsWcraFyRPiVY6Xc6KA7z1r9Qdb3xNM= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=synaptics.com; Received: from DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) by DS7PR03MB5560.namprd03.prod.outlook.com (2603:10b6:5:2d0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Mon, 5 Oct 2020 09:16:47 +0000 Received: from DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38]) by DM6PR03MB4555.namprd03.prod.outlook.com ([fe80::e494:740f:155:4a38%7]) with mapi id 15.20.3433.044; Mon, 5 Oct 2020 09:16:47 +0000 Date: Mon, 5 Oct 2020 17:03:43 +0800 From: Jisheng Zhang To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jonathan Chocron , Jingoo Han , Gustavo Pimentel Cc: NXP Linux Team , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH dwc-next 3/3] PCI: dwc: imx6: Remove useless dw_pcie_ops Message-ID: <20201005170343.49ced6ac@xhacker.debian> In-Reply-To: <20201005165657.0fd31b10@xhacker.debian> References: <20201005165657.0fd31b10@xhacker.debian> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) To DM6PR03MB4555.namprd03.prod.outlook.com (2603:10b6:5:102::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (124.74.246.114) by TYAPR01CA0070.jpnprd01.prod.outlook.com (2603:1096:404:2b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Mon, 5 Oct 2020 09:16:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 240f642e-9721-4ffd-b548-08d8690f62e5 X-MS-TrafficTypeDiagnostic: DS7PR03MB5560: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2MwF9SBQ4SPZ8YeDebxA26X0YTxRGMZtJY1808S5yu6jV6J/DQqJl3PXie909pY/j1FcjggCPvUDCz0b6frj/lOg56nngUdsbaNXcFWkRcsCMaCMVTL/EnHOtu3fxteQuNIS1Bq4+kDQQIljlaVymI6ApS0cpF4o4PxmTcAawxMUJsgMl3ernFxKReKuJSZ0fgwC2sW5N4qNLJHps9KZLuc+kCtJvdWy3w7q1xxtB0WounMbwgLa6u2HmaI8d5yYfZOrAMeaok/xvXDLjw5Pf6Hs93FHiaXUnPbH3zkpYIo0SRhYzWv8AB/8/iSBK02d/Drh65+Pze3eXGsxxW6Om/UCr/8dwE3THvoyukbHwVZNMGe3IYh6vnIrexHPalIU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR03MB4555.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(39850400004)(396003)(346002)(376002)(136003)(2906002)(8936002)(9686003)(16526019)(66946007)(66556008)(66476007)(186003)(26005)(8676002)(7416002)(55016002)(83380400001)(1076003)(5660300002)(478600001)(52116002)(7696005)(316002)(110136005)(6506007)(4326008)(956004)(86362001)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: eqjjfcoqPiSq48ZEuFk1N2ZEKhGa5c3Zoue70FvbvH5wINNW8Vxff8ycHRYtAAVh+ZUH0KwE8zoEgbvUzumw7+q18vZ1QvzZM8b5kpXOvrmZufHp9G6sVsmyl/mL3uhwKrGXQLWsfM6sM47/HO+OrHnfUJ85KplC7byYTE7ZYeBvlN4vOLJ4Rb1cnfXLmq4Wwhoz1wBkFvhU3kc/refIRkZBMUSbjMEe/Fc80f1wMnsBEYAV3Hb1ekkxjOVlc5lAPi1ie19LpToqw02Gbuw9o7EZSCFLFeJVFj31N/BDhpIjbV5GGQHFSX4zaaeQ1ZMobMK8kG77QX31mpUHwTGschJ3CsM3yGlEV96vLG7y8t021G+gYpxfYEs7VfEIT9YQgfsTmO2vnQWSw2S+4rlHwVqXhxuw7geBTWubI+U0tB1a5kuBsZuQO0SQq7nUft6B4sIJN3tYHP4MyA/VS77ERl8zhPOorOylyruJPofOXuzf6Is46NEvk3L6d4a/bTl77Y+fL1qrdqPAEk4cuGdr0tjM/T15kTs+QOBolR8XCXyNy9JZAvfQyk5g+Wmi/sb2DErbwVu3hVBRKRvjLgGkf/zCrSTiSFfwWRUVQYw1OGaY89ZUq07Nsr78nH9PkHaPvPZxFeH8PragQNzuQLjyYw== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 240f642e-9721-4ffd-b548-08d8690f62e5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR03MB4555.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2020 09:16:47.9441 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Wnj0iiSFbxgMHk3C9vaxuruH0p4qo9UgTCwpW8d2oj1InqZhkBWKnkErVJuDXuPXuMnYV/4YTNCfza/Tr+6MBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR03MB5560 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org We have removed the dw_pcie_ops always exists assumption in dwc core driver, we can remove the useless dw_pcie_ops now. Signed-off-by: Jisheng Zhang --- drivers/pci/controller/dwc/pci-imx6.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 337c74cbdfdb..72f8bc7d878c 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -870,10 +870,6 @@ static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie, return 0; } -static const struct dw_pcie_ops dw_pcie_ops = { - /* No special ops needed, but pcie-designware still expects this struct */ -}; - #ifdef CONFIG_PM_SLEEP static void imx6_pcie_ltssm_disable(struct device *dev) { @@ -1013,7 +1009,6 @@ static int imx6_pcie_probe(struct platform_device *pdev) return -ENOMEM; pci->dev = dev; - pci->ops = &dw_pcie_ops; imx6_pcie->pci = pci; imx6_pcie->drvdata = of_device_get_match_data(dev);