summaryrefslogtreecommitdiffstats
path: root/arch/mips/lemote
diff options
context:
space:
mode:
authorZhang Le <r0bertz@gentoo.org>2008-10-27 23:33:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2008-10-27 16:18:31 +0000
commit3a63913f607832a2629545467e715a40ec930c32 (patch)
treee47bfd5e31dc66144244028d5e77e817a68218f0 /arch/mips/lemote
parent97b0511ce125b0cb95d73b198c1bdbb3cebc4de2 (diff)
downloadblackbird-op-linux-3a63913f607832a2629545467e715a40ec930c32.tar.gz
blackbird-op-linux-3a63913f607832a2629545467e715a40ec930c32.zip
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.c13
-rw-r--r--arch/mips/lemote/lm2e/setup.c11
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 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/mips-boards/bonito64.h>
+#include <asm/mach-lemote/pci.h>
extern struct pci_ops bonito64_pci_ops;
static struct resource loongson2e_pci_mem_resource = {
.name = "LOONGSON2E PCI MEM",
- .start = 0x14000000UL,
- .end = 0x1fffffffUL,
+ .start = LOONGSON2E_PCI_MEM_START,
+ .end = LOONGSON2E_PCI_MEM_END,
.flags = IORESOURCE_MEM,
};
static struct resource loongson2e_pci_io_resource = {
.name = "LOONGSON2E PCI IO MEM",
- .start = 0x00004000UL,
+ .start = LOONGSON2E_PCI_IO_START,
.end = IO_SPACE_LIMIT,
.flags = IORESOURCE_IO,
};
@@ -82,6 +83,12 @@ static void __init ict_pcimap(void)
static int __init pcibios_init(void)
{
ict_pcimap();
+
+ loongson2e_pci_controller.io_map_base =
+ (unsigned long) ioremap(LOONGSON2E_IO_PORT_BASE,
+ loongson2e_pci_io_resource.end -
+ loongson2e_pci_io_resource.start + 1);
+
register_pci_controller(&loongson2e_pci_controller);
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 @@
#include <asm/mc146818-time.h>
#include <asm/time.h>
#include <asm/wbflush.h>
+#include <asm/mach-lemote/pci.h>
#ifdef CONFIG_VT
#include <linux/console.h>
@@ -42,12 +43,6 @@
extern void mips_reboot_setup(void);
-#ifdef CONFIG_64BIT
-#define PTR_PAD(p) ((0xffffffff00000000)|((unsigned long long)(p)))
-#else
-#define PTR_PAD(p) (p)
-#endif
-
unsigned long cpu_clock_freq;
unsigned long bus_clock;
unsigned int memsize;
@@ -80,8 +75,8 @@ static void wbflush_loongson2e(void)
void __init plat_mem_setup(void)
{
- set_io_port_base(PTR_PAD(0xbfd00000));
-
+ set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE,
+ IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1));
mips_reboot_setup();
__wbflush = wbflush_loongson2e;
OpenPOWER on IntegriCloud