Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3174379ybi; Fri, 5 Jul 2019 03:10:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxxq09/Zbwqbk4rEDn+kro0xtsUYMMdK8vhlZaBrY/X1r2Uk0sWqcoQrQRPB0yTWUYpLeA X-Received: by 2002:a17:902:d891:: with SMTP id b17mr4434714plz.48.1562321401629; Fri, 05 Jul 2019 03:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321401; cv=none; d=google.com; s=arc-20160816; b=VguzgdXTT7B0FIzDleBFSOEA7fjX5XoNrECuNbZkziUjWecbJno9jPUK1qeGHAkpB0 PuBrhCNJtUj1au7FJZ6YbwAxiRa/0kUXW8LeCSmv+irb6Ykgn58JbIVu3r1GIwMWzeth uckTIM9er54yt9nbIpWNzU+iyQ8mxT8gHJTJuxX/hoHelSlaDJFZbMBS8SQFttzYPtUL aOC5ln7EvPKyHRhfqIA4za07Upl/rF9b5p7hpJGp9GQDqNLiZ1Co5OpGrid74nx4jE0P NfAwoobCtkhmq6PQvB3/RORHWGQkfKw7RRKMWGz3rVxEyKun1Z9eDk297oQinlCFSPPg IVeA== 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=UBUIc2ikiY2A5bPPNVBvBy2BGU7cPDVR5lSEHJDH7ho=; b=xvm/WiORbpyZr4TngU5qiO6U+s5iy8K+iO8KuOHs+ORwL2BWsCyttcB3gc9Wq3y7WD Cp3ybmeqJRFDc6/9T0h0iMKiMToJdruRJlLnnlP4OWuwEE0ZwXOLB2Abc3GhqiSHk0T9 3pXwIqBQx9j4jnd5qjrKQz9JHalP+w/l3JejAbob+mBv+PYKCSKgugYsYIG4gviCbRTG B9pmnPBTNtxVKWfBF6rJby8j5kZhc72IYAKBzmWk/YmUcMU1fD33Linc+g8B6TNw14G5 nD8G8AB6WeLKb0w+LLhqQTy37Uy1rV6JuemF14zTbwBjjVga4ETWLbjJ4XboSocUsBqc vY3A== 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 s62si7910177pjc.75.2019.07.05.03.09.46; Fri, 05 Jul 2019 03:10:01 -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 S1728258AbfGEKH3 (ORCPT + 99 others); Fri, 5 Jul 2019 06:07:29 -0400 Received: from inva020.nxp.com ([92.121.34.13]:32836 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbfGEKHX (ORCPT ); Fri, 5 Jul 2019 06:07:23 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A2B271A0EB4; Fri, 5 Jul 2019 12:07:22 +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 244301A0EA4; Fri, 5 Jul 2019 12:07:14 +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 E7D02402C0; Fri, 5 Jul 2019 18:06:59 +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 10/28] PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers Date: Fri, 5 Jul 2019 17:56:38 +0800 Message-Id: <20190705095656.19191-11-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 The reset value of Primary, Secondary and Subordinate bus numbers is zero which is a broken setup. Program a sensible default value for Primary/Secondary/Subordinate bus numbers. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Rebased the patch, no functional change. drivers/pci/controller/pcie-mobiveil.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index cdf15cc..8f56130 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -561,6 +561,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) u32 value, pab_ctrl, type = 0; struct resource_entry *win; + /* setup bus numbers */ + value = csr_readl(pcie, PCI_PRIMARY_BUS); + value &= 0xff000000; + value |= 0x00ff0100; + csr_writel(pcie, value, PCI_PRIMARY_BUS); + /* * program Bus Master Enable Bit in Command Register in PAB Config * Space -- 1.7.1