Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2545256imm; Mon, 10 Sep 2018 02:52:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYzjC5n39vroTg+PInnHt1PxrHYNeKzV5vAhwHRx7L9cPLoGI49wdf+GyORv9KvwVlYWSHH X-Received: by 2002:a62:c218:: with SMTP id l24-v6mr22647668pfg.185.1536573156408; Mon, 10 Sep 2018 02:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536573156; cv=none; d=google.com; s=arc-20160816; b=0CdwxYVLn8OXiB8gsi56skyarLKlSjhvTNR3yMa3q6VPieMeArIByflR7xdhUhuVyh +gGWmEhG7dYB95FuwBsa8zWBwPb/iw2RNNCqDUKo3v3v//Xxt6Ibz0HiWCAw97t6j0TA Kg0KH5rCY1WKZuVI50vfG0spxRp2gNSq7mTcsDl3S5NpeNgZyvFqBZYGi2AYpqvHElvt nqvfoBQLxdYeLi1VsRLXZUbXa3G2r64294Mww/avQE/xeYp1dplf4dFQXI4RkmhuGZhd tDNM3OLu098BND0n2NsKPYTMOV4maYXI/zNyx/WabyWJbn2KSurHCesbpeUiUpaw/DFD lQWA== 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; bh=RpNMLZ1xuOZ6lY2CruBO52bxu6xIVD7qzpF+z/ZSBgc=; b=mUPEvG7uALLJaTFvBKnB2GR9mU3BCC/Egq4PeSZVIjt9AdsRmN/OvhPCmdyXmSdEJO BK+GFnijquR5AQ5f8wx324p+cm9G5KwEIubQDB1Lo7liaTV1IE3VfCVfEMutu9rjcBaI F/7ZNhGHa1/CrGJYkADSlgVwDmKXy5ZDzhnZagB6lPenxN2JTp/Ov7RnhvXvFkzT6THz ZG0eBrx2aX6uNOkkFbBtabByqgVedcdI3EhfbMPmgZ7vSESRZzyiNGt408xP0o5i4KT3 59v7iFsrXudIsKJ96mCB6FX6u5D4yjL4bzH/FGDKZ7XoqZA+ikp1WgWFzvy5pzjh51Le Ar6g== 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 j15-v6si15453211pfn.366.2018.09.10.02.52.21; Mon, 10 Sep 2018 02:52:36 -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 S1728216AbeIJOoL (ORCPT + 99 others); Mon, 10 Sep 2018 10:44:11 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:34654 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727635AbeIJOnu (ORCPT ); Mon, 10 Sep 2018 10:43:50 -0400 X-UUID: 45b3f50d2fce4d82b71e89f61226ac97-20180910 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 194794227; Mon, 10 Sep 2018 17:50:29 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 10 Sep 2018 17:50:26 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 10 Sep 2018 17:50:25 +0800 From: To: , , , , , , , , , , , CC: , , , , , , , Subject: [PATCH v4 0/4] PCI: mediatek: fixup find_port, enable_msi and add pm, module support Date: Mon, 10 Sep 2018 17:50:19 +0800 Message-ID: <1536573023-6720-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. Some of 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 Change since v3: - Remove pm_runtime_XXX ops in suspend and resume callbacks in the third patch. - Rebase to 4.19-rc1. Change since v2: - Fix the list_for_each_entry_safe parameter error. - Add Ryder's Acked-by flag. Change since v1: - A bit of code refact of the first patch suggested by Andy Shevchenko, and commit message updated. - Using __maybe_unused. - Remove the redundant list_empty check of the fourth patch. 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 | 284 ++++++++++++++++++++++++--------- 2 files changed, 208 insertions(+), 78 deletions(-) -- 2.6.4