diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-13 04:52:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-13 04:52:30 -0400 |
commit | c493756e2a8a78bcaae30668317890dcfe86e7c3 (patch) | |
tree | 8fb40782e79472ed882ff2098d4dd295557278ee /arch/mips/include/asm/mach-jazz | |
parent | 0d15504f16f68725e4635aa85411015d1c573b0a (diff) | |
parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) |
Merge branch 'linus' into oprofile
Conflicts:
arch/x86/kernel/apic_32.c
include/linux/pci_ids.h
Diffstat (limited to 'arch/mips/include/asm/mach-jazz')
-rw-r--r-- | arch/mips/include/asm/mach-jazz/dma-coherence.h | 40 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-jazz/floppy.h | 135 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-jazz/mc146818rtc.h | 38 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-jazz/war.h | 25 |
4 files changed, 238 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-jazz/dma-coherence.h b/arch/mips/include/asm/mach-jazz/dma-coherence.h new file mode 100644 index 000000000000..d66979a124a8 --- /dev/null +++ b/arch/mips/include/asm/mach-jazz/dma-coherence.h | |||
@@ -0,0 +1,40 @@ | |||
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 Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JAZZ_DMA_COHERENCE_H | ||
9 | #define __ASM_MACH_JAZZ_DMA_COHERENCE_H | ||
10 | |||
11 | #include <asm/jazzdma.h> | ||
12 | |||
13 | struct device; | ||
14 | |||
15 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | ||
16 | { | ||
17 | return vdma_alloc(virt_to_phys(addr), size); | ||
18 | } | ||
19 | |||
20 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | ||
21 | { | ||
22 | return vdma_alloc(page_to_phys(page), PAGE_SIZE); | ||
23 | } | ||
24 | |||
25 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
26 | { | ||
27 | return vdma_log2phys(dma_addr); | ||
28 | } | ||
29 | |||
30 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
31 | { | ||
32 | vdma_free(dma_addr); | ||
33 | } | ||
34 | |||
35 | static inline int plat_device_is_coherent(struct device *dev) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | #endif /* __ASM_MACH_JAZZ_DMA_COHERENCE_H */ | ||
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h b/arch/mips/include/asm/mach-jazz/floppy.h new file mode 100644 index 000000000000..56e9ca6ae426 --- /dev/null +++ b/arch/mips/include/asm/mach-jazz/floppy.h | |||
@@ -0,0 +1,135 @@ | |||
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, 2003 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JAZZ_FLOPPY_H | ||
9 | #define __ASM_MACH_JAZZ_FLOPPY_H | ||
10 | |||
11 | #include <linux/delay.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/linkage.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <asm/addrspace.h> | ||
17 | #include <asm/jazz.h> | ||
18 | #include <asm/jazzdma.h> | ||
19 | #include <asm/pgtable.h> | ||
20 | |||
21 | static inline unsigned char fd_inb(unsigned int port) | ||
22 | { | ||
23 | unsigned char c; | ||
24 | |||
25 | c = *(volatile unsigned char *) port; | ||
26 | udelay(1); | ||
27 | |||
28 | return c; | ||
29 | } | ||
30 | |||
31 | static inline void fd_outb(unsigned char value, unsigned int port) | ||
32 | { | ||
33 | *(volatile unsigned char *) port = value; | ||
34 | } | ||
35 | |||
36 | /* | ||
37 | * How to access the floppy DMA functions. | ||
38 | */ | ||
39 | static inline void fd_enable_dma(void) | ||
40 | { | ||
41 | vdma_enable(JAZZ_FLOPPY_DMA); | ||
42 | } | ||
43 | |||
44 | static inline void fd_disable_dma(void) | ||
45 | { | ||
46 | vdma_disable(JAZZ_FLOPPY_DMA); | ||
47 | } | ||
48 | |||
49 | static inline int fd_request_dma(void) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static inline void fd_free_dma(void) | ||
55 | { | ||
56 | } | ||
57 | |||
58 | static inline void fd_clear_dma_ff(void) | ||
59 | { | ||
60 | } | ||
61 | |||
62 | static inline void fd_set_dma_mode(char mode) | ||
63 | { | ||
64 | vdma_set_mode(JAZZ_FLOPPY_DMA, mode); | ||
65 | } | ||
66 | |||
67 | static inline void fd_set_dma_addr(char *a) | ||
68 | { | ||
69 | vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(CPHYSADDR((unsigned long)a))); | ||
70 | } | ||
71 | |||
72 | static inline void fd_set_dma_count(unsigned int count) | ||
73 | { | ||
74 | vdma_set_count(JAZZ_FLOPPY_DMA, count); | ||
75 | } | ||
76 | |||
77 | static inline int fd_get_dma_residue(void) | ||
78 | { | ||
79 | return vdma_get_residue(JAZZ_FLOPPY_DMA); | ||
80 | } | ||
81 | |||
82 | static inline void fd_enable_irq(void) | ||
83 | { | ||
84 | } | ||
85 | |||
86 | static inline void fd_disable_irq(void) | ||
87 | { | ||
88 | } | ||
89 | |||
90 | static inline int fd_request_irq(void) | ||
91 | { | ||
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | ||
93 | IRQF_DISABLED, "floppy", NULL); | ||
94 | } | ||
95 | |||
96 | static inline void fd_free_irq(void) | ||
97 | { | ||
98 | free_irq(FLOPPY_IRQ, NULL); | ||
99 | } | ||
100 | |||
101 | static inline unsigned long fd_getfdaddr1(void) | ||
102 | { | ||
103 | return JAZZ_FDC_BASE; | ||
104 | } | ||
105 | |||
106 | static inline unsigned long fd_dma_mem_alloc(unsigned long size) | ||
107 | { | ||
108 | unsigned long mem; | ||
109 | |||
110 | mem = __get_dma_pages(GFP_KERNEL, get_order(size)); | ||
111 | if(!mem) | ||
112 | return 0; | ||
113 | vdma_alloc(CPHYSADDR(mem), size); /* XXX error checking */ | ||
114 | |||
115 | return mem; | ||
116 | } | ||
117 | |||
118 | static inline void fd_dma_mem_free(unsigned long addr, unsigned long size) | ||
119 | { | ||
120 | vdma_free(vdma_phys2log(CPHYSADDR(addr))); | ||
121 | free_pages(addr, get_order(size)); | ||
122 | } | ||
123 | |||
124 | static inline unsigned long fd_drive_type(unsigned long n) | ||
125 | { | ||
126 | /* XXX This is wrong for machines with ED 2.88mb disk drives like the | ||
127 | Olivetti M700. Anyway, we should suck this from the ARC | ||
128 | firmware. */ | ||
129 | if (n == 0) | ||
130 | return 4; /* 3,5", 1.44mb */ | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | #endif /* __ASM_MACH_JAZZ_FLOPPY_H */ | ||
diff --git a/arch/mips/include/asm/mach-jazz/mc146818rtc.h b/arch/mips/include/asm/mach-jazz/mc146818rtc.h new file mode 100644 index 000000000000..987f727afe25 --- /dev/null +++ b/arch/mips/include/asm/mach-jazz/mc146818rtc.h | |||
@@ -0,0 +1,38 @@ | |||
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 by Ralf Baechle | ||
7 | * Copyright (C) 2007 Thomas Bogendoerfer | ||
8 | * | ||
9 | * RTC routines for Jazz style attached Dallas chip. | ||
10 | */ | ||
11 | #ifndef __ASM_MACH_JAZZ_MC146818RTC_H | ||
12 | #define __ASM_MACH_JAZZ_MC146818RTC_H | ||
13 | |||
14 | #include <linux/delay.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/jazz.h> | ||
18 | |||
19 | #define RTC_PORT(x) (0x70 + (x)) | ||
20 | #define RTC_IRQ 8 | ||
21 | |||
22 | static inline unsigned char CMOS_READ(unsigned long addr) | ||
23 | { | ||
24 | outb_p(addr, RTC_PORT(0)); | ||
25 | return *(volatile char *)JAZZ_RTC_BASE; | ||
26 | } | ||
27 | |||
28 | static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | ||
29 | { | ||
30 | outb_p(addr, RTC_PORT(0)); | ||
31 | *(volatile char *)JAZZ_RTC_BASE = data; | ||
32 | } | ||
33 | |||
34 | #define RTC_ALWAYS_BCD 0 | ||
35 | |||
36 | #define mc146818_decode_year(year) ((year) + 1980) | ||
37 | |||
38 | #endif /* __ASM_MACH_JAZZ_MC146818RTC_H */ | ||
diff --git a/arch/mips/include/asm/mach-jazz/war.h b/arch/mips/include/asm/mach-jazz/war.h new file mode 100644 index 000000000000..6158ee861bfd --- /dev/null +++ b/arch/mips/include/asm/mach-jazz/war.h | |||
@@ -0,0 +1,25 @@ | |||
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) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | ||
8 | #ifndef __ASM_MIPS_MACH_JAZZ_WAR_H | ||
9 | #define __ASM_MIPS_MACH_JAZZ_WAR_H | ||
10 | |||
11 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | ||
12 | #define R4600_V1_HIT_CACHEOP_WAR 0 | ||
13 | #define R4600_V2_HIT_CACHEOP_WAR 0 | ||
14 | #define R5432_CP0_INTERRUPT_WAR 0 | ||
15 | #define BCM1250_M3_WAR 0 | ||
16 | #define SIBYTE_1956_WAR 0 | ||
17 | #define MIPS4K_ICACHE_REFILL_WAR 0 | ||
18 | #define MIPS_CACHE_SYNC_WAR 0 | ||
19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | ||
20 | #define RM9000_CDEX_SMP_WAR 0 | ||
21 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 | ||
22 | #define R10000_LLSC_WAR 0 | ||
23 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
24 | |||
25 | #endif /* __ASM_MIPS_MACH_JAZZ_WAR_H */ | ||