Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3525261imm; Sun, 14 Oct 2018 22:47:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV608FxoyKoAXyVs5sGOr2eIz6AOYPCSlCsXUpCnnGuhoTF3VH4lWM3b0+eFeitBDl7161mks X-Received: by 2002:a63:2441:: with SMTP id k62-v6mr15097065pgk.26.1539582450821; Sun, 14 Oct 2018 22:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539582450; cv=none; d=google.com; s=arc-20160816; b=QzYfadPkRIUPNDEtBrvmF2Q8nySQpj+fT5LfAupJIKyceQNnuSA6Jlnti6kfOkj984 PUn6HE3w51kM0RpEyrCjnnBSkLFhIK8avuc3Bn4NxtcqPOw+a8Lz7rDP4ncmzNza4pTo ViXfr1NjgXuWAoXl0FDADO9aSjxzbLdUyS/Xim1QxvgcPut+dBHjxoMJj2UW/dhKHXsV Yo4IvNOCKismSWMLSodDboiwlXJMQEXNyYh9j0OoXRRk5J40GgNTXjnlm1tgvSxtpjzv REv8q5JENoeTRUJ6Ebduw9H3FT1DAX2npD7X221IrqIaB2d8ihL0Tl6E6IScyN2ZoRTn QOag== 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=l9bJqqKziDjMxsZONu0vh0DERsRm5sjtOZfaqPaODcw=; b=Ji3RF+GjGDk+ZWJgPdU7wjGCpDp0l30a2u2FV6oJ7Pf1YZXsPf/GKUt32p4kv2udrl yoexsSxM/DThXzwYGU5NKSQbD10zvIASate81Cou7I8R2+BbADgt/cn0wlcFIT7e2g7e u+k0HVzt428dLIEmpzO5rc2PFMDUcJVWyrP6J9wEV4ksbK2QThIyOPcUBamATAq9hKUp mqXCc03MQUcY3240nUOaBhtluF66KYDPk2VVqpB06IT+j/GRIRMBx/xSJzy5/fUekkFd 2Oe3hJRQgG8v65YAZZlfu3ci3Jqzv63QQX8AZJBLxoeTDO/CHiaHIdXEM+EmuxyfmIx+ mDJA== 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 v13-v6si9603083pgi.92.2018.10.14.22.47.16; Sun, 14 Oct 2018 22:47:30 -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 S1726598AbeJON2n (ORCPT + 99 others); Mon, 15 Oct 2018 09:28:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:34098 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726098AbeJON2m (ORCPT ); Mon, 15 Oct 2018 09:28:42 -0400 X-UUID: 8f4c69b7527343c9a4a213854fe68d24-20181015 X-UUID: 8f4c69b7527343c9a4a213854fe68d24-20181015 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 667844826; Mon, 15 Oct 2018 13:44:53 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 15 Oct 2018 13:44:51 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 15 Oct 2018 13:44:50 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v7 2/9] PCI: mediatek: Fix class type for MT7622 as PCI_CLASS_BRIDGE_PCI Date: Mon, 15 Oct 2018 13:44:40 +0800 Message-ID: <1539582287-9171-3-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> References: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: B4B361F3B013D77587189E47996C243E9B52A8380CF4B87104C662071EF591722000: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. Signed-off-by: Honghui Zhang --- 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