diff options
Diffstat (limited to 'arch/mips/loongson/common/pci.c')
-rw-r--r-- | arch/mips/loongson/common/pci.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/mips/loongson/common/pci.c b/arch/mips/loongson/common/pci.c index a3a4abfb6c9a..31d8c5ecd16c 100644 --- a/arch/mips/loongson/common/pci.c +++ b/arch/mips/loongson/common/pci.c | |||
@@ -27,7 +27,7 @@ static struct resource loongson_pci_io_resource = { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | static struct pci_controller loongson_pci_controller = { | 29 | static struct pci_controller loongson_pci_controller = { |
30 | .pci_ops = &bonito64_pci_ops, | 30 | .pci_ops = &loongson_pci_ops, |
31 | .io_resource = &loongson_pci_io_resource, | 31 | .io_resource = &loongson_pci_io_resource, |
32 | .mem_resource = &loongson_pci_mem_resource, | 32 | .mem_resource = &loongson_pci_mem_resource, |
33 | .mem_offset = 0x00000000UL, | 33 | .mem_offset = 0x00000000UL, |
@@ -44,15 +44,15 @@ static void __init setup_pcimap(void) | |||
44 | * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0 | 44 | * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0 |
45 | * [<2G] [384M,448M] [320M,384M] [0M,64M] | 45 | * [<2G] [384M,448M] [320M,384M] [0M,64M] |
46 | */ | 46 | */ |
47 | BONITO_PCIMAP = BONITO_PCIMAP_PCIMAP_2 | | 47 | LOONGSON_PCIMAP = LOONGSON_PCIMAP_PCIMAP_2 | |
48 | BONITO_PCIMAP_WIN(2, BONITO_PCILO2_BASE) | | 48 | LOONGSON_PCIMAP_WIN(2, LOONGSON_PCILO2_BASE) | |
49 | BONITO_PCIMAP_WIN(1, BONITO_PCILO1_BASE) | | 49 | LOONGSON_PCIMAP_WIN(1, LOONGSON_PCILO1_BASE) | |
50 | BONITO_PCIMAP_WIN(0, 0); | 50 | LOONGSON_PCIMAP_WIN(0, 0); |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M] | 53 | * PCI-DMA to local mapping: [2G,2G+256M] -> [0M,256M] |
54 | */ | 54 | */ |
55 | BONITO_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */ | 55 | LOONGSON_PCIBASE0 = 0x80000000ul; /* base: 2G -> mmap: 0M */ |
56 | /* size: 256M, burst transmission, pre-fetch enable, 64bit */ | 56 | /* size: 256M, burst transmission, pre-fetch enable, 64bit */ |
57 | LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul; | 57 | LOONGSON_PCI_HIT0_SEL_L = 0xc000000cul; |
58 | LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful; | 58 | LOONGSON_PCI_HIT0_SEL_H = 0xfffffffful; |
@@ -67,6 +67,14 @@ static void __init setup_pcimap(void) | |||
67 | /* can not change gnt to break pci transfer when device's gnt not | 67 | /* can not change gnt to break pci transfer when device's gnt not |
68 | deassert for some broken device */ | 68 | deassert for some broken device */ |
69 | LOONGSON_PXARB_CFG = 0x00fe0105ul; | 69 | LOONGSON_PXARB_CFG = 0x00fe0105ul; |
70 | |||
71 | #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG | ||
72 | /* | ||
73 | * set cpu addr window2 to map CPU address space to PCI address space | ||
74 | */ | ||
75 | LOONGSON_ADDRWIN_CPUTOPCI(ADDRWIN_WIN2, LOONGSON_CPU_MEM_SRC, | ||
76 | LOONGSON_PCI_MEM_DST, MMAP_CPUTOPCI_SIZE); | ||
77 | #endif | ||
70 | } | 78 | } |
71 | 79 | ||
72 | static int __init pcibios_init(void) | 80 | static int __init pcibios_init(void) |