Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1136440imc; Mon, 11 Mar 2019 07:15:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUKP5GgYQwNKB9kPTGNIwVw81WXGeClKv41EBJwZvVL5juDaVsQkKn+4e1miy3tIL/Xn2U X-Received: by 2002:a63:4e1a:: with SMTP id c26mr29940093pgb.175.1552313709775; Mon, 11 Mar 2019 07:15:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552313709; cv=none; d=google.com; s=arc-20160816; b=BnHJyXEVIrOQm/BBNKpfL63NCof3dXbqTASVr/LZoDenIQ7MQYfsOWB6AIyJYoEFLq 7KnEKGv7tLmicFfHGcjnNMyP5da8qRmF2gyX70wFLJdegWbJBtvi0h0fHuSETnjEV19r Kegl320RJtrm0TzbOQ1f+dnuayu3zM8awi4c5h4wXVxDIJKxctJNe99VDDAAMziW2oOv XQ3oMQwXQiupncFMI8gABwE5Fx1K+OMN8YNxlpm8Gs3IjaEI20zNGhAE+C0dONYJ62Wu 0HwdqG2aiwH8UjbSbC+8uCgjN5tittqbSd9D+03QoUaIFTCHLyNemhxcGyzIozEGqP4V ur9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YGSv3dQEd4TVzGEA/WhSTWCGcdSSmkBNb1aVtF2QuXQ=; b=Nvw9C/jlOxMFOWp7H+md0EZAGQJpf/TZQs4AXZP3YPkQdX+sjWHMwibnppkfReCfwb 5DwZga6RJ2ETIkRSWTjKLIdfR1ZWdJmwN1uz1qh2cl4PmiGyxs8tr8wMGMshXuiGjAYG txH1W9rWi0r6bGo6Zqt1hsPDKqfwKRyxjvhsYVIu81U06KXN2QhZ07cG9fRi0j+kiviv 1Z18L1dTbQEPLm5nws1DBGOnFTM8e0nJeSiO2/caiIiriYAgNL5TI1dOKWx+bFjf3tsA ncar0VPB2dlDmtQFmoNxrvqpE2RvFdT+WW5Fcz/M0U5+FiHXDl8nE8PCwhitK4vdZrr+ yzug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jw3GanCN; 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 l38si4856364pgb.399.2019.03.11.07.14.50; Mon, 11 Mar 2019 07:15:09 -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=jw3GanCN; 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 S1727724AbfCKOOF (ORCPT + 99 others); Mon, 11 Mar 2019 10:14:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:60016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727546AbfCKOOE (ORCPT ); Mon, 11 Mar 2019 10:14:04 -0400 Received: from localhost (50-82-46-41.client.mchsi.com [50.82.46.41]) (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 2011E2075C; Mon, 11 Mar 2019 14:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552313643; bh=DeX8Tnx+/DvUL5y4hqhKMNh6svHiIweAR/X01hBixrg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jw3GanCNRK5zOAUggeNcCLXf2gu+Te/x/v63BGlFcM5iPhC4IOwu7qusrBLF2QC6c 1DPqMPZZERwbkicjMPy/bRFrbGixD/Gd2dybpkFgExHP+dJe2OpkKprEFMiSDcoi/I 9+4BXSxLCO89Wg9J/TK3F7U80s9c2HkASxYTUoyE= Date: Mon, 11 Mar 2019 09:14:02 -0500 From: Bjorn Helgaas To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "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" , Mingkai Hu , "M.h. Lian" , Xiaowei Bao Subject: Re: [PATCHv4 11/28] PCI: mobiveil: only fix up the Class Code field Message-ID: <20190311141401.GG214730@google.com> References: <20190311093130.7209-1-Zhiqiang.Hou@nxp.com> <20190311093130.7209-12-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311093130.7209-12-Zhiqiang.Hou@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 09:31:23AM +0000, Z.q. Hou wrote: > 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. Add parens after function name. Please explain why this change is needed. Does it fix a bug? Does this fix the problem that the PCI core didn't correctly identify the device as a bridge because it identified bridges by class code instead of header type? That problem *should* be fixed by b2fb5cc57469 ("PCI: Rely on config space header type, not class code"), which is now upstream. You might still want this class code change so that lspci shows the correct thing. That's fine, but the changelog should say why we're doing it. > Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge > IP driver") Make this "Fixes:" line a single line again. > 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) { > -- > 2.17.1 >