From patchwork Fri Aug 27 08:20:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6ZmI5Y2O5omN?= X-Patchwork-Id: 1521544 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Gwt2t4ZqMz9sPf for ; Fri, 27 Aug 2021 18:21:10 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244488AbhH0IV5 (ORCPT ); Fri, 27 Aug 2021 04:21:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244497AbhH0IV5 (ORCPT ); Fri, 27 Aug 2021 04:21:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F079C60EB5; Fri, 27 Aug 2021 08:21:06 +0000 (UTC) From: Huacai Chen To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Xuefeng Li , Huacai Chen , Jiaxun Yang , Huacai Chen , Jianmin Lv , Tiezhu Yang Subject: [PATCH V9 0/5] PCI: Loongson pci improvements and quirks Date: Fri, 27 Aug 2021 16:20:26 +0800 Message-Id: <20210827082031.2777623-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org This patchset improves Loongson PCI controller driver and resolves some problems: LS2K/LS7A's PCI config space supports 1/2/4-bytes access, so the first patch use pci_generic_config_read()/pci_generic_config_write() for them; the second patch add ACPI init support which will be used by LoongArch; the third patch improves the mrrs quirk for LS7A chipset; The fourth patch add a new quirk for LS7A chipset to avoid poweroff/reboot failure, and the fifth patch add a new quirk for LS7A chipset to fix the multifunction devices' irq pin mappings. V1 -> V2: 1, Rework the 4th patch; 2, Improve commit messages; 3, Remove the last patch since there is better solutions. V2 -> V3: 1, Add more affected device ids for the 4th patch; 2, Improve commit messages to describe root causes. V3 -> V4: 1, Rework the MRRS quirk patch; 2, Improve commit messages to describe root causes, again. V4 -> V5: 1, Improve the MRRS quirk patch; 2, Change the order of 2nd and 3rd patch; 3, Improve commit messages to describe root causes, again. V5 -> V6: 1, Rework the 1st patch; 2, Adjust the order of the series. V6 -> V7: 1, Use correct pci config access operations; 2, Add ACPI init support for LoongArch; 3, Don't move to quirks.c since the driver has ACPI support; 4, Some other minor improvements. V7 -> V8: 1, Use CFG1 method for LS2K/LS7A pci config. V8 -> V9: 1, Use pci_controller_data for the first patch. Huacai Chen, Tiezhu Yang and Jianmin Lv(5): PCI: loongson: Use correct pci config access operations. PCI: loongson: Add ACPI init support. PCI: Improve the MRRS quirk for LS7A. PCI: Add quirk for LS7A to avoid reboot failure. PCI: Add quirk for multifunction devices of LS7A. Signed-off-by: Huacai Chen Signed-off-by: Jianmin Lv Signed-off-by: Tiezhu Yang --- drivers/acpi/pci_mcfg.c | 13 +++ drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pci-loongson.c | 184 ++++++++++++++++++++++++++-------- drivers/pci/pci.c | 6 ++ drivers/pci/pcie/portdrv_core.c | 6 +- include/linux/pci-ecam.h | 1 + include/linux/pci.h | 2 + 7 files changed, 169 insertions(+), 45 deletions(-) -- 2.27.0