From patchwork Fri Oct 16 07:19:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minghuan Lian X-Patchwork-Id: 7411301 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 25A11BF90C for ; Fri, 16 Oct 2015 07:19:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31855207BE for ; Fri, 16 Oct 2015 07:19:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CAED207D3 for ; Fri, 16 Oct 2015 07:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753599AbbJPHS5 (ORCPT ); Fri, 16 Oct 2015 03:18:57 -0400 Received: from mail-bn1on0116.outbound.protection.outlook.com ([157.56.110.116]:6784 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753568AbbJPHSz (ORCPT ); Fri, 16 Oct 2015 03:18:55 -0400 Received: from BLUPR0301CA0008.namprd03.prod.outlook.com (10.162.113.146) by BL2PR03MB564.namprd03.prod.outlook.com (10.141.92.156) with Microsoft SMTP Server (TLS) id 15.1.293.16; Fri, 16 Oct 2015 07:18:54 +0000 Received: from BN1BFFO11FD027.protection.gbl (2a01:111:f400:7c10::1:184) by BLUPR0301CA0008.outlook.office365.com (2a01:111:e400:5259::18) with Microsoft SMTP Server (TLS) id 15.1.300.14 via Frontend Transport; Fri, 16 Oct 2015 07:18:53 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD027.mail.protection.outlook.com (10.58.144.90) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Fri, 16 Oct 2015 07:18:53 +0000 Received: from lmh.ap.freescale.net (lmh.ap.freescale.net [10.193.20.20]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t9G7ISIM004957; Fri, 16 Oct 2015 00:18:49 -0700 From: Minghuan Lian To: CC: , Zang Roy-R61911 , Hu Mingkai-B21284 , "Yoder Stuart-B08248" , Li Yang , Arnd Bergmann , Bjorn Helgaas , "Jingoo Han" , Zhou Wang , "Minghuan Lian" Subject: [PATCH v4 6/6] PCI: layerscape: add ls_pcie_msi_host_init Date: Fri, 16 Oct 2015 15:19:20 +0800 Message-ID: <1444979960-24100-6-git-send-email-Minghuan.Lian@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444979960-24100-1-git-send-email-Minghuan.Lian@freescale.com> References: <1444979960-24100-1-git-send-email-Minghuan.Lian@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD027; 1:nJ3h9bywsgsVgwnp5khYx8BXUzI8W+TLy4t0q6pUAv/hE/tuw7usPMgN1k+o/mbeD9cgbmRkXtrMySXYYcQIROYQaTOUMR2iu93B87b3u9zR+ZMhJnV/oS4UfrBByNIpc7OkUdEbJz24B3gWcs7+VNsng0acsynkmpprmiaVy2Ph3Wqm5fSTKOIctfOKJE1YAs41rE3wYZ4HRfwur6Fz+Ura9ioHJ3QuAubkeOzyQ6kr4Ea0lydNs8mn+3WKS8j7krsemUrY6TOeQsDGXJrj4YkecynoQ53w2ye5ISEc06e29khaZicwoy08oujsxj5yPhFBWIfRDTqbpx/Num6bY/AqH7ytxwLrz0oQoAM+Qb/Qzxl0CwiWtafy6VIXJhinsHJPB7NbilL/pzRx1QWexQ== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1109001)(1110001)(339900001)(54534003)(199003)(189002)(107886002)(110136002)(19580405001)(81156007)(50466002)(5003940100001)(77096005)(106466001)(105606002)(5001960100002)(50986999)(48376002)(104016004)(19580395003)(97736004)(76176999)(85426001)(46102003)(86362001)(5008740100001)(2351001)(47776003)(11100500001)(87936001)(189998001)(2950100001)(36756003)(6806005)(50226001)(92566002)(229853001)(5007970100001)(64706001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB564; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB564; 2:e8eFkv3tbIB6O3hlLTZwbwTZeX9bTKFjz+J6iXaAW7+YncOhuBfyabYxZLEmFNkhQwykkEobn3aJy4Zg9vp/ts/CW/4n2dnmVuSTQ/ur97U7eaOE3ZHdq8gYqeAMLn+GHh4Gfoo8SKKwTS+VoJc3yhNMHYQ1FUYxMAq/mkfJUqc=; 3:yYAlNm1g7cljruxOPvH+DzRlCBHkJyFP+ILeq64cuMhPPalvbG1TdwrypfZnxqlw9kBjP1JZyp0C5v8cD12zSUq1uGA/qiRdhPZKYP+fzFAj7ZY/neAc5w/xrng8MJAY0kiHc4Z/Oin+pr7PXxaIeyLanFhEUvrl4dbiowFs5OhtOH7O1vwsDdk0/0DmMDyF0vVPajiqxr5wo8kvAEDgtRTLsTdor2kcSo7Q1uo9OPM=; 25:9TjT/a/lBZv7m5K33b352e8/WOn4SMPlVd1ipZ4yLZZYnlFDNHneSvC4u32Ahs9+QJkItu6765ewma1mZJ+CPgsCRvdp44MvJzq5Ksq4xG27hc59lPVBP8hBYx5xNZF+klwOHDg+k2X38u4yJ3miBvHgboJqY6vQ6D5r9dzVf6xpysbTDx5UJHqoCTCJfGSW6ziKy0SuhY5gSUceG19Xst2k1TKJnkyJ9e7iabD7hUXG24lYxJoX0Q3e2QqY1wkq7i+0PGRQKUI1fyr0jQK4Ig== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB564; X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB564; 20:8yOL2wZW8EcyVx+6lP45xzlvtFnc4pw+JEucTJoSOO+wgj2GsFWR+VPyXKNQYK5hAAmcMUjNr/33RRBD6KxRtJrLrr1Ao6MzQOb2KNjZim+hnBp4u2XrXZYO8lzM+iCYbVrGW2oNOScbg37ePkETbZycPqx8Nd7oHKqJ1EVJZT9I+uBVI8C/2SQUw8f9U7Hxk9ZSDCP5Ph/17Cpro2JjO2ZTrZjYZs5weo8c8fJp27WSQ2RpRB4zwjzb5goFw0eeBH831S8uyGwDpazgNdkH6LqN+VOdOxkckQ9YPthL9EzzXXdUJxbo7fkbF/qtq8UHitLE6b0+ljtwwba0uIOuur6ry+bw26tD06TATky1ZRg=; 4:NuJTpy8EOIN2hVNfGjcp3mroDJ7UQdLvUMx659w4pyif4os1GxgR7ZTGCWNl0WWX+HMF18GlvIsp1CvwV5uctganBD7aCOaBryZ9vLzt7DKJDYyy3kVq2BT4+Giezoj0GoeTYdrf6GD59o9rStpWi2LWw6ykLLkd6YRpE21wz11PUwz+7JHoouqCaK9izuseY/kXW0e2PeDMq3VPIVjpWMoXsOveLWSqGi7M/tmfuUo3PlG+LZRHqkHltsLzMJn0B9igXvsdm5CoEi10qpFtAyQUyME7bBsp3e8PLMdz/x0+5aVNFhykMdQeyEivU+E7OvcaEu9VOcgO+i7PhSlOiyw2mOSQYpChunbNdj4wbGg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:BL2PR03MB564; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB564; X-Forefront-PRVS: 0731AA2DE6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR03MB564; 23:IMoE7v4FnMslqXDyBQLPAIiOba83+zvDNlQovaDiU+?= =?us-ascii?Q?6TJyNMo0z2YQa6Z5AA/2MktG5gcPn3vhLzocE0BwBaGJeqky2xRdvM66fyrh?= =?us-ascii?Q?Tt0aG7zn1W3AwdIg1Tw5WwOjewKaL31hA5z7Sx7E8ibUW1ozx1FJOUh65Lua?= =?us-ascii?Q?O0mRyKKaxKonbNUdD4r/aogAGV8Ua4wTTDK1MAM02lGuqFHDQbWgXZv4pa3V?= =?us-ascii?Q?nXEJ3vMLoejCyTcmAnjFfa+lmU8aqvkqILSEvShqncuh45KbGeqxPNkJJZa9?= =?us-ascii?Q?XzvkXhQvYFkR40Ly4DRXFjrB0RVpkUpidBEvkRSHquI4vHAWy12YZvt8mpfO?= =?us-ascii?Q?oUwIUAsx4dkZor+QJmF6rhlyLvXo6+uI8GLRPevHXgbSfVSecMtg5M2CJXux?= =?us-ascii?Q?WQQsgt2N0MkI+G7j4xO4bf3m/5Bctj4FoYoGb3chQo8NodpcNLo0zAQ4AxXs?= =?us-ascii?Q?hGF2ebDQKdrskYKaL93tr6Yu2q7rjL7IrqlU1AZvi4wh0VReuKoOWaB1upwP?= =?us-ascii?Q?IM1wBsJQkny91Bp1HZq8+Uruq730UgSa8sTnCNdfBs2swDm6QWxoYByZ40Cq?= =?us-ascii?Q?zGFyHjUJii2SJn1COpAKykoToWoR9BNOL+oKUsei62BOyywX8mTY1kvUpJll?= =?us-ascii?Q?U0FMo2xDrC1N+DfufFhVVwn16Ns5r5OgdSEGpHDmM8f6yD4dxl1XlV7xRywD?= =?us-ascii?Q?ZpSEC74KrHwPZB4pgeGk/voJxupTNMiZKP68eGTPTzMCzcS0/JbQVw/wn07V?= =?us-ascii?Q?lnKLWwc0xyrdXVsPL+bkeR/l5+WwAW0F+nX/03ROzreJ0VmPaKJblC3eYwjr?= =?us-ascii?Q?fvDtFnybDuVLyO537zx61bLQqrPphiZBD/pGFVbzpK3gWWiy5wLMSuGoSL0g?= =?us-ascii?Q?wlPjpQyL7xQx3yB6pV7wyWxUKU/Ds3vbXjlRWU0Ac3ozkuzFfEL3f5uBz9Gt?= =?us-ascii?Q?B5mEL0MbX4+3mvRQP1cNJX9mOAQtcBU+rr1Pm6csexPTjV/yJm5jHiwYFZPQ?= =?us-ascii?Q?UTCRZeUQRAquAlmWR4X3Qs1Aur1wfm7VicvZDYM/TZO+IsW4j4u4a+IEpm3y?= =?us-ascii?Q?4BlTVJTZ1PYTGHhAaY0EzXitvQQltVlkzPDsl7vqGw1DlWOvqDiQJ/rC5KCs?= =?us-ascii?Q?VqkZqMYCUPVoEYSWmKsbrL3VgnnK8/?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR03MB564; 5:Uhw1E2xTntZd9iTjmct5V0mfmiXxxcfCCtEumrnNIOCvTFy5gmyafCuQ4xO8rkHyufbwsOaLOF+yibyrkmomhJghMRiI8iuGkbRNG9ze22ZkOle8cbU1r2r/B5iQZKecpRu+SmvqAf6junLyobPiZg==; 24:22uFGKuB4WT78zczAoePhtKSFZO+bGj5Q1iaMEnrX8VlH3GWPJjg0pitc/0o6hnfktrgQuLWMNXZIprqsVVteYvxt1mtioOogkGzZlr/D8o=; 20:NUhGiT0YOVqjeBNFjZadhuPTKK1RCHsQ2X9XZK/bDeC50RmEJs7mzgy1XQpoJDSLkYBU7GtVgwxJWJZwNzmZyw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2015 07:18:53.0776 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB564 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Layerscape PCIe has its own MSI implementation. The patch registers ls_pcie_msi_host_init() to avoid using Designware's MSI. Signed-off-by: Minghuan Lian --- Change log v4: split from [PATCH v3] PCI: layerscape: Add PCIe support for LS1043a and LS2080a drivers/pci/host/pci-layerscape.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index c53692a..8fac6c8 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -150,14 +150,31 @@ static void ls_pcie_host_init(struct pcie_port *pp) iowrite32(0, pcie->dbi + PCIE_DBI_RO_WR_EN); } +static int ls_pcie_msi_host_init(struct pcie_port *pp, + struct msi_controller *chip) +{ + struct device_node *msi_node; + struct device_node *np = pp->dev->of_node; + + msi_node = of_parse_phandle(np, "msi-parent", 0); + if (!msi_node) { + dev_err(pp->dev, "failed to find msi-parent\n"); + return -EINVAL; + } + + return 0; +} + static struct pcie_host_ops ls1021_pcie_host_ops = { .link_up = ls1021_pcie_link_up, .host_init = ls1021_pcie_host_init, + .msi_host_init = ls_pcie_msi_host_init, }; static struct pcie_host_ops ls_pcie_host_ops = { .link_up = ls_pcie_link_up, .host_init = ls_pcie_host_init, + .msi_host_init = ls_pcie_msi_host_init, }; static struct ls_pcie_drvdata ls1021_drvdata = {