Skip to content

Commit 53949e0

Browse files
FlyGoatpaulburton
authored andcommitted
MIPS: Loongson64: Drop setup_pcimap
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 <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: [email protected] Cc: [email protected]
1 parent 574b9a0 commit 53949e0

File tree

1 file changed

+0
-43
lines changed
  • arch/mips/loongson64

1 file changed

+0
-43
lines changed

arch/mips/loongson64/pci.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,54 +31,11 @@ static struct pci_controller loongson_pci_controller = {
3131
.io_offset = 0x00000000UL,
3232
};
3333

34-
static void __init setup_pcimap(void)
35-
{
36-
/*
37-
* local to PCI mapping for CPU accessing PCI space
38-
* CPU address space [256M,448M] is window for accessing pci space
39-
* we set pcimap_lo[0,1,2] to map it to pci space[0M,64M], [320M,448M]
40-
*
41-
* pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0
42-
* [<2G] [384M,448M] [320M,384M] [0M,64M]
43-
*/
44-
LOONGSON_PCIMAP = LOONGSON_PCIMAP_PCIMAP_2 |
45-
LOONGSON_PCIMAP_WIN(2, LOONGSON_PCILO2_BASE) |
46-
LOONGSON_PCIMAP_WIN(1, LOONGSON_PCILO1_BASE) |
47-
LOONGSON_PCIMAP_WIN(0, 0);
48-
49-
/*
50-
* PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M]
51-
*/
52-
LOONGSON_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */
53-
/* size: 256M, burst transmission, pre-fetch enable, 64bit */
54-
LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul;
55-
LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful;
56-
LOONGSON_PCI_HIT1_SEL_L = 0x00000006ul; /* set this BAR as invalid */
57-
LOONGSON_PCI_HIT1_SEL_H = 0x00000000ul;
58-
LOONGSON_PCI_HIT2_SEL_L = 0x00000006ul; /* set this BAR as invalid */
59-
LOONGSON_PCI_HIT2_SEL_H = 0x00000000ul;
60-
61-
/* avoid deadlock of PCI reading/writing lock operation */
62-
LOONGSON_PCI_ISR4C = 0xd2000001ul;
63-
64-
/* can not change gnt to break pci transfer when device's gnt not
65-
deassert for some broken device */
66-
LOONGSON_PXARB_CFG = 0x00fe0105ul;
67-
68-
#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
69-
/*
70-
* set cpu addr window2 to map CPU address space to PCI address space
71-
*/
72-
LOONGSON_ADDRWIN_CPUTOPCI(ADDRWIN_WIN2, LOONGSON_CPU_MEM_SRC,
73-
LOONGSON_PCI_MEM_DST, MMAP_CPUTOPCI_SIZE);
74-
#endif
75-
}
7634

7735
extern int sbx00_acpi_init(void);
7836

7937
static int __init pcibios_init(void)
8038
{
81-
setup_pcimap();
8239

8340
loongson_pci_controller.io_map_base = mips_io_port_base;
8441
loongson_pci_mem_resource.start = loongson_sysconf.pci_mem_start_addr;

0 commit comments

Comments
 (0)