Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3145136ybi; Thu, 18 Jul 2019 21:55:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzekS846ziRMP77JZ1iTII5eBkkCkQ/L0URbjIjPO0OHeo1ycQD901/cWPSLy+8aV6CW0aZ X-Received: by 2002:a17:90a:374a:: with SMTP id u68mr55209289pjb.4.1563512111253; Thu, 18 Jul 2019 21:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563512111; cv=none; d=google.com; s=arc-20160816; b=nLbzzaIhbC1MsOeIe4rDxC8S2juhIjlToR1jha/CimRutIp4puTAtAGZ+o7tAbcNOT axRmB0+yPArjZcdw/RQZHa69WJ/PZ1ckjT28C+hS/adJNjTB8EfB8X7W8asyYxJEj2WB 6/9fF4PbQlkNSkQnGhXfBEnVHJy0jCmU7WZKg3cWQ7WdLaFUK0RcCUfIvS9XiYViZMGz jYS52PFWNEmBsOAU0mrPZUme0LzUBgwGbvrtOSXkuMoZZ+IZzlwKIq2Nj1S4iCClDP9z XP1yfAjWqai2m8rvlHT5OQS52e0XuZhVqfs9VSenubwRqcZfibfRrqy7rJuRH2xTiRPa S9pQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VsCAwqaXE+W2uU4aJw3d20bmNFi92j7L9ZYj3glfGk0=; b=kdy5iy9cLXX5hWmzRlm4cYLC+xLC42qfonlSa+Kutjlk+MU29ZUyalxOGKycAfktTI IeF3otqTcQaS78L69UHu7XGklCw96zb0iLQjYU5dZTZRe09s4eoixwV17+cBmmFxTgAy uAR5wUrFZgf9zwBdNoEDT1GUGCvmgo9zneSWg85G7WL4p8v6BeuV03raONO8lcKDYWMZ gmbWBgYJ6y/ptjG29BbhQThvCPU3iJEiLDVmuKyF2nvBqmrESp9I7sNtImrM3sSE9R5c IRpwQOV8BrGIv0TjWXK8++0OhLZkx0oh8BQe1BI5YmIa4tJ/4pBfMWW24Lg4e2R6be6c XU3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w4McZ0PC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si594228pge.4.2019.07.18.21.54.55; Thu, 18 Jul 2019 21:55:11 -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=w4McZ0PC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731843AbfGSEFl (ORCPT + 99 others); Fri, 19 Jul 2019 00:05:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730445AbfGSEFk (ORCPT ); Fri, 19 Jul 2019 00:05:40 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5382C218BA; Fri, 19 Jul 2019 04:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563509139; bh=8Qkmo7ezGTUAxtzDgCwqLOTlTxCum23/8/8T9fga8WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w4McZ0PCzAChTtHkN5xKqC+eiTVWB501TUs3qxj9dlClu7NHovhv1WeBlYafdXStO OzApVQjYD3h2Zs2g0sJIcciquM10N2urqpqeFv+E5upC6CRGrpiCa8AINpQFVAQBkj 0BgrWs8gOkpiI0OUKX/PbLab2d54DFZ2kh6jbSQU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hou Zhiqiang , Lorenzo Pieralisi , Minghuan Lian , Subrahmanya Lingappa , Sasha Levin , linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 5.1 092/141] PCI: mobiveil: Fix the Class Code field Date: Fri, 19 Jul 2019 00:01:57 -0400 Message-Id: <20190719040246.15945-92-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719040246.15945-1-sashal@kernel.org> References: <20190719040246.15945-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hou Zhiqiang [ 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 03d697b63e2a..88e9b70081fc 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -558,6 +558,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); @@ -798,9 +804,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