Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6136476imm; Wed, 27 Jun 2018 02:52:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCtOfCTulumjkT2MxU3Jobp8jb2hU2FYGJS/TqHDWXlWt5lk/Qe17eVTzg5UEtPi5Wuk33 X-Received: by 2002:a65:60cd:: with SMTP id r13-v6mr4600835pgv.232.1530093142683; Wed, 27 Jun 2018 02:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530093142; cv=none; d=google.com; s=arc-20160816; b=P2eEHqJuSAa1R4bc/uTmhHf8WjmJxNqqHGLEWnjYkoZHsbIxKnhphrLZXVHdqJ3efG 1dlelxBwN+furqTc0iScJ+UcIlhaiZKB68+NsWiEYnh2daV253XfhgpxiMASzm6UYSrv HNFUO1p1NLOZpGcbtJhxppDzMhzuq4vefWN4zXxUpa8ofwp18SwjUXeOlObmTPb24kPW k+YlQM8DYlzXncAhzOvoUFAQNzc8ufEwvOtHxQfpxZHnMJisOq4shbf+hptBg/JpfqvA F1h3rKEqpsOn1epG+KkANiybm0NoI1dw8tocxeT4rQ5bovhoRJf0hnGCbOF1R/3scYtK CmhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=ApIDYyeO0siZsOhlXXtiE3ELYGh60a673BRjc8468mQ=; b=QatkjSldoOvRVglrnCOY4RnGQFg5HQHgLFv0iIqmWxiUBcFbZiJtPNFF8++9sLxxnv r13aJbWZTSabj/CMd1HSgSFOChu2ZHvMZIn0kYwq0+J7Auk7NXRjjaxwlOsjzxggvGrz LLeO4a89EJ9Ri9lQ6pcVCGA0+ehzEHuJB808EVVPsrGf9FKFng31hAeeihWjo+AHAj2y g1m+FgfBG8tbLeVk0yR0/TCA8BBGFMaIWoLUF3HWqs9QRa+oTDF2PFNMZSUHMwyUd9qe Kt71TUFQehdoT55DsGpp8etHD8Tv8pvpjGhKPEVfsRclE1eWahUUkp2VKfuP9GnsxcWh vWyQ== 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 v73-v6si3668480pfi.22.2018.06.27.02.52.04; Wed, 27 Jun 2018 02:52:22 -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 S1753285AbeF0JVw (ORCPT + 99 others); Wed, 27 Jun 2018 05:21:52 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:31688 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752198AbeF0JVt (ORCPT ); Wed, 27 Jun 2018 05:21:49 -0400 X-UUID: 2888ac036c21414d89a8582ed246c0dc-20180627 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1721264859; Wed, 27 Jun 2018 17:21:45 +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.1210.3; Wed, 27 Jun 2018 17:21:42 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 27 Jun 2018 17:21:41 +0800 From: To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH 0/4] PCI: mediatek: fixup find_port, enable_msi and add pm, module support Date: Wed, 27 Jun 2018 17:21:34 +0800 Message-ID: <1530091298-28120-1-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 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 This patchset includes misc patchs: The first patch fixup the mtk_pcie_find_port logical which will cause system could not touch the EP's configuration space which was connected to PCIe slot 1. The second patch fixup the enable msi logical, the operation to enable msi should be after system clock is enabled. The function of mtk_pcie_startup_port_v2's define location is re-arranged to avoid mtk_pcie_enable_msi's forward declaration. And call mtk_pcie_enable_msi in mtk_pcie_startup_port_v2 since the clock was all enabled at that time. The third patch was rebased and refactor of the v4 patch[1], changes are: -Add PM support for MT7622. -Using mtk_pcie_enable_port to re-establish the link when resumed. -Rebase on the previous two patches. The fourth patch add loadable kernel module support. Those patches was already reviewed-by Ryder Lee so I just add the Reviewed-by tags in those patches. [1] https://patchwork.kernel.org/patch/10479079 Honghui Zhang (4): PCI: mediatek: fixup mtk_pcie_find_port logical PCI: mediatek: enable msi after clock enabled PCI: mediatek: Add system pm support for MT2712 and MT7622 PCI: mediatek: Add loadable kernel module support drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pcie-mediatek.c | 291 ++++++++++++++++++++++++--------- 2 files changed, 215 insertions(+), 78 deletions(-) -- 2.6.4