Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3800631ybi; Mon, 29 Jul 2019 12:53:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ6AxGIPLzkrYLQeUx0wnbr5HuiHo4NhbMhV7DSjgOPQxt3uGo2LBSYj9qZZPFG0ug4jg2 X-Received: by 2002:a62:18d4:: with SMTP id 203mr38595156pfy.165.1564430018259; Mon, 29 Jul 2019 12:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430018; cv=none; d=google.com; s=arc-20160816; b=U/vmC7KiFpmSdhkuvzwZaRM66fKCMKzl7Cnr4ZhRQ8HVqVY9Gwozk/Gp5mllqfy/Cq S/tozu72M9cObgfL6inet8xKSjvE1XT6x44calSByrqxO52ayyfwN/24N1l4gvSViHpq 3Nu4E15+up9zLo5OUr/SBiUCrbLrSIYjmer0O9H+i0bO+Nu2IYN6P9pM0ejYdP+owBrC Im6QIRwblrOTyBIi2IfzrigzEuagsvSdMcmbsEpRcfb+XvX4QfQqU79M1i9bGGqK2ilH /RH5I/BbT8Nfmi1W+mf/DY37qos+6gbmZrVBcs+VQBXri65y3SFbEEYpR7b/3s3eknFm qFVw== 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=fukL2AY01q+1KpNB7724tCzkmg7s+nAuZl3CYL6cXOA=; b=bu0GI8l9MDc6RqpK9E6mAiXIAUXkEZJ5CwLqoklznjXpMMBYfmQjEwudSdAw887vcb POCf/SsXnmO9dFIeUt3TVziQGrYqX4gC6h7e1VIt0tKj+5DVw+mAfsBY8zMSPIyROuyv 0L5dZeZcqVCiE+TDOdTk5ULQN7wrl4x3IkW0lb4SPI26fSsQ48XHatp5TrtkjXie7r18 WXiQGPH0N88Eek2v/RLiYfbilg6FSeSk5FOmTZ8of6xw714LEVHOWZU6LIPS/FtsK2QP GHz5dkHoxlKftpne+B3MSsUD7U0kNsBxtlsP/MXu/ek0xMPqH5EWKAjNXNFgSEZ6k9db o/Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=teIp+lS1; 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 o6si27095400pgv.273.2019.07.29.12.53.23; Mon, 29 Jul 2019 12:53: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=teIp+lS1; 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 S2390858AbfG2TwL (ORCPT + 99 others); Mon, 29 Jul 2019 15:52:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:42398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390791AbfG2TvM (ORCPT ); Mon, 29 Jul 2019 15:51:12 -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 97975205F4; Mon, 29 Jul 2019 19:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429872; bh=gTOeOC5VmGuItE7SqR1J06FTqVJudN8LyY0SgeGDW4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=teIp+lS14h/FbBs/iRm/Qt+Sttr6VZT6Y8ztTJpeCnR83phSUNUNSRbnN0hXMcLgM 2wzL4DkXD9iWXAY7CSFqmpr+d+KB6CAdQ2g+FlrFnm+yWVZ1EnDe3ElKGc+jcNrbWb 3WE+pZob7cYoFtt4D+lJ0SsmY1wtlUX9tQB6bH6I= 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 5.2 115/215] PCI: mobiveil: Fix the Class Code field Date: Mon, 29 Jul 2019 21:21:51 +0200 Message-Id: <20190729190758.970953197@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 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