From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6A8EC10F0C for ; Mon, 11 Mar 2019 09:30:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B382C2087C for ; Mon, 11 Mar 2019 09:30:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Bxi3P2WB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="yBe3rhxn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B382C2087C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:Message-ID:Date :Subject:To:From:Reply-To:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ykCP5VDzPHGhp8gHTdEDDsSrab2v1w+OYBsCZMJ8K3k=; b=Bxi3P2WBu0Y/h8 TVxpMwhB6USdaTD4DgBAKmUqVYcZ/nAR3P1ClV4FPUmsYaJKkSiY6x8JVbTzEtCRHAN7UAxEGubAL W7LI63GS4ZF9mDXRwL7ANIXaDZUT9HGL/uPiX5xBj8EEqOjjy0YbLu9pJahqS7bMEBf/SD+3m9zIS kibwG/CQIcizw/WB3uUrmrTZJ1cV1nP63BwULOf3dg7wU90wmO8M3qowEtKw9RWkuKU5Uk/OF6rjX RKAF8mHzdglP1pzd+jE4+s/XtYtmbobrmsgU6SmDgMdd9c7XbYavXp6FgFPsfzte57ACbvCooPFiF De0vqlbtMLCLzhSBXfaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HG6-0008JV-CF; Mon, 11 Mar 2019 09:30:10 +0000 Received: from mail-he1eur04on0608.outbound.protection.outlook.com ([2a01:111:f400:fe0d::608] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HFx-00076E-C9 for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 09:30:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RbsVTcUDE/HF9B/J7UP14luiwZIDUrxfV2IxQyjtG+M=; b=yBe3rhxnpUb1s36K2JMcPYpxvtwWfgndWeRqW4c3BZFkDeozETb37ltGCUbMFvRUNLPesnm+Z74O+9L089nY3RbAL9d46bhWvUBxWDkOVLPT6FFFFE/2uttmj0RY/f4xv9UuwrQjRz32YtU/EG7le1E8tZSmL28JYY/c9fOr6Bk= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB5592.eurprd04.prod.outlook.com (20.178.87.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Mon, 11 Mar 2019 09:29:55 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::30cc:e034:1f7a:2cc7%2]) with mapi id 15.20.1686.021; Mon, 11 Mar 2019 09:29:54 +0000 From: "Z.q. Hou" To: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" Subject: [PATCHv4 00/28] PCI: refactor Mobiveil driver and add PCIe Gen4 driver for NXP Layerscape SoCs Thread-Topic: [PATCHv4 00/28] PCI: refactor Mobiveil driver and add PCIe Gen4 driver for NXP Layerscape SoCs Thread-Index: AQHU1+z8oUtBku7HKUGEtP8v8oioHQ== Date: Mon, 11 Mar 2019 09:29:54 +0000 Message-ID: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 37cffe99-89f6-4b12-b703-08d6a6041ec5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB5592; x-ms-traffictypediagnostic: AM6PR04MB5592: x-microsoft-exchange-diagnostics: =?utf-8?B?MTtBTTZQUjA0TUI1NTkyOzIzOmJWeW5oMWhDaHVJNFpESEo5U1loK2Q1TWVO?= =?utf-8?B?bjVidElKOWVPZUMzbEc0V1BTNmtVUVBRR3A2Y3hrRmZGOFZ5NlU5c1BGVDR1?= =?utf-8?B?SEFTS1JRc29qSjU0U0xYTWJMZjZLRzIwSDZOUzloM1VmTXZQRHdrK0pYZXZ3?= =?utf-8?B?MkVwalI3enAwZEN1K3hpVGlGWXIyQ1RVYjUrc0Y3SitWQ1E1NVNvdUxEZGhF?= =?utf-8?B?L3RZd3ZTRXVqWU9WQnRGQ1NOaEZpTnJlS0pSUGUxcXdxWkJ4RDZIbS93eTFw?= =?utf-8?B?aTRHajlFa281K3pMc210R28wZVZCZ1lrRVJKV0w4bmk1RTg1em16ek13RTlj?= =?utf-8?B?ZVh4MjlMYXhEUHhKMUx6LzRwSG5Ma0RvK1c4MFlEczB5Nnc1NEQrYjRpb2Ur?= =?utf-8?B?eDJFdG80NzFFUFlBc2lDd0JCeElLYXJqdXRQa1daWHlUSWRSSU9TNXkvb3k4?= =?utf-8?B?SVpnbGNVNXFKdFlRM0ZvM09XNUliRWg0djlDYjJET0RyeUVERFpJbzdndS9j?= =?utf-8?B?dWpCbGszaE5YQ2VqR1l4Z251NUVnOU5NSEJDdG4yNk9YREpobDNDTGtFamRB?= =?utf-8?B?ZzAwdE9iSSs0cEsxektHOHQxOElLRzNlRWJFeWhIUjB6a3JyNzBXam8vcXVJ?= =?utf-8?B?N0o2dTBwTEZWd2IwQ0FFUzNLbjlVMVJ3djAxNHFUdUF0L0NyRXp3NWN4RjJq?= =?utf-8?B?YXdJSXM3S3VZc2VWQVZtRjYvN1NvakpxaTlLc2F2ZGlRdC84bzd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OW1kWmhicVdjOGVIcXI2VThYRzNk?= =?utf-8?B?MitVa28xUzBaSkRqTDg4dHlHWkw3MDYxL1lTZG1sc21XejBlVDJPK3B2RkpB?= =?utf-8?B?SEFtRlFsOFJ3YjcwejEwUT09?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6029001)(366004)(346002)(396003)(376002)(136003)(39860400002)(199004)(189003)(5660300002)(4326008)(2201001)(8676002)(478600001)(81166006)(81156014)(14454004)(86362001)(8936002)(50226002)(7416002)(14444005)(256004)(1076003)(71200400001)(71190400001)(2616005)(476003)(486006)(186003)(305945005)(7736002)(97736004)(68736007)(66066001)(36756003)(6486002)(105586002)(106356001)(6436002)(6512007)(110136005)(54906003)(52116002)(99286004)(26005)(386003)(6506007)(3846002)(316002)(6116002)(102836004)(6346003)(25786009)(53936002)(2906002)(2501003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB5592; H:AM6PR04MB5781.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: A0KfhN9Yq32ldXJYYEGX1FSALc1JPWcE/cNoYIiYhzyRdcsmypXHAVg7naqSuREijWRQHfUEZw5hpTQG6op5EAnADmjRn1e6vlrIBhSQSR9/zZraEP3Blw9lH7Kph3ABOeoqBNO/Lu2ZzObi/FL7EYOlFveK1gru/OiG4f+kB1GABpdlagfK9SWNqLITSIOOqkC2CAtuske0/nahYshvyWjpcS+LvIeetGujdlWxqFYTzQwmjn9RaGsNyC5So3Se2akzwfDs+DML4GmjOjg9asTkl8v0kpgvJ70W/oqzyyHm4HZHSsNZ5iusT2/ajQKmeVQl7nkDAx7TNTTCbG/kYj5f6WOJrvbWH7tRXK/6HxgK/ZViUpVQxil4GcnG17bkEZ6UGJYGMLsuxr0ouslbjAJcsc3THVCTlDKStc0Tw8M= Content-ID: <1D3492F129FB224FA85C0701CF6D2F41@eurprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37cffe99-89f6-4b12-b703-08d6a6041ec5 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:29:54.8659 (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-Transport-CrossTenantHeadersStamped: AM6PR04MB5592 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_023001_646820_50C11984 X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "M.h. Lian" , "Z.q. Hou" , Xiaowei Bao , Mingkai Hu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Hou Zhiqiang This patch set is aim to refactor the Mobiveil driver and add PCIe support for NXP Layerscape series SoCs integrated Mobiveil's PCIe Gen4 controller. Hou Zhiqiang (28): PCI: mobiveil: uniform the register accessors PCI: mobiveil: format the code without function change PCI: mobiveil: correct the returned error number PCI: mobiveil: remove flag MSI_FLAG_MULTI_PCI_MSI PCI: mobiveil: correct PCI base address in MEM/IO outbound windows PCI: mobiveil: replace the resource list iteration function PCI: mobiveil: use WIN_NUM_0 explicitly for CFG outbound window PCI: mobiveil: use the 1st inbound window for MEM inbound transactions PCI: mobiveil: correct inbound/outbound window setup routines PCI: mobiveil: fix the INTx process error PCI: mobiveil: only fix up the Class Code field PCI: mobiveil: move out the link up waiting from mobiveil_host_init PCI: mobiveil: move irq chained handler setup out of DT parse PCI: mobiveil: initialize Primary/Secondary/Subordinate bus number dt-bindings: pci: mobiveil: change gpio_slave and apb_csr to optional PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver PCI: mobiveil: fix the checking of valid device PCI: mobiveil: add link up condition check PCI: mobiveil: continue to initialize the host upon no PCIe link PCI: mobiveil: disabled IB and OB windows set by bootloader PCI: mobiveil: add Byte and Half-Word width register accessors PCI: mobiveil: make mobiveil_host_init can be used to re-init host dt-bindings: pci: Add NXP Layerscape SoCs PCIe Gen4 controller PCI: mobiveil: add PCIe Gen4 RC driver for NXP Layerscape SoCs PCI: mobiveil: ls_pcie_g4: add Workaround for A-011577 PCI: mobiveil: ls_pcie_g4: add Workaround for A-011451 arm64: dts: freescale: lx2160a: add pcie DT nodes arm64: defconfig: Enable CONFIG_PCI_LAYERSCAPE_GEN4 .../bindings/pci/layerscape-pci-gen4.txt | 52 ++ .../devicetree/bindings/pci/mobiveil-pcie.txt | 2 + MAINTAINERS | 10 +- .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 163 ++++ arch/arm64/configs/defconfig | 1 + drivers/pci/controller/Kconfig | 11 +- drivers/pci/controller/Makefile | 2 +- drivers/pci/controller/mobiveil/Kconfig | 34 + drivers/pci/controller/mobiveil/Makefile | 5 + .../controller/mobiveil/pci-layerscape-gen4.c | 306 +++++++ .../controller/mobiveil/pcie-mobiveil-host.c | 640 +++++++++++++ .../controller/mobiveil/pcie-mobiveil-plat.c | 54 ++ .../pci/controller/mobiveil/pcie-mobiveil.c | 246 +++++ .../pci/controller/mobiveil/pcie-mobiveil.h | 229 +++++ drivers/pci/controller/pcie-mobiveil.c | 861 ------------------ 15 files changed, 1743 insertions(+), 873 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/layerscape-pci-gen4.txt create mode 100644 drivers/pci/controller/mobiveil/Kconfig create mode 100644 drivers/pci/controller/mobiveil/Makefile create mode 100644 drivers/pci/controller/mobiveil/pci-layerscape-gen4.c create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil-host.c create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h delete mode 100644 drivers/pci/controller/pcie-mobiveil.c -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel