Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp253262yba; Fri, 12 Apr 2019 02:55:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsKVjItFW0SugbvJp/FnuVK1b4NxtOS4PzA+KNoELIC8sXHaUzNkf5uVo09HNdBm/t3VFv X-Received: by 2002:a63:4616:: with SMTP id t22mr52785134pga.217.1555062914262; Fri, 12 Apr 2019 02:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555062914; cv=none; d=google.com; s=arc-20160816; b=t8SHxJFZqdQ8PUwAm3Thu/10K5YigA1VrdBkYpkZj3vovVjpQrzQ1YdgjNN/6Sg4hB AnC0jWcPWbtgcWLOXAhVvUUUFMpD/bnBu7x/4wn++/kILTlLGWpQIctDfqucgPFmGowH 9wX9LEQPJsPhh0QlVTRfxhxgx5YKW+gJGL6ddaRFef/KUZ+TZ+9wgtkDfK23Tpy3X0iy H79jOMEZB3McSIFTUGjaLr6VfD48RtannlG1a/DzSZPnpw9sFaKeKcDofgVNrAcAQsds F2OvZELI8P48Cc+/ek+YKJthTt/3mlCxDNrOjKzg4dMVJk026+6H+dy0LMX/ovapc1ci Ev4A== 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=tmlCv8llpyiWwSZ9NkGUK32cDibZcHyV79/QSCJPf4Q=; b=lL9kx6bzKotISfncuACVcD15rWhp6vFg4QkmstVryMh5mSqz6W2NJI8o8GfZB6PEIY lsyvP/8b2nI8Ilv0Ti34KetfvkkMAiwiS5smK+7X24Bg0+PmojyVoExTW+66/aFrD/lE e5JC6Yxfwbd1uPlFGzX9VcCf+lg6GVbSxlmQJ7AQUQp5YZf2AuK2s6qhUgyyy3VbSdfM amAvsGB/lTF9xsyL+IyVlrYpNOXyFR8/spPsEMWRlXdDUWQGIxLbUlDq4srqAlIvNg9T KNwbv/UmOUvF6pXjNf0Sqhw5UizEW87fJNyXNXX2ZFBaKayHsdaPh3UKwQ74hEJgCR7u 2VkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=jtZeWoC1; 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 l18si36369394pgk.289.2019.04.12.02.54.58; Fri, 12 Apr 2019 02:55:14 -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=selector1 header.b=jtZeWoC1; 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 S1727169AbfDLJx2 (ORCPT + 99 others); Fri, 12 Apr 2019 05:53:28 -0400 Received: from mail-eopbgr10063.outbound.protection.outlook.com ([40.107.1.63]:5486 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726128AbfDLJx0 (ORCPT ); Fri, 12 Apr 2019 05:53:26 -0400 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=tmlCv8llpyiWwSZ9NkGUK32cDibZcHyV79/QSCJPf4Q=; b=jtZeWoC1+rUyH+40OQJddBkz2Z6X7NSpL1uDcGah5mYWsQm/2QnQ72AbzHAMzW6PJd2i7lgD2PoQzHzn81MNup2/zr5tkwyd7b5U78HgKxwy5b3f1hryNc0HpaUb1WdXFwcxyMo0EWhWPvE6kZEKyX6QiE2R8mUfEnEusN+5cLc= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6262.eurprd04.prod.outlook.com (20.179.7.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.21; Fri, 12 Apr 2019 09:52:51 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::f9db:ed86:614e:460]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::f9db:ed86:614e:460%4]) with mapi id 15.20.1792.009; Fri, 12 Apr 2019 09:52:51 +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" CC: Mingkai Hu , "M.h. Lian" , Xiaowei Bao , "Z.q. Hou" Subject: [PATCHv5 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Topic: [PATCHv5 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Index: AQHU8RV9MHdz0yaFRUW6+R/81XqWJQ== Date: Fri, 12 Apr 2019 09:52:50 +0000 Message-ID: <20190412095332.41370-5-Zhiqiang.Hou@nxp.com> References: <20190412095332.41370-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190412095332.41370-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: HK2PR02CA0210.apcprd02.prod.outlook.com (2603:1096:201:20::22) To AM6PR04MB5781.eurprd04.prod.outlook.com (2603:10a6:20b:ad::19) 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: 45db318b-de5c-4472-ca67-08d6bf2c9e36 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM6PR04MB6262; x-ms-traffictypediagnostic: AM6PR04MB6262: x-microsoft-antispam-prvs: x-forefront-prvs: 0005B05917 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6029001)(366004)(346002)(136003)(376002)(396003)(39860400002)(199004)(189003)(68736007)(81156014)(3846002)(66066001)(26005)(76176011)(81166006)(86362001)(2201001)(102836004)(186003)(386003)(7736002)(50226002)(7416002)(8676002)(2906002)(6506007)(8936002)(305945005)(5660300002)(6116002)(14444005)(4326008)(476003)(478600001)(25786009)(486006)(256004)(2616005)(105586002)(71190400001)(446003)(110136005)(6512007)(11346002)(1076003)(53936002)(14454004)(52116002)(6436002)(6486002)(71200400001)(54906003)(2501003)(36756003)(106356001)(316002)(99286004)(97736004)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB6262;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) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: vQk8nIzGovyfTs2+pJ5RzwBQbIfWg0ruFaYLmPM914W8FW6P9SHS+CFKGQ8aMl3DBCAKoTCHZIjb8qbch012YINDsqBm5JKSCJawPd1wKC7MWIr4RcPSURypnQ1KdpwgwBeVfpn4liYAkLysVjbvXzbLS7xRIjEARhZHh2R490NuzrzY6jzyF3YyFm2VNdO3ITQ6+VQ2BiSUzKpoiehJPwR+ZkyUV3oNCYM62tGmJA8pMOxj+VbR2szKwMTyyQLfg1ya+DKqZkDEGcBFoO48v9eaH6yCCR129FmEbF/ypLQFzbN3lJpWS3V3tQn0Vq/19q4LgB/5DxyuJ1+92PsCtgdjUx/KEdqyypNDrJReP9KRAQu7eExwd8IwUcPD7CaKmCWH5G0tuFweX1cDwU3KO8sl16H1B/DyvU4xG/zVXMc= 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: 45db318b-de5c-4472-ca67-08d6bf2c9e36 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2019 09:52:50.3582 (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: AM6PR04MB6262 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSG91IFpoaXFpYW5nIDxaaGlxaWFuZy5Ib3VAbnhwLmNvbT4NCg0KVGhpcyBQQ0llIGNv bnRyb2xsZXIgaXMgYmFzZWQgb24gdGhlIE1vYml2ZWlsIEdQRVggSVAsIHdoaWNoIGlzDQpjb21w YXRpYmxlIHdpdGggdGhlIFBDSSBFeHByZXNz4oSiIEJhc2UgU3BlY2lmaWNhdGlvbiwgUmV2aXNp b24gNC4wLg0KDQpTaWduZWQtb2ZmLWJ5OiBIb3UgWmhpcWlhbmcgPFpoaXFpYW5nLkhvdUBueHAu Y29tPg0KU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