Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3618075imm; Mon, 2 Jul 2018 02:23:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdh0YvLie6gfD0NWxA6xJyuqq5OyvnRNzMSbDjo21RmHchUDV4CSB9NdgaIHP6gvEnCFvPx X-Received: by 2002:a62:1157:: with SMTP id z84-v6mr619116pfi.66.1530523403916; Mon, 02 Jul 2018 02:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530523403; cv=none; d=google.com; s=arc-20160816; b=nKVjs6kgzIUPQeJNYgXvKEGfIByO5R1EMOgUncdQEyUYQqC0XjBGvVK8Ap9Yi73uV6 +4/kFgutR/CCfYAXiRf1Y3ksDkc7zp/TUIcLCUIUpH/aFdVpycSgWZ8uNpHjvCCNDADK 63SfwTe45PdF11Ye+bJXan1TFtzLwvMady7grZuYCblgT8yFg1lrZs8e1OYsCvGdwWvS JzR62aTo8iWjed/Dk9FLYvIO0sGD73/qavDNszvF3fkvReDhnJ0PYQyv8R3pTBniIv3d uYRWNBNVQYuIyYTia+szFLvYDlWZPwmR8a+jwuMZwBjtGeD/MDXfWV4A0MesqmhY3pHt eDkA== 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=3PIsHwvePhwVoXwVT58uPz5HNamXjhHDOpeH9RXiYk4=; b=Br/TyIPjgahmrTRBuwiSdxPT7KDiPcmWVZRHOU3BA63Aepw+Q7jit8C7YL+9QsYI5B k6jHL9P8sW35AJixuvpftZblicoOsz+XhkJk93th/o/xLyvogWyt2YifiuH2VsHArsll sTNdKiPbQ7amkE+966OF2kBAauXsCc9o8kiNyunFdua1BbceO46Z2qx/bxGr/KpeygHz rKP3I1Uj5CmSrLEfUg9XEXAf5Tm9KkC9uIBt8Hir6uIfNMcnk3wYG2nNn9bEph33tguy fKwgPU13n7iDTbJiCZM/01yGCtFx93bp05nJfqr1/rccVFdDpVl9S5RL5SrKAGsIW3Pw 6StQ== 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 s73-v6si14975493pfs.157.2018.07.02.02.23.08; Mon, 02 Jul 2018 02:23:23 -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 S964796AbeGBH6V (ORCPT + 99 others); Mon, 2 Jul 2018 03:58:21 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:39234 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933455AbeGBH6R (ORCPT ); Mon, 2 Jul 2018 03:58:17 -0400 X-UUID: 373d27461cd34a17824d6ca4512c22cf-20180702 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 973608446; Mon, 02 Jul 2018 15:58:13 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 2 Jul 2018 15:58:10 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 2 Jul 2018 15:58:09 +0800 From: To: , , , , , , , , , , , CC: , , , , , Subject: [PATCH v3 0/4] PCI: mediatek: fixup find_port, enable_msi and add pm, module support Date: Mon, 2 Jul 2018 15:57:40 +0800 Message-ID: <1530518264-6125-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 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 | 289 ++++++++++++++++++++++++--------- 2 files changed, 213 insertions(+), 78 deletions(-) -- 2.6.4