diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2009-07-02 11:26:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-17 14:07:47 -0400 |
commit | 8e4971175acc910eb4258df82a6bd8f2c4e4e5b5 (patch) | |
tree | 921d53308d0a8a8e9119ec6b262a01fe0ccd1fd5 | |
parent | 67b35e5d01aba7a83f2161b0c90acb08afa01e3e (diff) |
MIPS: Loongson: Change naming methods
To make source code of loongson sharable to the machines(such as gdium)
made by the other companies, we rename arch/mips/lemote to
arch/mips/loongson, asm/mach-lemote to asm/mach-loongson, and rename lm2e
to the name of the machine: fuloong-2e. accordingly, FULONG are renamed to
FULOONG2E to make it distinguishable to the future FULOONG2F. and also,
some other relative tuning is needed.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Kconfig | 8 | ||||
-rw-r--r-- | arch/mips/Makefile | 8 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h (renamed from arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h) | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/dma-coherence.h (renamed from arch/mips/include/asm/mach-lemote/dma-coherence.h) | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/loongson.h (renamed from arch/mips/include/asm/mach-lemote/loongson.h) | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/mc146818rtc.h (renamed from arch/mips/include/asm/mach-lemote/mc146818rtc.h) | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/pci.h (renamed from arch/mips/include/asm/mach-lemote/pci.h) | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-loongson/war.h (renamed from arch/mips/include/asm/mach-lemote/war.h) | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/mips-boards/bonito64.h | 2 | ||||
-rw-r--r-- | arch/mips/lemote/lm2e/setup.c | 58 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/Makefile (renamed from arch/mips/lemote/lm2e/Makefile) | 2 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/bonito-irq.c (renamed from arch/mips/lemote/lm2e/bonito-irq.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/cmdline.c (renamed from arch/mips/lemote/lm2e/cmdline.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/early_printk.c (renamed from arch/mips/lemote/lm2e/early_printk.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/env.c (renamed from arch/mips/lemote/lm2e/env.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/init.c (renamed from arch/mips/lemote/lm2e/init.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/irq.c (renamed from arch/mips/lemote/lm2e/irq.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/machtype.c (renamed from arch/mips/lemote/lm2e/machtype.c) | 2 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/mem.c (renamed from arch/mips/lemote/lm2e/mem.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/pci.c (renamed from arch/mips/lemote/lm2e/pci.c) | 0 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/reset.c | 44 | ||||
-rw-r--r-- | arch/mips/loongson/fuloong-2e/time.c (renamed from arch/mips/lemote/lm2e/time.c) | 0 | ||||
-rw-r--r-- | arch/mips/pci/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/pci/fixup-fuloong2e.c (renamed from arch/mips/pci/fixup-lm2e.c) | 0 | ||||
-rw-r--r-- | arch/mips/pci/ops-bonito64.c | 4 |
25 files changed, 73 insertions, 90 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index a383dac81018..3414e2301824 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -6,7 +6,7 @@ config MIPS | |||
6 | select HAVE_ARCH_KGDB | 6 | select HAVE_ARCH_KGDB |
7 | # Horrible source of confusion. Die, die, die ... | 7 | # Horrible source of confusion. Die, die, die ... |
8 | select EMBEDDED | 8 | select EMBEDDED |
9 | select RTC_LIB if !LEMOTE_FULONG | 9 | select RTC_LIB if !LEMOTE_FULOONG2E |
10 | 10 | ||
11 | mainmenu "Linux/MIPS Kernel Configuration" | 11 | mainmenu "Linux/MIPS Kernel Configuration" |
12 | 12 | ||
@@ -174,8 +174,8 @@ config LASAT | |||
174 | select SYS_SUPPORTS_64BIT_KERNEL if BROKEN | 174 | select SYS_SUPPORTS_64BIT_KERNEL if BROKEN |
175 | select SYS_SUPPORTS_LITTLE_ENDIAN | 175 | select SYS_SUPPORTS_LITTLE_ENDIAN |
176 | 176 | ||
177 | config LEMOTE_FULONG | 177 | config LEMOTE_FULOONG2E |
178 | bool "Lemote Fulong mini-PC" | 178 | bool "Lemote Fuloong2e mini-PC" |
179 | select ARCH_SPARSEMEM_ENABLE | 179 | select ARCH_SPARSEMEM_ENABLE |
180 | select CEVT_R4K | 180 | select CEVT_R4K |
181 | select CSRC_R4K | 181 | select CSRC_R4K |
@@ -196,7 +196,7 @@ config LEMOTE_FULONG | |||
196 | select GENERIC_ISA_DMA_SUPPORT_BROKEN | 196 | select GENERIC_ISA_DMA_SUPPORT_BROKEN |
197 | select CPU_HAS_WB | 197 | select CPU_HAS_WB |
198 | help | 198 | help |
199 | Lemote Fulong mini-PC board based on the Chinese Loongson-2E CPU and | 199 | Lemote Fuloong2e mini-PC board based on the Chinese Loongson-2E CPU and |
200 | an FPGA northbridge | 200 | an FPGA northbridge |
201 | 201 | ||
202 | config MIPS_MALTA | 202 | config MIPS_MALTA |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 861da514a468..7754cbbbf4ed 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -314,11 +314,11 @@ cflags-$(CONFIG_WR_PPMC) += -I$(srctree)/arch/mips/include/asm/mach-wrppmc | |||
314 | load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 | 314 | load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 |
315 | 315 | ||
316 | # | 316 | # |
317 | # lemote fulong mini-PC board | 317 | # lemote fuloong2e mini-PC board |
318 | # | 318 | # |
319 | core-$(CONFIG_LEMOTE_FULONG) +=arch/mips/lemote/lm2e/ | 319 | core-$(CONFIG_LEMOTE_FULOONG2E) +=arch/mips/loongson/fuloong-2e/ |
320 | load-$(CONFIG_LEMOTE_FULONG) +=0xffffffff80100000 | 320 | load-$(CONFIG_LEMOTE_FULOONG2E) +=0xffffffff80100000 |
321 | cflags-$(CONFIG_LEMOTE_FULONG) += -I$(srctree)/arch/mips/include/asm/mach-lemote | 321 | cflags-$(CONFIG_LEMOTE_FULOONG2E) += -I$(srctree)/arch/mips/include/asm/mach-loongson/ |
322 | 322 | ||
323 | # | 323 | # |
324 | # MIPS Malta board | 324 | # MIPS Malta board |
diff --git a/arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h index 550a10dc9dba..ce5b6e270e3f 100644 --- a/arch/mips/include/asm/mach-lemote/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h | |||
@@ -13,8 +13,8 @@ | |||
13 | * loongson2f user manual. | 13 | * loongson2f user manual. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H | 16 | #ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H |
17 | #define __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H | 17 | #define __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H |
18 | 18 | ||
19 | #define cpu_dcache_line_size() 32 | 19 | #define cpu_dcache_line_size() 32 |
20 | #define cpu_icache_line_size() 32 | 20 | #define cpu_icache_line_size() 32 |
@@ -56,4 +56,4 @@ | |||
56 | #define cpu_has_watch 1 | 56 | #define cpu_has_watch 1 |
57 | #define cpu_icache_snoops_remote_store 1 | 57 | #define cpu_icache_snoops_remote_store 1 |
58 | 58 | ||
59 | #endif /* __ASM_MACH_LEMOTE_CPU_FEATURE_OVERRIDES_H */ | 59 | #endif /* __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H */ |
diff --git a/arch/mips/include/asm/mach-lemote/dma-coherence.h b/arch/mips/include/asm/mach-loongson/dma-coherence.h index c8de5e750777..71a6851ba833 100644 --- a/arch/mips/include/asm/mach-lemote/dma-coherence.h +++ b/arch/mips/include/asm/mach-loongson/dma-coherence.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Author: Fuxin Zhang, zhangfx@lemote.com | 8 | * Author: Fuxin Zhang, zhangfx@lemote.com |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #ifndef __ASM_MACH_LEMOTE_DMA_COHERENCE_H | 11 | #ifndef __ASM_MACH_LOONGSON_DMA_COHERENCE_H |
12 | #define __ASM_MACH_LEMOTE_DMA_COHERENCE_H | 12 | #define __ASM_MACH_LOONGSON_DMA_COHERENCE_H |
13 | 13 | ||
14 | struct device; | 14 | struct device; |
15 | 15 | ||
@@ -65,4 +65,4 @@ static inline int plat_device_is_coherent(struct device *dev) | |||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | #endif /* __ASM_MACH_LEMOTE_DMA_COHERENCE_H */ | 68 | #endif /* __ASM_MACH_LOONGSON_DMA_COHERENCE_H */ |
diff --git a/arch/mips/include/asm/mach-lemote/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h index 95ee4c8f2d56..e9f74dee24ef 100644 --- a/arch/mips/include/asm/mach-lemote/loongson.h +++ b/arch/mips/include/asm/mach-loongson/loongson.h | |||
@@ -21,9 +21,6 @@ | |||
21 | /* loongson internal northbridge initialization */ | 21 | /* loongson internal northbridge initialization */ |
22 | extern void bonito_irq_init(void); | 22 | extern void bonito_irq_init(void); |
23 | 23 | ||
24 | /* loongson-based machines specific reboot setup */ | ||
25 | extern void mips_reboot_setup(void); | ||
26 | |||
27 | /* environment arguments from bootloader */ | 24 | /* environment arguments from bootloader */ |
28 | extern unsigned long bus_clock, cpu_clock_freq; | 25 | extern unsigned long bus_clock, cpu_clock_freq; |
29 | extern unsigned long memsize, highmemsize; | 26 | extern unsigned long memsize, highmemsize; |
diff --git a/arch/mips/include/asm/mach-lemote/mc146818rtc.h b/arch/mips/include/asm/mach-loongson/mc146818rtc.h index ed5147e11085..ed7fe978335a 100644 --- a/arch/mips/include/asm/mach-lemote/mc146818rtc.h +++ b/arch/mips/include/asm/mach-loongson/mc146818rtc.h | |||
@@ -7,8 +7,8 @@ | |||
7 | * | 7 | * |
8 | * RTC routines for PC style attached Dallas chip. | 8 | * RTC routines for PC style attached Dallas chip. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_MACH_LEMOTE_MC146818RTC_H | 10 | #ifndef __ASM_MACH_LOONGSON_MC146818RTC_H |
11 | #define __ASM_MACH_LEMOTE_MC146818RTC_H | 11 | #define __ASM_MACH_LOONGSON_MC146818RTC_H |
12 | 12 | ||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | 14 | ||
@@ -33,4 +33,4 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | 33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #endif /* __ASM_MACH_LEMOTE_MC146818RTC_H */ | 36 | #endif /* __ASM_MACH_LOONGSON_MC146818RTC_H */ |
diff --git a/arch/mips/include/asm/mach-lemote/pci.h b/arch/mips/include/asm/mach-loongson/pci.h index 3e6b1300afb6..e229b2904cc9 100644 --- a/arch/mips/include/asm/mach-lemote/pci.h +++ b/arch/mips/include/asm/mach-loongson/pci.h | |||
@@ -19,8 +19,8 @@ | |||
19 | * 02139, USA. | 19 | * 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef __ASM_MACH_LEMOTE_PCI_H_ | 22 | #ifndef __ASM_MACH_LOONGSON_PCI_H_ |
23 | #define __ASM_MACH_LEMOTE_PCI_H_ | 23 | #define __ASM_MACH_LOONGSON_PCI_H_ |
24 | 24 | ||
25 | extern struct pci_ops bonito64_pci_ops; | 25 | extern struct pci_ops bonito64_pci_ops; |
26 | 26 | ||
@@ -28,4 +28,4 @@ extern struct pci_ops bonito64_pci_ops; | |||
28 | #define LOONGSON2E_PCI_MEM_END (BONITO_PCILO1_BASE + 0x04000000 * 2) | 28 | #define LOONGSON2E_PCI_MEM_END (BONITO_PCILO1_BASE + 0x04000000 * 2) |
29 | #define LOONGSON2E_PCI_IO_START 0x00004000UL | 29 | #define LOONGSON2E_PCI_IO_START 0x00004000UL |
30 | 30 | ||
31 | #endif /* !__ASM_MACH_LEMOTE_PCI_H_ */ | 31 | #endif /* !__ASM_MACH_LOONGSON_PCI_H_ */ |
diff --git a/arch/mips/include/asm/mach-lemote/war.h b/arch/mips/include/asm/mach-loongson/war.h index 05f89e0f2a11..4b971c3ffd8d 100644 --- a/arch/mips/include/asm/mach-lemote/war.h +++ b/arch/mips/include/asm/mach-loongson/war.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> | 6 | * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MIPS_MACH_LEMOTE_WAR_H | 8 | #ifndef __ASM_MACH_LOONGSON_WAR_H |
9 | #define __ASM_MIPS_MACH_LEMOTE_WAR_H | 9 | #define __ASM_MACH_LOONGSON_WAR_H |
10 | 10 | ||
11 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | 11 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 |
12 | #define R4600_V1_HIT_CACHEOP_WAR 0 | 12 | #define R4600_V1_HIT_CACHEOP_WAR 0 |
@@ -22,4 +22,4 @@ | |||
22 | #define R10000_LLSC_WAR 0 | 22 | #define R10000_LLSC_WAR 0 |
23 | #define MIPS34K_MISSED_ITLB_WAR 0 | 23 | #define MIPS34K_MISSED_ITLB_WAR 0 |
24 | 24 | ||
25 | #endif /* __ASM_MIPS_MACH_LEMOTE_WAR_H */ | 25 | #endif /* __ASM_MACH_LEMOTE_WAR_H */ |
diff --git a/arch/mips/include/asm/mips-boards/bonito64.h b/arch/mips/include/asm/mips-boards/bonito64.h index a0f04bb99c99..a576ce044c3c 100644 --- a/arch/mips/include/asm/mips-boards/bonito64.h +++ b/arch/mips/include/asm/mips-boards/bonito64.h | |||
@@ -26,7 +26,7 @@ | |||
26 | /* offsets from base register */ | 26 | /* offsets from base register */ |
27 | #define BONITO(x) (x) | 27 | #define BONITO(x) (x) |
28 | 28 | ||
29 | #elif defined(CONFIG_LEMOTE_FULONG) | 29 | #elif defined(CONFIG_LEMOTE_FULOONG2E) |
30 | 30 | ||
31 | #define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x))) | 31 | #define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x))) |
32 | #define BONITO_IRQ_BASE 32 | 32 | #define BONITO_IRQ_BASE 32 |
diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c deleted file mode 100644 index 663902159730..000000000000 --- a/arch/mips/lemote/lm2e/setup.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology | ||
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | */ | ||
10 | #include <linux/module.h> | ||
11 | |||
12 | #include <asm/wbflush.h> | ||
13 | |||
14 | #include <loongson.h> | ||
15 | |||
16 | #ifdef CONFIG_VT | ||
17 | #include <linux/console.h> | ||
18 | #include <linux/screen_info.h> | ||
19 | #endif | ||
20 | |||
21 | void (*__wbflush)(void); | ||
22 | EXPORT_SYMBOL(__wbflush); | ||
23 | |||
24 | static void wbflush_loongson2e(void) | ||
25 | { | ||
26 | asm(".set\tpush\n\t" | ||
27 | ".set\tnoreorder\n\t" | ||
28 | ".set mips3\n\t" | ||
29 | "sync\n\t" | ||
30 | "nop\n\t" | ||
31 | ".set\tpop\n\t" | ||
32 | ".set mips0\n\t"); | ||
33 | } | ||
34 | |||
35 | void __init plat_mem_setup(void) | ||
36 | { | ||
37 | __wbflush = wbflush_loongson2e; | ||
38 | |||
39 | #ifdef CONFIG_VT | ||
40 | #if defined(CONFIG_VGA_CONSOLE) | ||
41 | conswitchp = &vga_con; | ||
42 | |||
43 | screen_info = (struct screen_info) { | ||
44 | 0, 25, /* orig-x, orig-y */ | ||
45 | 0, /* unused */ | ||
46 | 0, /* orig-video-page */ | ||
47 | 0, /* orig-video-mode */ | ||
48 | 80, /* orig-video-cols */ | ||
49 | 0, 0, 0, /* ega_ax, ega_bx, ega_cx */ | ||
50 | 25, /* orig-video-lines */ | ||
51 | VIDEO_TYPE_VGAC, /* orig-video-isVGA */ | ||
52 | 16 /* orig-video-points */ | ||
53 | }; | ||
54 | #elif defined(CONFIG_DUMMY_CONSOLE) | ||
55 | conswitchp = &dummy_con; | ||
56 | #endif | ||
57 | #endif | ||
58 | } | ||
diff --git a/arch/mips/lemote/lm2e/Makefile b/arch/mips/loongson/fuloong-2e/Makefile index a5bc1efc362a..feb1d6bba499 100644 --- a/arch/mips/lemote/lm2e/Makefile +++ b/arch/mips/loongson/fuloong-2e/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | # Makefile for Lemote Fulong mini-PC board. | 2 | # Makefile for Lemote Fuloong2e mini-PC board. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += setup.o init.o reset.o irq.o pci.o bonito-irq.o mem.o \ | 5 | obj-y += setup.o init.o reset.o irq.o pci.o bonito-irq.o mem.o \ |
diff --git a/arch/mips/lemote/lm2e/bonito-irq.c b/arch/mips/loongson/fuloong-2e/bonito-irq.c index 3e31e7ad713e..3e31e7ad713e 100644 --- a/arch/mips/lemote/lm2e/bonito-irq.c +++ b/arch/mips/loongson/fuloong-2e/bonito-irq.c | |||
diff --git a/arch/mips/lemote/lm2e/cmdline.c b/arch/mips/loongson/fuloong-2e/cmdline.c index 75f1b243ee4e..75f1b243ee4e 100644 --- a/arch/mips/lemote/lm2e/cmdline.c +++ b/arch/mips/loongson/fuloong-2e/cmdline.c | |||
diff --git a/arch/mips/lemote/lm2e/early_printk.c b/arch/mips/loongson/fuloong-2e/early_printk.c index 3e0a6eaa4041..3e0a6eaa4041 100644 --- a/arch/mips/lemote/lm2e/early_printk.c +++ b/arch/mips/loongson/fuloong-2e/early_printk.c | |||
diff --git a/arch/mips/lemote/lm2e/env.c b/arch/mips/loongson/fuloong-2e/env.c index b9ef50385541..b9ef50385541 100644 --- a/arch/mips/lemote/lm2e/env.c +++ b/arch/mips/loongson/fuloong-2e/env.c | |||
diff --git a/arch/mips/lemote/lm2e/init.c b/arch/mips/loongson/fuloong-2e/init.c index 3abe927422a3..3abe927422a3 100644 --- a/arch/mips/lemote/lm2e/init.c +++ b/arch/mips/loongson/fuloong-2e/init.c | |||
diff --git a/arch/mips/lemote/lm2e/irq.c b/arch/mips/loongson/fuloong-2e/irq.c index 9585f5aa7cce..9585f5aa7cce 100644 --- a/arch/mips/lemote/lm2e/irq.c +++ b/arch/mips/loongson/fuloong-2e/irq.c | |||
diff --git a/arch/mips/lemote/lm2e/machtype.c b/arch/mips/loongson/fuloong-2e/machtype.c index 8d803eea7872..e03aa0de6176 100644 --- a/arch/mips/lemote/lm2e/machtype.c +++ b/arch/mips/loongson/fuloong-2e/machtype.c | |||
@@ -10,6 +10,6 @@ | |||
10 | 10 | ||
11 | const char *get_system_type(void) | 11 | const char *get_system_type(void) |
12 | { | 12 | { |
13 | return "lemote-fulong"; | 13 | return "lemote-fuloong-2e-box"; |
14 | } | 14 | } |
15 | 15 | ||
diff --git a/arch/mips/lemote/lm2e/mem.c b/arch/mips/loongson/fuloong-2e/mem.c index 6a7feb178fa5..6a7feb178fa5 100644 --- a/arch/mips/lemote/lm2e/mem.c +++ b/arch/mips/loongson/fuloong-2e/mem.c | |||
diff --git a/arch/mips/lemote/lm2e/pci.c b/arch/mips/loongson/fuloong-2e/pci.c index 9812c30cc6eb..9812c30cc6eb 100644 --- a/arch/mips/lemote/lm2e/pci.c +++ b/arch/mips/loongson/fuloong-2e/pci.c | |||
diff --git a/arch/mips/loongson/fuloong-2e/reset.c b/arch/mips/loongson/fuloong-2e/reset.c new file mode 100644 index 000000000000..c21299af7f64 --- /dev/null +++ b/arch/mips/loongson/fuloong-2e/reset.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License as published by the | ||
4 | * Free Software Foundation; either version 2 of the License, or (at your | ||
5 | * option) any later version. | ||
6 | * | ||
7 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology | ||
8 | * Author: Fuxin Zhang, zhangfx@lemote.com | ||
9 | * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology | ||
10 | * Author: Zhangjin Wu, wuzj@lemote.com | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/pm.h> | ||
14 | |||
15 | #include <asm/reboot.h> | ||
16 | |||
17 | #include <loongson.h> | ||
18 | |||
19 | static void loongson2e_restart(char *command) | ||
20 | { | ||
21 | /* do preparation for reboot */ | ||
22 | BONITO_BONGENCFG &= ~(1 << 2); | ||
23 | BONITO_BONGENCFG |= (1 << 2); | ||
24 | |||
25 | /* reboot via jumping to boot base address */ | ||
26 | ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) (); | ||
27 | } | ||
28 | |||
29 | static void loongson2e_halt(void) | ||
30 | { | ||
31 | while (1) | ||
32 | ; | ||
33 | } | ||
34 | |||
35 | static int __init mips_reboot_setup(void) | ||
36 | { | ||
37 | _machine_restart = loongson2e_restart; | ||
38 | _machine_halt = loongson2e_halt; | ||
39 | pm_power_off = loongson2e_halt; | ||
40 | |||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | arch_initcall(mips_reboot_setup); | ||
diff --git a/arch/mips/lemote/lm2e/time.c b/arch/mips/loongson/fuloong-2e/time.c index b13d17174654..b13d17174654 100644 --- a/arch/mips/lemote/lm2e/time.c +++ b/arch/mips/loongson/fuloong-2e/time.c | |||
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 63d8a297c58d..0d4d5ea6fac3 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -26,7 +26,7 @@ obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o | |||
26 | obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o | 26 | obj-$(CONFIG_SOC_AU1500) += fixup-au1000.o ops-au1000.o |
27 | obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o | 27 | obj-$(CONFIG_SOC_AU1550) += fixup-au1000.o ops-au1000.o |
28 | obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o | 28 | obj-$(CONFIG_SOC_PNX8550) += fixup-pnx8550.o ops-pnx8550.o |
29 | obj-$(CONFIG_LEMOTE_FULONG) += fixup-lm2e.o ops-bonito64.o | 29 | obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-bonito64.o |
30 | obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o | 30 | obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o |
31 | obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o | 31 | obj-$(CONFIG_PMC_MSP7120_GW) += fixup-pmcmsp.o ops-pmcmsp.o |
32 | obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o | 32 | obj-$(CONFIG_PMC_MSP7120_EVAL) += fixup-pmcmsp.o ops-pmcmsp.o |
diff --git a/arch/mips/pci/fixup-lm2e.c b/arch/mips/pci/fixup-fuloong2e.c index 0c4c7a81213f..0c4c7a81213f 100644 --- a/arch/mips/pci/fixup-lm2e.c +++ b/arch/mips/pci/fixup-fuloong2e.c | |||
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c index f742c51acf0d..54e55e7a2431 100644 --- a/arch/mips/pci/ops-bonito64.c +++ b/arch/mips/pci/ops-bonito64.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #define PCI_ACCESS_READ 0 | 29 | #define PCI_ACCESS_READ 0 |
30 | #define PCI_ACCESS_WRITE 1 | 30 | #define PCI_ACCESS_WRITE 1 |
31 | 31 | ||
32 | #ifdef CONFIG_LEMOTE_FULONG | 32 | #ifdef CONFIG_LEMOTE_FULOONG2E |
33 | #define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset)) | 33 | #define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(BONITO_PCICFG_BASE | (offset)) |
34 | #define ID_SEL_BEGIN 11 | 34 | #define ID_SEL_BEGIN 11 |
35 | #else | 35 | #else |
@@ -77,7 +77,7 @@ static int bonito64_pcibios_config_access(unsigned char access_type, | |||
77 | addrp = CFG_SPACE_REG(addr & 0xffff); | 77 | addrp = CFG_SPACE_REG(addr & 0xffff); |
78 | if (access_type == PCI_ACCESS_WRITE) { | 78 | if (access_type == PCI_ACCESS_WRITE) { |
79 | writel(cpu_to_le32(*data), addrp); | 79 | writel(cpu_to_le32(*data), addrp); |
80 | #ifndef CONFIG_LEMOTE_FULONG | 80 | #ifndef CONFIG_LEMOTE_FULOONG2E |
81 | /* Wait till done */ | 81 | /* Wait till done */ |
82 | while (BONITO_PCIMSTAT & 0xF); | 82 | while (BONITO_PCIMSTAT & 0xF); |
83 | #endif | 83 | #endif |