Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4657078ybi; Mon, 27 May 2019 23:53:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOG3xOdO2iWSTA+FR/ZERLVDV1OcAQLqBR1I0UhSbXXIRTF5HZUue1Mh1K1XUtIMyQYoMO X-Received: by 2002:a62:f247:: with SMTP id y7mr138981614pfl.18.1559026402305; Mon, 27 May 2019 23:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559026402; cv=none; d=google.com; s=arc-20160816; b=VHcpIs5TZ4JTxX0NuuEkg3uVS+MWs8Tp7VLRUKV8XDCnbo5eUx9D4w+EUjgvTu6i6E WDXtSVlFcdn1Ak6IxVOuglfDp2gvitUuIKZTyRwcnMu15avrhDFRiVMqAu4UxKJd0Fxj 0U+RyLCvkj2y3LKqzwWbFi1UNttdzuE+S0FjXZL0w2rEvqQOzGdwKeyyQ+B/z9chNeeJ UWqIW3X0MaVt7Kgs28u/+Bx7VfT7/KVk1BY4DeOTRmnEDa/sIYi01PZSVCeR5GMsWUVe ql0uu7daewAl6UBKcYkysdvf7KmrHKJXrs2RFestXy9uPpEDjrDfxnSGZ29xAHRZBKmO 3Mtw== 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=bvsRf/jZF+u2YvyGICTNMdzKbqvrn8fMvFsccnQbi9w=; b=UIvGtXhanhW2uW0JGQndse7hnZNVxXl7mrA+Mr6Wc23UoyG8XjrGaxTsFKk7HV4GG0 E6GMLUs/p9cPhPmsI5QN9mMkJGNiynVTPPQsYO3KCjhpQNhlMbaGICT0CAQaE29RZSMy 7h7vtE7nsOWLr7k0syxKatxbcojA8n1AHlZKPe+zBJhdjWFRKvOOIYu0AKGKQS7vtzFh AooODiBng5tXlWdpc4oLlTp8LP1Fte9f88vgSF+96zumgl3Pm0bc9pN+/BTA6u4H5ZxU tkMUKP3E2Vf5pOkU1oQLJanPjGngj0GebF+8QZn7F6k+sUvil7PiFE9luGTDpZa7yghH AMNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Shg0FaqG; 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 x32si22684854pld.190.2019.05.27.23.53.07; Mon, 27 May 2019 23:53:22 -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=Shg0FaqG; 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 S1727734AbfE1Guc (ORCPT + 99 others); Tue, 28 May 2019 02:50:32 -0400 Received: from mail-eopbgr30077.outbound.protection.outlook.com ([40.107.3.77]:57991 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727240AbfE1Gub (ORCPT ); Tue, 28 May 2019 02:50:31 -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=bvsRf/jZF+u2YvyGICTNMdzKbqvrn8fMvFsccnQbi9w=; b=Shg0FaqGC110+qhrm5lEiqu/eKlvpSKyyj7imc69VTtei2bvGeEjFG1ufVHaIb23uZEfBnCLjdTSQdMmys938nGmPfyqgmNGU+BzDedFtG5s//2Sczvzt9TcHDGGgP74vP6FXbgc32VXWxWd36g6Gghhn8eKlwUxf1F8OSt8+Bc= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB5495.eurprd04.prod.outlook.com (20.178.93.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.15; Tue, 28 May 2019 06:50:26 +0000 Received: from AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::6491:59e7:6b25:2993]) by AM6PR04MB5781.eurprd04.prod.outlook.com ([fe80::6491:59e7:6b25:2993%7]) with mapi id 15.20.1922.021; Tue, 28 May 2019 06:50:26 +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: [PATCHv6 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Topic: [PATCHv6 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for NXP Layerscape SoCs Thread-Index: AQHVFSGhfXHttKtAVEqXFwkNmjQtHw== Date: Tue, 28 May 2019 06:50:26 +0000 Message-ID: <20190528065129.8769-5-Zhiqiang.Hou@nxp.com> References: <20190528065129.8769-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <20190528065129.8769-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: HK2PR02CA0128.apcprd02.prod.outlook.com (2603:1096:202:16::12) 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: 35ee8ef9-1754-4866-af43-08d6e338c3c7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:AM6PR04MB5495; x-ms-traffictypediagnostic: AM6PR04MB5495: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:49; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6029001)(39860400002)(396003)(376002)(366004)(136003)(346002)(199004)(189003)(2501003)(6486002)(86362001)(6116002)(6436002)(66066001)(6512007)(2201001)(386003)(2906002)(53936002)(25786009)(3846002)(7416002)(4326008)(71200400001)(71190400001)(66476007)(54906003)(11346002)(81156014)(73956011)(64756008)(66556008)(50226002)(8676002)(316002)(5660300002)(81166006)(8936002)(110136005)(305945005)(76176011)(102836004)(52116002)(14444005)(186003)(26005)(36756003)(68736007)(6506007)(7736002)(256004)(446003)(478600001)(486006)(1076003)(99286004)(66946007)(66446008)(2616005)(476003)(14454004)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB5495;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: Ruh+qjF192re9D+4unFCMv1kDnWYXkNU7UssNhG4feORwzL44R0CONYKomNKg1uzVF8Ill5C1ja0qZhf9II4slqfm9VvRnxrG+PG7oOKO6SEGGrlDSR871gHMw3gfiv2+vnWG1y2cUJ3GJv6IFTWwpgd/4EYEHkFqVAPEW2ur2NVIkkBbJEv0HQd19irnMfj77YFGWigw/i1t8mIBvX9HubGeWXXPZqKq2ILnFbmv2lIAEHjNEeGaobSM7JphZ/BV/GFIq4oTOGHUcT9xTo/EYwtU0/4kpSgSkH8KW7bcjepOy6KaHmKEzLida8KfrkmjqsBB5bA5fOlht9Nk4TQSgiFxjpJd/HVBWT72OgYi7CC/TewWhLbQSoAx90LamXGlp0xEKIGzIsxRWBP+Wwra4M1mDfkYDb1YBRM1FezrRI= 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: 35ee8ef9-1754-4866-af43-08d6e338c3c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 06:50:26.7268 (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: AM6PR04MB5495 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSG91IFpoaXFpYW5nIDxaaGlxaWFuZy5Ib3VAbnhwLmNvbT4NCg0KVGhpcyBQQ0llIGNv bnRyb2xsZXIgaXMgYmFzZWQgb24gdGhlIE1vYml2ZWlsIEdQRVggSVAsIHdoaWNoIGlzDQpjb21w YXRpYmxlIHdpdGggdGhlIFBDSSBFeHByZXNz4oSiIEJhc2UgU3BlY2l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