aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-loongson
diff options
context:
space:
mode:
authorWu Zhangjin <wuzhangjin@gmail.com>2009-11-11 00:39:12 -0500
committerRalf Baechle <ralf@linux-mips.org>2009-12-16 20:57:15 -0500
commit55045ff5557bc804752e84dca5d1b1f1d4bb4e31 (patch)
tree981f6201429b833afb801079aa6abf5e72dc4349 /arch/mips/include/asm/mach-loongson
parent6e34358ed4f89556b5474ff883ac148750189ef0 (diff)
MIPS: Loongson 2F: Cleanup the #if clauses
This patch adds two new kernel options: CPU_SUPPORTS_CPUFREQ and CPU_SUPPORTS_ADDRWINCFG to describe the new features of Loongons 2F and replaces the several ugly #if clauses by them. These two options will be utilized by the future loongson revisions and related drivers such as the coming Loongson 2F CPUFreq driver. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Cc: Wu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mach-loongson')
-rw-r--r--arch/mips/include/asm/mach-loongson/loongson.h6
-rw-r--r--arch/mips/include/asm/mach-loongson/pci.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h
index 99113902719a..9bccdb5d4b51 100644
--- a/arch/mips/include/asm/mach-loongson/loongson.h
+++ b/arch/mips/include/asm/mach-loongson/loongson.h
@@ -227,7 +227,7 @@ extern void mach_irq_dispatch(unsigned int pending);
227 ((((ADDR)>>26) & LOONGSON_PCIMAP_PCIMAP_LO0) << ((WIN)*6)) 227 ((((ADDR)>>26) & LOONGSON_PCIMAP_PCIMAP_LO0) << ((WIN)*6))
228 228
229/* Chip Config */ 229/* Chip Config */
230#ifdef CONFIG_CPU_LOONGSON2F 230#ifdef CONFIG_CPU_SUPPORTS_CPUFREQ
231#define LOONGSON_CHIPCFG0 LOONGSON_REG(LOONGSON_REGBASE + 0x80) 231#define LOONGSON_CHIPCFG0 LOONGSON_REG(LOONGSON_REGBASE + 0x80)
232#endif 232#endif
233 233
@@ -236,7 +236,7 @@ extern void mach_irq_dispatch(unsigned int pending);
236 * 236 *
237 * loongson2e do not have this module 237 * loongson2e do not have this module
238 */ 238 */
239#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT) 239#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
240 240
241/* address window config module base address */ 241/* address window config module base address */
242#define LOONGSON_ADDRWINCFG_BASE 0x3ff00000ul 242#define LOONGSON_ADDRWINCFG_BASE 0x3ff00000ul
@@ -306,6 +306,6 @@ extern unsigned long _loongson_addrwincfg_base;
306#define LOONGSON_ADDRWIN_PCITODDR(win, src, dst, size) \ 306#define LOONGSON_ADDRWIN_PCITODDR(win, src, dst, size) \
307 LOONGSON_ADDRWIN_CFG(PCIDMA, DDR, win, src, dst, size) 307 LOONGSON_ADDRWIN_CFG(PCIDMA, DDR, win, src, dst, size)
308 308
309#endif /* ! CONFIG_CPU_LOONGSON2F && CONFIG_64BIT */ 309#endif /* ! CONFIG_CPU_SUPPORTS_ADDRWINCFG */
310 310
311#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */ 311#endif /* __ASM_MACH_LOONGSON_LOONGSON_H */
diff --git a/arch/mips/include/asm/mach-loongson/pci.h b/arch/mips/include/asm/mach-loongson/pci.h
index 31ba90891ec0..a199a4f6de4e 100644
--- a/arch/mips/include/asm/mach-loongson/pci.h
+++ b/arch/mips/include/asm/mach-loongson/pci.h
@@ -28,7 +28,7 @@ extern struct pci_ops loongson_pci_ops;
28/* this is an offset from mips_io_port_base */ 28/* this is an offset from mips_io_port_base */
29#define LOONGSON_PCI_IO_START 0x00004000UL 29#define LOONGSON_PCI_IO_START 0x00004000UL
30 30
31#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT) 31#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
32 32
33/* 33/*
34 * we use address window2 to map cpu address space to pci space 34 * we use address window2 to map cpu address space to pci space
@@ -56,6 +56,6 @@ extern struct pci_ops loongson_pci_ops;
56/* this is an offset from mips_io_port_base */ 56/* this is an offset from mips_io_port_base */
57#define LOONGSON_PCI_IO_START 0x00004000UL 57#define LOONGSON_PCI_IO_START 0x00004000UL
58 58
59#endif /* !(defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT))*/ 59#endif /* !CONFIG_CPU_SUPPORTS_ADDRWINCFG */
60 60
61#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */ 61#endif /* !__ASM_MACH_LOONGSON_PCI_H_ */