aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/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/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/loongson')
-rw-r--r--arch/mips/loongson/common/init.c2
-rw-r--r--arch/mips/loongson/common/mem.c8
-rw-r--r--arch/mips/loongson/common/pci.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c
index 743d3571f010..2b92a23d29dd 100644
--- a/arch/mips/loongson/common/init.c
+++ b/arch/mips/loongson/common/init.c
@@ -21,7 +21,7 @@ void __init prom_init(void)
21 set_io_port_base((unsigned long) 21 set_io_port_base((unsigned long)
22 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE)); 22 ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
23 23
24#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT) 24#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
25 _loongson_addrwincfg_base = (unsigned long) 25 _loongson_addrwincfg_base = (unsigned long)
26 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE); 26 ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
27#endif 27#endif
diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c
index e93551dbc9ea..981e9190f393 100644
--- a/arch/mips/loongson/common/mem.c
+++ b/arch/mips/loongson/common/mem.c
@@ -20,8 +20,7 @@ void __init prom_init_memory(void)
20 20
21 add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize << 21 add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize <<
22 20), BOOT_MEM_RESERVED); 22 20), BOOT_MEM_RESERVED);
23#ifdef CONFIG_64BIT 23#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
24#ifdef CONFIG_CPU_LOONGSON2F
25 { 24 {
26 int bit; 25 int bit;
27 26
@@ -36,8 +35,9 @@ void __init prom_init_memory(void)
36 0x80000000ul, (1 << bit)); 35 0x80000000ul, (1 << bit));
37 mmiowb(); 36 mmiowb();
38 } 37 }
39#endif /* CONFIG_CPU_LOONGSON2F */ 38#endif /* !CONFIG_CPU_SUPPORTS_ADDRWINCFG */
40 39
40#ifdef CONFIG_64BIT
41 if (highmemsize > 0) 41 if (highmemsize > 0)
42 add_memory_region(LOONGSON_HIGHMEM_START, 42 add_memory_region(LOONGSON_HIGHMEM_START,
43 highmemsize << 20, BOOT_MEM_RAM); 43 highmemsize << 20, BOOT_MEM_RAM);
@@ -45,7 +45,7 @@ void __init prom_init_memory(void)
45 add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START - 45 add_memory_region(LOONGSON_PCI_MEM_END + 1, LOONGSON_HIGHMEM_START -
46 LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED); 46 LOONGSON_PCI_MEM_END - 1, BOOT_MEM_RESERVED);
47 47
48#endif /* CONFIG_64BIT */ 48#endif /* !CONFIG_64BIT */
49} 49}
50 50
51/* override of arch/mips/mm/cache.c: __uncached_access */ 51/* override of arch/mips/mm/cache.c: __uncached_access */
diff --git a/arch/mips/loongson/common/pci.c b/arch/mips/loongson/common/pci.c
index eac43b8f695e..31d8c5ecd16c 100644
--- a/arch/mips/loongson/common/pci.c
+++ b/arch/mips/loongson/common/pci.c
@@ -68,7 +68,7 @@ static void __init setup_pcimap(void)
68 deassert for some broken device */ 68 deassert for some broken device */
69 LOONGSON_PXARB_CFG = 0x00fe0105ul; 69 LOONGSON_PXARB_CFG = 0x00fe0105ul;
70 70
71#if defined(CONFIG_CPU_LOONGSON2F) && defined(CONFIG_64BIT) 71#ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
72 /* 72 /*
73 * set cpu addr window2 to map CPU address space to PCI address space 73 * set cpu addr window2 to map CPU address space to PCI address space
74 */ 74 */