diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-01-15 05:31:54 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 18:09:06 -0400 |
commit | 237036de6540a377268db5bb2b9c8efdccbe51c1 (patch) | |
tree | 81a76206b8b67bb523d6994131faceeb62cf75e1 /arch/mips/pci | |
parent | 0ee958e102b62b418c2fb46c3439d4262067a5fc (diff) |
MIPS: Malta: Make use of generic CM support
Remove the Malta-specific CM probe code and instead make use of the
newly added generic CM code.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6364/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/pci-malta.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/mips/pci/pci-malta.c b/arch/mips/pci/pci-malta.c index f1a73890dd4f..cfbbc3e3e914 100644 --- a/arch/mips/pci/pci-malta.c +++ b/arch/mips/pci/pci-malta.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | 28 | ||
29 | #include <asm/gt64120.h> | 29 | #include <asm/gt64120.h> |
30 | #include <asm/gcmpregs.h> | 30 | #include <asm/mips-cm.h> |
31 | #include <asm/mips-boards/generic.h> | 31 | #include <asm/mips-boards/generic.h> |
32 | #include <asm/mips-boards/bonito64.h> | 32 | #include <asm/mips-boards/bonito64.h> |
33 | #include <asm/mips-boards/msc01_pci.h> | 33 | #include <asm/mips-boards/msc01_pci.h> |
@@ -201,11 +201,11 @@ void __init mips_pcibios_init(void) | |||
201 | msc_mem_resource.start = start & mask; | 201 | msc_mem_resource.start = start & mask; |
202 | msc_mem_resource.end = (start & mask) | ~mask; | 202 | msc_mem_resource.end = (start & mask) | ~mask; |
203 | msc_controller.mem_offset = (start & mask) - (map & mask); | 203 | msc_controller.mem_offset = (start & mask) - (map & mask); |
204 | #ifdef CONFIG_MIPS_CMP | 204 | if (mips_cm_numiocu()) { |
205 | if (gcmp_niocu()) | 205 | write_gcr_reg0_base(start); |
206 | gcmp_setregion(0, start, mask, | 206 | write_gcr_reg0_mask(mask | |
207 | GCMP_GCB_GCMPB_CMDEFTGT_IOCU1); | 207 | CM_GCR_REGn_MASK_CMTGT_IOCU0); |
208 | #endif | 208 | } |
209 | MSC_READ(MSC01_PCI_SC2PIOBASL, start); | 209 | MSC_READ(MSC01_PCI_SC2PIOBASL, start); |
210 | MSC_READ(MSC01_PCI_SC2PIOMSKL, mask); | 210 | MSC_READ(MSC01_PCI_SC2PIOMSKL, mask); |
211 | MSC_READ(MSC01_PCI_SC2PIOMAPL, map); | 211 | MSC_READ(MSC01_PCI_SC2PIOMAPL, map); |
@@ -213,11 +213,11 @@ void __init mips_pcibios_init(void) | |||
213 | msc_io_resource.end = (map & mask) | ~mask; | 213 | msc_io_resource.end = (map & mask) | ~mask; |
214 | msc_controller.io_offset = 0; | 214 | msc_controller.io_offset = 0; |
215 | ioport_resource.end = ~mask; | 215 | ioport_resource.end = ~mask; |
216 | #ifdef CONFIG_MIPS_CMP | 216 | if (mips_cm_numiocu()) { |
217 | if (gcmp_niocu()) | 217 | write_gcr_reg1_base(start); |
218 | gcmp_setregion(1, start, mask, | 218 | write_gcr_reg1_mask(mask | |
219 | GCMP_GCB_GCMPB_CMDEFTGT_IOCU1); | 219 | CM_GCR_REGn_MASK_CMTGT_IOCU0); |
220 | #endif | 220 | } |
221 | /* If ranges overlap I/O takes precedence. */ | 221 | /* If ranges overlap I/O takes precedence. */ |
222 | start = start & mask; | 222 | start = start & mask; |
223 | end = start | ~mask; | 223 | end = start | ~mask; |