Commit 2b995cf3 authored by Jing Li's avatar Jing Li Committed by guzitao
Browse files

sw64: pci: bypass legacy PCI initialization when ACPI enabled

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IBDJNZ



--------------------------------

To avoid conflicts between legacy PCI initialization and ACPI-PCI
initialization, just bypass legacy PCI initialization when ACPI enabled.

Signed-off-by: default avatarJing Li <jingli@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent ba29c4ce
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
static int __init
pcibios_init(void)
{
	if (acpi_disabled)
		sw64_init_pci();
	return 0;
}
@@ -644,7 +645,6 @@ void __init sw64_init_arch(void)
		char id[8], msg[64];
		int i;

		pr_info("SW arch PCI initialize!\n");
		cpu_num = sw64_chip->get_cpu_num();

		for (node = 0; node < cpu_num; node++) {
@@ -652,6 +652,13 @@ void __init sw64_init_arch(void)
				set_devint_wken(node);
				set_adr_int(node);
			}
		}

		if (!acpi_disabled)
			return;

		pr_info("SW arch PCI initialize!\n");
		for (node = 0; node < cpu_num; node++) {
			rc_enable = sw64_chip_init->pci_init.get_rc_enable(node);
			if (rc_enable == 0) {
				printk("PCIe is disabled on node %ld\n", node);