Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp557293imm; Fri, 28 Sep 2018 03:06:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV618qJtJh/Jk7QA/yqjs7So71FHY53cfqXhJcQCNkZ61/82/FehNT2uOcZ82KSoe3EW9XVu9 X-Received: by 2002:a17:902:368:: with SMTP id 95-v6mr15479440pld.305.1538129200172; Fri, 28 Sep 2018 03:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538129200; cv=none; d=google.com; s=arc-20160816; b=S7Fahs/APcuP3o0YUHwzoezIgHqVNjmvm3aebucpczMGsCXIOU+JNFnbULdgsynJAZ IKodVKPvdK9YYsIxQyIem8WYyM+O0cSfZu60j/8ZGlj7Dxrg6OrHx3JUm3i+EmY0ZiQR s7qAfds7hfr/RTRp9uF3YRey10RLxwxbt6B4UMKs9AC0zHOZFvhR400g5r82kQI9pXfI u1FWTqptjTOv/GN1qbFD+4cj0dZKB607aw21XFAulrnBcFwxX6yPIXEkUZzWWKbg9h/R 6mA6tHSKBfUkHIhulPuYkZjVzAE51k76poqOz574cThA06dl+lPxe3xUYGBLJVL+eqJ0 nZrg== 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=Gtth5DqG/KWcyDg8sNoSEVQ4SX6afbQFHwl5DoLeiWA=; b=PqbguDWzzxQL56nkdWv7K9YYLh3Oz2R6bJHfavH8HAGGYk0x3FrIX2BTOEEKDQQXWI HkBbhhp+cEWep09K3TtlmITcfwWyWKigorLel2cqoRkl3OgSt+gngnODBfZveXNF9Lxh RiyJvzSjNK0if6sNNB7OmoJyDv9WFjPBTVaAyNnWcRLX73OyMsWMuT8HYJMKUQCnqqPP XJvw+aw+4ue+GiJm5T2VI7d7Hr4wbWaQgfm4Mp4l34uSwtMBSK/DPDZFFFcSlrfYvcJo QcrVm9H1YDvNZpKC3CuH8uXN4gBbPmqdOiWTn4bLhigNn+jGjgzllo37DU7rc7m7SMGy FYZg== 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 l1-v6si4432517plg.285.2018.09.28.03.06.23; Fri, 28 Sep 2018 03:06:40 -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 S1729453AbeI1Q2h (ORCPT + 99 others); Fri, 28 Sep 2018 12:28:37 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:50918 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729111AbeI1Q1u (ORCPT ); Fri, 28 Sep 2018 12:27:50 -0400 X-UUID: 673399bea8bc4fc2a3495be6e70865d6-20180928 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 304058095; Fri, 28 Sep 2018 18:04:45 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 28 Sep 2018 18:04:44 +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; Fri, 28 Sep 2018 18:04:43 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v5 2/9] PCI: mediatek: Fixup class ID for MT7622 as PCI_CLASS_BRIDGE_PCI Date: Fri, 28 Sep 2018 18:04:33 +0800 Message-ID: <1538129080-8206-3-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> References: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 PCIe controller of MT7622 has TYPE 1 configuration space type, but the HW default class type values is invalid. The commit 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") have set the class ID for MT7622 as PCI_CLASS_BRIDGE_HOST, but it's not workable for MT7622: In __pci_bus_assign_resources, the framework only setup bridge's resource window only if class type is PCI_CLASS_BRIDGE_PCI. Or it will leave the subordinary PCIe device's MMIO window un-touched. Fixup the class type to PCI_CLASS_BRIDGE_PCI as most of the controller driver do. 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 264e03f..3ab80d6 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -436,7 +436,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