Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3106619imm; Sun, 7 Oct 2018 20:28:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV63I7B/6+2negtCtTlGJUbykPdYy+TsvRgMg6xBzfsV+Bn3q/pIgODtzkXsJjvcN9qeV879C X-Received: by 2002:a62:b90f:: with SMTP id z15-v6mr22485116pfe.171.1538969287363; Sun, 07 Oct 2018 20:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538969287; cv=none; d=google.com; s=arc-20160816; b=vi+OSreRp05Gs4YJIj/9ueVwehNEseShzrYdwYH1rwXrk/ZKXULA0RyOqwPVZBE3Uc fzW86m8dzmbuWks+wy9Fvb0uBLncilIFPidI6HzFnNVSoFWDSi8bj8WZ7U8QYNZMh+Gy hZoWWYyIhxrr+SgFrnuO5Tr7TM2oYvZsnKIGB9+YcvMdyxROjvLwNr4EEwg7soMI/iVN vVSZr2QhlPlgOm8IMwsi0qYviYKj4NUqNcFCqUQI0AzajoEwD27KN7LAQPPGwMDlSzQt AfXkdb+B7/yB8cQqGYVgRptGCw8vTjYoAQ00PtFVFNX3BNLGbLBUdSVSnF5VPnC1YbWq QJPw== 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=0dXk3e+hC+MQyv/f9DT+PXFBlxqy/HGcVVWk1Kj9MSM=; b=Wt8K/aMB+bCAuSnfZgT5PrC0E8MfQ8GIQiAhbRF+hka6euJhwSUvdpT22cYzSmqFG0 ZkvwgQWHS6RFhKxC7dgra58gZLOc5nTu2jRtMybzdOUd0P3R0bgf+vND9epz7D138Zk1 sl72yOq4vnMRAdc1j4/a3iRYEnKY+ImMJ4/PE1cUKKfVMmn30GFqx1+EVecbGMe0g5Yb PMHw1r7AuqW4Ducj8DWsypwtrVb6E4KjYNiffLa5NavqO7TfSdhlEeOVrcHh9tN2RWTd AlYoriUyZBgMOVeGFT4Tj4AN0Kr1YMuymQ8ene9zvzZ5KPwOULYqMhtGq1eNsn7n0xId jp9w== 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 o33-v6si15701679plb.307.2018.10.07.20.27.52; Sun, 07 Oct 2018 20:28:07 -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 S1727219AbeJHKf1 (ORCPT + 99 others); Mon, 8 Oct 2018 06:35:27 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:3113 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726065AbeJHKem (ORCPT ); Mon, 8 Oct 2018 06:34:42 -0400 X-UUID: 33c433665830414abd9efc77ac58e398-20181008 X-UUID: 33c433665830414abd9efc77ac58e398-20181008 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 934191888; Mon, 08 Oct 2018 11:25:02 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 8 Oct 2018 11:25:00 +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, 8 Oct 2018 11:25:00 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v6 2/9] PCI: mediatek: Fixup class ID for MT7622 as PCI_CLASS_BRIDGE_PCI Date: Mon, 8 Oct 2018 11:24:41 +0800 Message-ID: <1538969088-7136-3-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> References: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CE1C697090A12BDC18CE687870DD7787375CFC91E4D571329D5D943C1CCA09912000: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 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 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