diff options
author | Songmao Tian <tiansm@lemote.com> | 2007-06-06 02:52:38 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-07-10 12:33:02 -0400 |
commit | 42d226c7248a28ff8c478c06b7e9bd9ef5d73574 (patch) | |
tree | 7749c1204cbdb481ddece008dc09234c48b769db /include/asm-mips | |
parent | 2a21c7300b53b744d16903256a172d9cbcfdd03e (diff) |
[MIPS] New files for lemote fulong mini-PC support
Signed-off-by: Fuxin Zhang <zhangfx@lemote.com>
Signed-off-by: Songmao Tian <tiansm@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/bootinfo.h | 6 | ||||
-rw-r--r-- | include/asm-mips/mach-lemote/dma-coherence.h | 42 | ||||
-rw-r--r-- | include/asm-mips/mach-lemote/mc146818rtc.h | 36 | ||||
-rw-r--r-- | include/asm-mips/mips-boards/bonito64.h | 7 |
4 files changed, 90 insertions, 1 deletions
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 8b76e7602425..12f9d7139ebf 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -207,6 +207,12 @@ | |||
207 | #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ | 207 | #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ |
208 | #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ | 208 | #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ |
209 | 209 | ||
210 | /* | ||
211 | * Valid machtype for group LEMOTE | ||
212 | */ | ||
213 | #define MACH_GROUP_LEMOTE 27 | ||
214 | #define MACH_LEMOTE_FULONG 0 | ||
215 | |||
210 | #define CL_SIZE COMMAND_LINE_SIZE | 216 | #define CL_SIZE COMMAND_LINE_SIZE |
211 | 217 | ||
212 | const char *get_system_type(void); | 218 | const char *get_system_type(void); |
diff --git a/include/asm-mips/mach-lemote/dma-coherence.h b/include/asm-mips/mach-lemote/dma-coherence.h new file mode 100644 index 000000000000..7e914777ebc4 --- /dev/null +++ b/include/asm-mips/mach-lemote/dma-coherence.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006, 07 Ralf Baechle <ralf@linux-mips.org> | ||
7 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology | ||
8 | * Author: Fuxin Zhang, zhangfx@lemote.com | ||
9 | * | ||
10 | */ | ||
11 | #ifndef __ASM_MACH_LEMOTE_DMA_COHERENCE_H | ||
12 | #define __ASM_MACH_LEMOTE_DMA_COHERENCE_H | ||
13 | |||
14 | struct device; | ||
15 | |||
16 | static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, | ||
17 | size_t size) | ||
18 | { | ||
19 | return virt_to_phys(addr) | 0x80000000; | ||
20 | } | ||
21 | |||
22 | static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, | ||
23 | struct page *page) | ||
24 | { | ||
25 | return page_to_phys(page) | 0x80000000; | ||
26 | } | ||
27 | |||
28 | static inline unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
29 | { | ||
30 | return dma_addr & 0x7fffffff; | ||
31 | } | ||
32 | |||
33 | static inline void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | static inline int plat_device_is_coherent(struct device *dev) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | #endif /* __ASM_MACH_LEMOTE_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-lemote/mc146818rtc.h b/include/asm-mips/mach-lemote/mc146818rtc.h new file mode 100644 index 000000000000..ed5147e11085 --- /dev/null +++ b/include/asm-mips/mach-lemote/mc146818rtc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1998, 2001, 03, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * RTC routines for PC style attached Dallas chip. | ||
9 | */ | ||
10 | #ifndef __ASM_MACH_LEMOTE_MC146818RTC_H | ||
11 | #define __ASM_MACH_LEMOTE_MC146818RTC_H | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | |||
15 | #define RTC_PORT(x) (0x70 + (x)) | ||
16 | #define RTC_IRQ 8 | ||
17 | |||
18 | static inline unsigned char CMOS_READ(unsigned long addr) | ||
19 | { | ||
20 | outb_p(addr, RTC_PORT(0)); | ||
21 | return inb_p(RTC_PORT(1)); | ||
22 | } | ||
23 | |||
24 | static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | ||
25 | { | ||
26 | outb_p(addr, RTC_PORT(0)); | ||
27 | outb_p(data, RTC_PORT(1)); | ||
28 | } | ||
29 | |||
30 | #define RTC_ALWAYS_BCD 0 | ||
31 | |||
32 | #ifndef mc146818_decode_year | ||
33 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) | ||
34 | #endif | ||
35 | |||
36 | #endif /* __ASM_MACH_LEMOTE_MC146818RTC_H */ | ||
diff --git a/include/asm-mips/mips-boards/bonito64.h b/include/asm-mips/mips-boards/bonito64.h index cd7125610100..dc3fc32eedd8 100644 --- a/include/asm-mips/mips-boards/bonito64.h +++ b/include/asm-mips/mips-boards/bonito64.h | |||
@@ -26,7 +26,12 @@ | |||
26 | /* offsets from base register */ | 26 | /* offsets from base register */ |
27 | #define BONITO(x) (x) | 27 | #define BONITO(x) (x) |
28 | 28 | ||
29 | #else /* !__ASSEMBLY__ */ | 29 | #elif defined(CONFIG_LEMOTE_FULONG) |
30 | |||
31 | #define BONITO(x) (*(volatile u32 *)((char *)CKSEG1ADDR(BONITO_REG_BASE) + (x))) | ||
32 | #define BONITO_IRQ_BASE 32 | ||
33 | |||
34 | #else | ||
30 | 35 | ||
31 | /* | 36 | /* |
32 | * Algorithmics Bonito64 system controller register base. | 37 | * Algorithmics Bonito64 system controller register base. |