mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
53949e0a65
setup_pcimap is used to setup address windows for Loongson-3 built-in PCI-X controller, but this function is never been used in the real world and lack of support in kernel. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: linux-mips@vger.kernel.org Cc: chenhe@lemote.com
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
|
|
* Author: Fuxin Zhang, zhangfx@lemote.com
|
|
*/
|
|
#include <linux/pci.h>
|
|
|
|
#include <pci.h>
|
|
#include <loongson.h>
|
|
#include <boot_param.h>
|
|
|
|
static struct resource loongson_pci_mem_resource = {
|
|
.name = "pci memory space",
|
|
.start = LOONGSON_PCI_MEM_START,
|
|
.end = LOONGSON_PCI_MEM_END,
|
|
.flags = IORESOURCE_MEM,
|
|
};
|
|
|
|
static struct resource loongson_pci_io_resource = {
|
|
.name = "pci io space",
|
|
.start = LOONGSON_PCI_IO_START,
|
|
.end = IO_SPACE_LIMIT,
|
|
.flags = IORESOURCE_IO,
|
|
};
|
|
|
|
static struct pci_controller loongson_pci_controller = {
|
|
.pci_ops = &loongson_pci_ops,
|
|
.io_resource = &loongson_pci_io_resource,
|
|
.mem_resource = &loongson_pci_mem_resource,
|
|
.mem_offset = 0x00000000UL,
|
|
.io_offset = 0x00000000UL,
|
|
};
|
|
|
|
|
|
extern int sbx00_acpi_init(void);
|
|
|
|
static int __init pcibios_init(void)
|
|
{
|
|
|
|
loongson_pci_controller.io_map_base = mips_io_port_base;
|
|
loongson_pci_mem_resource.start = loongson_sysconf.pci_mem_start_addr;
|
|
loongson_pci_mem_resource.end = loongson_sysconf.pci_mem_end_addr;
|
|
|
|
register_pci_controller(&loongson_pci_controller);
|
|
|
|
sbx00_acpi_init();
|
|
|
|
return 0;
|
|
}
|
|
|
|
arch_initcall(pcibios_init);
|