Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3792801ybi; Mon, 29 Jul 2019 12:43:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyo9hwgge5QHbEdgYi4u/hUhAO5ert8LMhqsXzqIBVEy12Z1nSuVVuw8SffslmjpUSf2E8q X-Received: by 2002:aa7:9dc7:: with SMTP id g7mr36746137pfq.170.1564429418505; Mon, 29 Jul 2019 12:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429418; cv=none; d=google.com; s=arc-20160816; b=bauFPZBtnfIXXMrwfwAqDNVPjaVHQiEDJ7MUY9fznVccOo+Tk9PyuMdnhCHU11N2Lr qspdTGBQd0qcAj70aerXhyNk3xv9a5X6B9NcLcvXtAeYuxQyLJzAmIJDwNQ6muRAVgVz ID/zLFxL6Q88gTMvaBNQN4PUl1Rz79EktudNSgGrh4KNN3hQxklh+PUQSB7XhYvq5iEj ozocBWy3Res2hQNMkaVCv4wo2jUPxArU0HA3FTOKo1rXryKM+eE01PRTCmVsq3JA6tP9 S5NLnNZER1zg+UdFn0a9e0EkYMBIn0ZZM0mkU7ldZvAMOA+pJfUjGiXOXVPNNDCl7TwK Bu0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iKX2lii6X3AugA8vv34baVFSlfn8/dcJM47eB8CXl64=; b=t5Y0O0wyj/gujaBOtHK9bBWj56sIpeY/yBVpu4XNHC7GCKe3FFXeod/oR/q97pl+gX RWUeF6gORdBHwGfZCEwmYmxKVEa4eCT57AsBwYIwVaNk5rejy1jPP301R3cUtzSYJrEG KXUcgdbWIeFFdUzHZFkjVRPWDNY6QazH/SrxFrqtg0WFYeZ1KS0hxg4cmHkHfQfujxYy HGb20ciP5mEiOmgXhD4+EaAO2BPbe81rudcAV28iYQ4IPGBb3Gyp34sZvL0tG+vKSLOC aMqckrePVnciV+bNzteV21Ha/wbdNIppWmjHJt5w+nVlDos3lxAdk5+grRH82f5/PwfR YNcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IgL0JSZ5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si27073020pgu.226.2019.07.29.12.43.23; Mon, 29 Jul 2019 12:43:38 -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=@kernel.org header.s=default header.b=IgL0JSZ5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388926AbfG2TmR (ORCPT + 99 others); Mon, 29 Jul 2019 15:42:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:57904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388448AbfG2TmO (ORCPT ); Mon, 29 Jul 2019 15:42:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8AFE2054F; Mon, 29 Jul 2019 19:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429333; bh=vAAYYYO4yztIIOn+PQ+PjDFS5Xe9i+FQ/NqxpfmeSts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IgL0JSZ545e3PfXzahaPesP0vqbjUI2bi6dn7nRYmYz7LYpvijkSJrmmO05rvajTp gz7t8/Y1PAgN20byiWmhz46LFVvfbJN/e99wwy5UyRCy3NglRNgBHd+pD5u2O2aEyZ ePKRcE5r/57MT40b3fH3j7ly3ew9rWAe6/OEqm5U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hou Zhiqiang , Lorenzo Pieralisi , Minghuan Lian , Subrahmanya Lingappa , Sasha Levin Subject: [PATCH 4.19 063/113] PCI: mobiveil: Fix the Class Code field Date: Mon, 29 Jul 2019 21:22:30 +0200 Message-Id: <20190729190710.522812464@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190655.455345569@linuxfoundation.org> References: <20190729190655.455345569@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 0122af0a08243f344a438f924e5c2486486555b3 ] 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 Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Signed-off-by: Sasha Levin --- 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 d9f2d0f2d602..3e81e68b5ce0 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -565,6 +565,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); @@ -805,9 +811,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) { -- 2.20.1