Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3630473imm; Mon, 15 Oct 2018 01:10:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV60egi7cKCaxjmmhTcVyR9t/5BXrDBFvnrRKAkYC8K0ozS78WreCSQB727i5GTY3ye/+ROZh X-Received: by 2002:a63:2bc5:: with SMTP id r188-v6mr15018150pgr.160.1539591031635; Mon, 15 Oct 2018 01:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539591031; cv=none; d=google.com; s=arc-20160816; b=X/vqs3mgJAQpTjpz5A8oYqHcJ48eleMQtehWvbBpgTMFyLkw8rNdGUHs3qCdCSqoRw CqjNCUY7nc6zhKombu3SuYxx4+qSTlnKpU7XNpNsRvivFBUC78pxGWJ/oyNbtYyc6xYX IjOq1kw2I56yrb06JTK+9yeu424GMAGX36o2mZslaVdizTZ8C0v9G7fbaYyiEaCAPP+N CF+J2TcJU/kmc/Dc3uRlsTV5dqDb35z7/f5Ngx8BS1qNaSbt3i1Iqaez4pRMx5m+eG2O 8lzlKrazVQ7zT+Fqb2HGK+/bIPW2kgQztLI78kjwAJjh62y6ct+rQTNVfTKLH7Rphzpx 0ZpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=4qsqtkQ5pAevBnGDdd++YmtGtwce//wdkfHR30YVJug=; b=SKwIKziRVOZFqc8pOsZFDGCrJx2dt+N2NnGCPCpTebKdKQTQALrRcitFUe8/NfUcAt 5woIfEBEq1UQOH5ioj7NL4cUCI0M3KKpOQDaUzui82BscS00/soSvm/v4FCtgfDQN1gs ho9Xm7wOpXG+yew61bc63KEM/ZACqCN23V0DZm+YsaAKnvFQScLWqqIUSrX7IuQ4KFYL 0aueAWjMrgUIBvCmOjmcAi5X0CWnurrcDukFGF6fifuLtfpx4C4WPz6zF60oyut+P7G3 RtBa4cDK1A7WQWm+QoxU3tbgMSof7tLt03tr9TTfbEeH9G4Uzl7Cfve8aiNxfA6jJb5v 9yEw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10-v6si9181069pgv.487.2018.10.15.01.10.16; Mon, 15 Oct 2018 01:10:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbeJOPxb (ORCPT + 99 others); Mon, 15 Oct 2018 11:53:31 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:5739 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726541AbeJOPx3 (ORCPT ); Mon, 15 Oct 2018 11:53:29 -0400 X-UUID: eb559fd023654af18dd01ec0cff9cea7-20181015 X-UUID: eb559fd023654af18dd01ec0cff9cea7-20181015 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2098282582; Mon, 15 Oct 2018 16:09:12 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 15 Oct 2018 16:09:04 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 15 Oct 2018 16:09:03 +0800 From: To: , , , , , , CC: , , , , , , , , , , Subject: [PATCH v8 2/9] PCI: mediatek: Fix class type for MT7622 as PCI_CLASS_BRIDGE_PCI Date: Mon, 15 Oct 2018 16:08:53 +0800 Message-ID: <1539590940-13355-3-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539590940-13355-1-git-send-email-honghui.zhang@mediatek.com> References: <1539590940-13355-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 728839C9B44E609B6062AB040177C67E0A3995E05C615B527F71B1440D4657B62000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Honghui Zhang The commit 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") have set the class type for MT7622 as un-properly value of PCI_CLASS_BRIDGE_HOST. The PCIe controller of MT7622 is complexed with Root Port and PCI-to-PCI bridge, the bridge has type 1 configuration space header and related bridge windows. The HW default value of this bridge's class type is invalid. Fix its class type as PCI_CLASS_BRIDGE_PCI since it is HW defines. Making the bridge visiable to PCI framework by setting its class type properly will get its bridge windows configurated during PCI device enumerate. Fixes: 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") Signed-off-by: Honghui Zhang Acked-by: Ryder Lee --- drivers/pci/controller/pcie-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index 288b8e2..bcdac9b 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -432,7 +432,7 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port) val = PCI_VENDOR_ID_MEDIATEK; writew(val, port->base + PCIE_CONF_VEND_ID); - val = PCI_CLASS_BRIDGE_HOST; + val = PCI_CLASS_BRIDGE_PCI; writew(val, port->base + PCIE_CONF_CLASS_ID); } -- 2.6.4