diff options
author | Zhang Le <r0bertz@gentoo.org> | 2008-10-27 19:33:24 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-27 12:18:31 -0400 |
commit | 3a63913f607832a2629545467e715a40ec930c32 (patch) | |
tree | e47bfd5e31dc66144244028d5e77e817a68218f0 /arch/mips/lemote | |
parent | 97b0511ce125b0cb95d73b198c1bdbb3cebc4de2 (diff) |
MIPS: lemote/lm2e: Added io_map_base to pci controller
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lemote')
-rw-r--r-- | arch/mips/lemote/lm2e/pci.c | 13 | ||||
-rw-r--r-- | arch/mips/lemote/lm2e/setup.c | 11 |
2 files changed, 13 insertions, 11 deletions
diff --git a/arch/mips/lemote/lm2e/pci.c b/arch/mips/lemote/lm2e/pci.c index c1e41f15cc7e..8be03a8e1ad4 100644 --- a/arch/mips/lemote/lm2e/pci.c +++ b/arch/mips/lemote/lm2e/pci.c | |||
@@ -30,19 +30,20 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <asm/mips-boards/bonito64.h> | 32 | #include <asm/mips-boards/bonito64.h> |
33 | #include <asm/mach-lemote/pci.h> | ||
33 | 34 | ||
34 | extern struct pci_ops bonito64_pci_ops; | 35 | extern struct pci_ops bonito64_pci_ops; |
35 | 36 | ||
36 | static struct resource loongson2e_pci_mem_resource = { | 37 | static struct resource loongson2e_pci_mem_resource = { |
37 | .name = "LOONGSON2E PCI MEM", | 38 | .name = "LOONGSON2E PCI MEM", |
38 | .start = 0x14000000UL, | 39 | .start = LOONGSON2E_PCI_MEM_START, |
39 | .end = 0x1fffffffUL, | 40 | .end = LOONGSON2E_PCI_MEM_END, |
40 | .flags = IORESOURCE_MEM, | 41 | .flags = IORESOURCE_MEM, |
41 | }; | 42 | }; |
42 | 43 | ||
43 | static struct resource loongson2e_pci_io_resource = { | 44 | static struct resource loongson2e_pci_io_resource = { |
44 | .name = "LOONGSON2E PCI IO MEM", | 45 | .name = "LOONGSON2E PCI IO MEM", |
45 | .start = 0x00004000UL, | 46 | .start = LOONGSON2E_PCI_IO_START, |
46 | .end = IO_SPACE_LIMIT, | 47 | .end = IO_SPACE_LIMIT, |
47 | .flags = IORESOURCE_IO, | 48 | .flags = IORESOURCE_IO, |
48 | }; | 49 | }; |
@@ -82,6 +83,12 @@ static void __init ict_pcimap(void) | |||
82 | static int __init pcibios_init(void) | 83 | static int __init pcibios_init(void) |
83 | { | 84 | { |
84 | ict_pcimap(); | 85 | ict_pcimap(); |
86 | |||
87 | loongson2e_pci_controller.io_map_base = | ||
88 | (unsigned long) ioremap(LOONGSON2E_IO_PORT_BASE, | ||
89 | loongson2e_pci_io_resource.end - | ||
90 | loongson2e_pci_io_resource.start + 1); | ||
91 | |||
85 | register_pci_controller(&loongson2e_pci_controller); | 92 | register_pci_controller(&loongson2e_pci_controller); |
86 | 93 | ||
87 | return 0; | 94 | return 0; |
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c index 2cc6745991ab..ebd6ceaef2fd 100644 --- a/arch/mips/lemote/lm2e/setup.c +++ b/arch/mips/lemote/lm2e/setup.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/mc146818-time.h> | 34 | #include <asm/mc146818-time.h> |
35 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/wbflush.h> | 36 | #include <asm/wbflush.h> |
37 | #include <asm/mach-lemote/pci.h> | ||
37 | 38 | ||
38 | #ifdef CONFIG_VT | 39 | #ifdef CONFIG_VT |
39 | #include <linux/console.h> | 40 | #include <linux/console.h> |
@@ -42,12 +43,6 @@ | |||
42 | 43 | ||
43 | extern void mips_reboot_setup(void); | 44 | extern void mips_reboot_setup(void); |
44 | 45 | ||
45 | #ifdef CONFIG_64BIT | ||
46 | #define PTR_PAD(p) ((0xffffffff00000000)|((unsigned long long)(p))) | ||
47 | #else | ||
48 | #define PTR_PAD(p) (p) | ||
49 | #endif | ||
50 | |||
51 | unsigned long cpu_clock_freq; | 46 | unsigned long cpu_clock_freq; |
52 | unsigned long bus_clock; | 47 | unsigned long bus_clock; |
53 | unsigned int memsize; | 48 | unsigned int memsize; |
@@ -80,8 +75,8 @@ static void wbflush_loongson2e(void) | |||
80 | 75 | ||
81 | void __init plat_mem_setup(void) | 76 | void __init plat_mem_setup(void) |
82 | { | 77 | { |
83 | set_io_port_base(PTR_PAD(0xbfd00000)); | 78 | set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE, |
84 | 79 | IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1)); | |
85 | mips_reboot_setup(); | 80 | mips_reboot_setup(); |
86 | 81 | ||
87 | __wbflush = wbflush_loongson2e; | 82 | __wbflush = wbflush_loongson2e; |