From patchwork Mon Mar 11 09:31:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 10847237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D7BB1390 for ; Mon, 11 Mar 2019 10:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 406BF28BE3 for ; Mon, 11 Mar 2019 10:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3453028C04; Mon, 11 Mar 2019 10:32:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C3B3028F69 for ; Mon, 11 Mar 2019 10:32:03 +0000 (UTC) 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:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X7Eh79aHeCcBt5J6twLMXr2uQa+IMh3izarWMldg2Ls=; b=ItPO2aXRUkH2S7 9m3yjEa6bEOnS7iAX7keZiYYe5DLvrG6ERzfaogXdCDgQe2is7mSyzfT4Z1XL7ZesPcSSjW9STAWW NZx2rV5/W+jIrK0qOo6OrLszDLziwhVdYFXlstfmsVBpaeM7zuYXkM+m9hU7kM9FiQu1DDsDOHJqt pQ3a73mdxEOaRxhzyrZ5cNIcWVQNaq209qEr7sWEG3vP9q0O886aaBT21m1MP2kNr4aSV+4r2ZApD OASOvPeqcb6abcXw0lM0gtT3YJAQSgVJAjJjYHXEkTQP0Uu/cflifRKBxjTSk2Dx97CZjJqqRnyGN hMFKmUNyMNJ8zuktlQ+w==; 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 1h3IDx-0000Dh-HF; Mon, 11 Mar 2019 10:32:01 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3ID3-0007Mk-UA for linux-arm-kernel@bombadil.infradead.org; Mon, 11 Mar 2019 10:31:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ioURpHbldQu1ga2fdu1nut9D4Rk/cA214SnJc+EcAus=; b=MmG4b1cDeJIJjk/ztrZgl2r8RS HZC1R4k0HwD2Ip5hJ612gxIUn9HqYqh2nmML5LyUQAcqYC8DrQJWZYV8cjdNK967srbJ05RlYr5e4 p84D7KF991BzX4F7CNxzhRLxSF3QiHrmlinUbsGE1wq+P+YnIYRUJy5w9uk9RlS/SmV9wQCdfCo4Q 3Ig+40YRfiEaHQgIFeoJDN39ns1r8Kv9i+NIy7sGipGwmxbv/zUqqd4LBoIs/E82FMxrLwvsm9bj5 Gmc07Y8rYuB2rxsPu39MM1xjv1OYz08tj+3XSH8/iTscu2ydt4Kh9q675eKkYhU//PSx/50uUUQPg BHZFMMmA==; Received: from mail-eopbgr70054.outbound.protection.outlook.com ([40.107.7.54] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3HHx-0008Hu-Dk for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 09:32:07 +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=ioURpHbldQu1ga2fdu1nut9D4Rk/cA214SnJc+EcAus=; b=YtIUtzBYKVs9FV8vMHYwMAP/Sx93EmjQzBepNz1ei40d+dMEdEGNoheBWmwhFN28FpVlVSHCaJHY+MpZ+3IFgU3fMt9XKA80UXZgGMQtTm9lQfdzsBX/lufSIPL5p4m1vi4JM2dPavpo0RMQTiS5UlzXRl8ukfujZ7nrUbB0zsA= Received: from AM6PR04MB5781.eurprd04.prod.outlook.com (20.179.3.19) by AM6PR04MB6566.eurprd04.prod.outlook.com (20.179.246.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Mon, 11 Mar 2019 09:31:23 +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:31:23 +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 11/28] PCI: mobiveil: only fix up the Class Code field Thread-Topic: [PATCHv4 11/28] PCI: mobiveil: only fix up the Class Code field Thread-Index: AQHU1+0xoaV/Y9GqOUGCpK8QyE26hg== Date: Mon, 11 Mar 2019 09:31:23 +0000 Message-ID: <20190311093130.7209-12-Zhiqiang.Hou@nxp.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> In-Reply-To: <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) 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: ec21b41d-9e08-48d9-6d2a-08d6a60453c5 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:AM6PR04MB6566; x-ms-traffictypediagnostic: AM6PR04MB6566: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; AM6PR04MB6566; 23:O2ykTF/dLD89ixjTqdMatg+bXuvZRGsSShvEKHQ?= =?iso-8859-1?q?QNohpZAFjZ1i/18?= =?iso-8859-1?q?pBSrYgnzk2Vp9QNwi5DmrY8xKKXem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/I7Es0?= =?iso-8859-1?q?/vtI2xCRDCE74AiYtiq/1zFJvQTh8NFU7Id3ORSz0/kPx/LP7QmiyWSr2DHY?= =?iso-8859-1?q?O0EMJeemeW+DGK/5ekY09ErE/H2rcLJarTYznrkJlZIK1soKQJESgkCvvhld?= =?iso-8859-1?q?1axy8FiGoiTGWkBIc1dcPcymnqTk4Mo7he1m/JcAnCYAjALFJQniCccV5btN?= =?iso-8859-1?q?OY/qSNZD6+ca6gptaQ7nkg3IvCQpf6uLB/ztjMtx58bBChsC/Foa1jC/NzD6?= =?iso-8859-1?q?En7JyEAbwVMpx6zd6zluL7qBzfcMayYGjp40U2Jmejl0YPJ/ugbbvdRQ7atf?= =?iso-8859-1?q?4IDvWGnaWnRMOD4mxpDxXW9K0VTbaQ21ZMsOZHWPrEDfl9pw=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09730BD177 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(376002)(136003)(199004)(189003)(6436002)(478600001)(25786009)(99286004)(11346002)(2616005)(476003)(76176011)(3846002)(6116002)(81166006)(81156014)(486006)(71190400001)(71200400001)(2906002)(8676002)(2201001)(5660300002)(97736004)(6486002)(446003)(7416002)(2501003)(86362001)(256004)(14454004)(316002)(68736007)(26005)(8936002)(6512007)(53936002)(1076003)(66066001)(386003)(54906003)(50226002)(110136005)(102836004)(6506007)(36756003)(105586002)(4326008)(106356001)(186003)(305945005)(52116002)(7736002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB6566; 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: THh689YRWj/TDFnfuALOViBkWft0f3RUKmA7t7+CQ0P/2x/6rvUcdWvecCvsPbkNqriCjY8Eb711Dc/G8eGg88EYtdObwWtU5eF6b+uUb1ixIWgJcginYTb4yJWIrnOAn5mJyUmfUjoIiT3lZDOyQHDbLdsTkBPGWTMN+whblD5PGRUP4RnhLUOx87RLqa6RPziAaEL0KQlONVydsE6hucImKeEJ+Q5NeRFLX+DVd1TfG2+6VqJecC9LFCdacZoiddiobQX32vYRf8Dy016/LwattEVv2vqeqfgLJ4r+6OjHLxUTuWwawYS1x+deX4yT6PklMLVZL6Cg5wav8q40Z8NUIlNFOjGz2Ih9fsqkM/CiIq0kfWkH7Zip8h64EUuF0W26bnMjk/V/VyUSGGR+HNW6iEf0iJgNQforMnhL8E0= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec21b41d-9e08-48d9-6d2a-08d6a60453c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2019 09:31:23.7883 (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: AM6PR04MB6566 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_053205_553147_350F7725 X-CRM114-Status: GOOD ( 10.49 ) 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hou Zhiqiang Fix up the Class Code to PCI bridge, do not change the Revision ID. And move the fixup to mobiveil_host_init function. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V4: - no change drivers/pci/controller/pcie-mobiveil.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 78e575e71f4d..8eee1ab7ee24 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -653,6 +653,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) type, resource_size(win->res)); } + /* fixup for PCIe class register */ + value = csr_readl(pcie, PAB_INTP_AXI_PIO_CLASS); + value &= 0xff; + value |= (PCI_CLASS_BRIDGE_PCI << 16); + csr_writel(pcie, value, PAB_INTP_AXI_PIO_CLASS); + /* setup MSI hardware registers */ mobiveil_pcie_enable_msi(pcie); @@ -896,9 +902,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) goto error; } - /* fixup for PCIe class register */ - csr_writel(pcie, 0x060402ab, PAB_INTP_AXI_PIO_CLASS); - /* initialize the IRQ domains */ ret = mobiveil_pcie_init_irq_domain(pcie); if (ret) {