Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3419586ybd; Tue, 25 Jun 2019 02:11:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3VBodViuPBiERtYSPVWXuI/7vt2RUwNOZbK5m7FpYZ9HbjgXFrfTFWDYc7pERYjIjazev X-Received: by 2002:a17:902:b591:: with SMTP id a17mr90852197pls.96.1561453903379; Tue, 25 Jun 2019 02:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561453903; cv=none; d=google.com; s=arc-20160816; b=WfNIx4EZ4mjYgitpwLV7pkEFUjap5ZB4P2LkB4MtcAk2Pn+4Edpl6ZIoWfYm8qhDQ4 TPTEZUeEmA0xYygEHt9SoHyt0F8NepYKiD6TsMYmF2fR9MsJdyLQLSrW6qTbNPB/WfQA Xb2Vn1lq46x/qSNMSpKkXQOIPCgoqAxkFMrOsVosLGhy7bY5S95PSBl+81dHckixqvaY n8ym1PPbNQAkcNRCQye9wWeLnSYFgmbzIqzK++kQWjtZCogbfw5QuSA5lKEMlCIGh+Ba Em0SjgnLSAnLmu3R+EETmEsO+9QnumvJ4LBIHK+6zFPM/4vWiR/NegH1eHvcQ/y/U4ag z8ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=o01O/rm7uNyXmnUCSHhr0mM0DkDG2jsNJRRlKUnxSnU=; b=ByWnuqBg6nFaEVCAjk/GCKhP1hXvtVgZdcfP8Ndp5SnpsSBPLYeePS4zjprzwEWFi4 5QAJcR/KNwCXeThfHQrDnpCkvin0MNWpZyGvtekDIMAR1hIJPlcAquv+X22gsUDL7Xiy Dg6X78LLjunKeGiGaqggU6TcxONmmzxKrNncqun7CllWLwvzRqnZR1daG0LkKNSibnk8 O5iyXe+Uig+Kq+OvTKmjyaEQ2kpd+dD8E055qhaGrC9tgieVhJhfSVmJE3aWaZFK1cGU 3xnPiz+zBf2Haippkd/Wlk37OEhU76qNVney4WUViNRoAjUdVRsTw5Z7Al8yb7LVSnmd vECw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=QnBbTKE7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si12320659pgo.380.2019.06.25.02.11.27; Tue, 25 Jun 2019 02:11:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=QnBbTKE7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbfFYJJk (ORCPT + 99 others); Tue, 25 Jun 2019 05:09:40 -0400 Received: from mail-eopbgr130055.outbound.protection.outlook.com ([40.107.13.55]:50405 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731294AbfFYJJj (ORCPT ); Tue, 25 Jun 2019 05:09:39 -0400 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=o01O/rm7uNyXmnUCSHhr0mM0DkDG2jsNJRRlKUnxSnU=; b=QnBbTKE7P0U43cCzl4OqIMW5hIZNXZrFCSxdXBNhoJ3i3dDlIyIN42H48KP7WmcmacWWnWCeSfjymA1IFsXipdzIo3Bxk2vuqozlAwrrWhaubXWD30oKOkWN0BYOrWa4zCBGPJJXwuoQfQLHq3aVtBMY4S6bENsMm17mWQcZgjQ= Received: from DB8PR04MB6747.eurprd04.prod.outlook.com (20.179.250.159) by DB8PR04MB6746.eurprd04.prod.outlook.com (20.179.251.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Tue, 25 Jun 2019 09:09:35 +0000 Received: from DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::93a:4344:1120:4ca0]) by DB8PR04MB6747.eurprd04.prod.outlook.com ([fe80::93a:4344:1120:4ca0%6]) with mapi id 15.20.2008.017; Tue, 25 Jun 2019 09:09:35 +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" , "arnd@arndb.de" , "mark.rutland@arm.com" , "l.subrahmanya@mobiveil.co.in" , "shawnguo@kernel.org" , "m.karthikeyan@mobiveil.co.in" , Leo Li , "lorenzo.pieralisi@arm.com" , "catalin.marinas@arm.com" , "will.deacon@arm.com" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv7 5/7] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Topic: [PATCHv7 5/7] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Index: AQHVKzW1PuTchjRGkk2emfubeybyLQ== Date: Tue, 25 Jun 2019 09:09:35 +0000 Message-ID: <20190625091039.18933-6-Zhiqiang.Hou@nxp.com> References: <20190625091039.18933-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190625091039.18933-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: HK0PR03CA0116.apcprd03.prod.outlook.com (2603:1096:203:b0::32) To DB8PR04MB6747.eurprd04.prod.outlook.com (2603:10a6:10:10b::31) authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhiqiang.hou@nxp.com; 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: 9431eb9a-04ce-4208-78b0-08d6f94cd781 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB8PR04MB6746; x-ms-traffictypediagnostic: DB8PR04MB6746: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:42; x-forefront-prvs: 0079056367 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6029001)(376002)(136003)(39860400002)(396003)(366004)(346002)(189003)(199004)(4326008)(386003)(446003)(26005)(102836004)(3846002)(478600001)(71190400001)(186003)(11346002)(71200400001)(7416002)(6116002)(25786009)(66946007)(50226002)(110136005)(8936002)(54906003)(81166006)(8676002)(305945005)(81156014)(316002)(2201001)(5660300002)(66556008)(7736002)(66476007)(66446008)(64756008)(1076003)(66066001)(486006)(2616005)(2501003)(73956011)(68736007)(14444005)(6436002)(6486002)(256004)(6512007)(86362001)(6506007)(53936002)(36756003)(14454004)(99286004)(2906002)(52116002)(476003)(76176011)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR04MB6746;H:DB8PR04MB6747.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TTt667zvStbesX1tEnLCEvF8d5+6etgREgUhNv2X1FvB44He7/9ysGsEupXF/rk52s6C29yGp482m/z420idOjJb3q8y4ndkbQtKxItQISULyqStAbUDG9Amg51DprkR9o9ho/CLbnwna+Y/KgPif7y8w49gCBsXZMvU8PF4rqtNV4BU/2Zc17Hirpx5IpI9+lsJnROgMt9xIpgAsCza349ZYvhg5c/q3IBIngjKXcQTjmTIZ2dRWfgjPkkz7aQPmqqGKZ4XoNRZOjMzjx06ZgMS+DMu8Im6RcQKI74OUfZvc9KmOJv06U2lLp1PRl3+LqojGIgL3oy9pXNFvvJFrCvWnow0m0B71Fw1ppZ66wbb/VYKK6rrHt9hJliLmnnu0csIMrbF4A669el2lhL+EcpjmOsTY3a8cY5QBEeTisY= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9431eb9a-04ce-4208-78b0-08d6f94cd781 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2019 09:09:35.0969 (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: zhiqiang.hou@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6746 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSG91IFpoaXFpYW5nIDxaaGlxaWFuZy5Ib3VAbnhwLmNvbT4NCg0KVGhpcyBQQ0llIGNv bnRyb2xsZXIgaXMgYmFzZWQgb24gdGhlIE1vYml2ZWlsIEdQRVggSVAsIHdoaWNoIGlzDQpjb21w YXRpYmxlIHdpdGggdGhlIFBDSSBFeHByZXNz4oSiIEJhc2UgU3BlY2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