Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3175809ybi; Fri, 5 Jul 2019 03:11:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqHreiuVNAOmnnSpwFrI+8a8JV+FhkDt8/T893v5WN0WX1LaW7NMNr9iUhi9wfUnUPQYiS X-Received: by 2002:a65:5c0a:: with SMTP id u10mr4537842pgr.410.1562321485952; Fri, 05 Jul 2019 03:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321485; cv=none; d=google.com; s=arc-20160816; b=u3TnORb1RFUZ6EBaUkn1fKYVhnX1XHff8Pz/oAae/xJWv8uWkCYnwMZ1jxAiYMejN4 uryYRKL+mE7MoYKE8ojT0qTxlP/mEKhx/ByqyxukxMQhOIKP25RcmSF3qETvEQGXTSeD mhxt/Ks0BNzBqc42a8iPFBKERYXXyvDoFuwQeteR6eCpKwPZueKpMKJzVNmH+s47fJIM +9EbNxiDlEF/t0IfEK/ofj8GweeCH/HtApJ3GQ/w5OeeJ96Q3venCSprrNVmqcSM5Len qxAynRtvofgUl8bv7eHdAJHO65TAnjBcofpkFubf3lr1Re4nrQu9W1voWXBhAyVcVTCr /+PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ktr7dzB2qPMfRiI7oApH41PINYujEW7RTHIxoU4X4GQ=; b=KYeeibDQD8MecZHKzXz8vzckt38lzXRvAq9Dr4V/oqvB53CuPK0oFOVOUDD25kGF+8 qqq4Z9rfEs+MqIUmZQFXDPXD5TbQOSzUrkgi5Sr42VX1+ZlJd5iw6l1wzq4TFo7qaUEC Gnk00ge9m/InD3lJ29V7Wf1QS/xPUcdM/tvfplFa0/vvT58jZMWDrs5+/xm4N5ibTLd7 AzZkWQB1IStPIQeWuz5ivfwn1V4mvOrbR+wmFFp4C+cv2fdYD45FZr8/8Oz87SKkL3Ss bupGaGwmz/4xkyzduLWixQbsXpjaYV4UfamHddmW81GbcyY5GRpxYs2aPxXZv/m8h8oj retQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 s23si3425608pgm.345.2019.07.05.03.11.11; Fri, 05 Jul 2019 03:11:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728225AbfGEKJA (ORCPT + 99 others); Fri, 5 Jul 2019 06:09:00 -0400 Received: from inva020.nxp.com ([92.121.34.13]:60822 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728035AbfGEKHR (ORCPT ); Fri, 5 Jul 2019 06:07:17 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1EB761A0EAE; Fri, 5 Jul 2019 12:07:15 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8EC161A0EAB; Fri, 5 Jul 2019 12:07:06 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 343F540297; Fri, 5 Jul 2019 18:06:55 +0800 (SGT) From: Hou Zhiqiang 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, leoyang.li@nxp.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: Mingkai.Hu@nxp.com, Minghuan.Lian@nxp.com, Xiaowei.Bao@nxp.com, Hou Zhiqiang Subject: [PATCHv6 07/28] PCI: mobiveil: Fix the Class Code field Date: Fri, 5 Jul 2019 17:56:35 +0800 Message-Id: <20190705095656.19191-8-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> References: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix up the Class Code field in PCI configuration space and set it to PCI_CLASS_BRIDGE_PCI. Move the Class Code fixup to function mobiveil_host_init() where it belongs. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Rebased the patch, no functional change. drivers/pci/controller/pcie-mobiveil.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 8272183..9e08061 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -626,6 +626,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) } } + /* 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); @@ -866,9 +872,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) { -- 1.7.1