diff options
Diffstat (limited to 'arch/mips/jazz')
-rw-r--r-- | arch/mips/jazz/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/jazz/io.c | 135 | ||||
-rw-r--r-- | arch/mips/jazz/reset.c | 13 | ||||
-rw-r--r-- | arch/mips/jazz/setup.c | 4 |
4 files changed, 2 insertions, 152 deletions
diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile index ae4c402b5004..575a9442bc82 100644 --- a/arch/mips/jazz/Makefile +++ b/arch/mips/jazz/Makefile | |||
@@ -3,3 +3,5 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := irq.o jazzdma.o jazz-platform.o reset.o setup.o | 5 | obj-y := irq.o jazzdma.o jazz-platform.o reset.o setup.o |
6 | |||
7 | EXTRA_CFLAGS += -Werror | ||
diff --git a/arch/mips/jazz/io.c b/arch/mips/jazz/io.c deleted file mode 100644 index e86904454c89..000000000000 --- a/arch/mips/jazz/io.c +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
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 | * Low level I/O functions for Jazz family machines. | ||
7 | * | ||
8 | * Copyright (C) 1997 by Ralf Baechle. | ||
9 | */ | ||
10 | #include <linux/string.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | #include <asm/addrspace.h> | ||
13 | #include <asm/system.h> | ||
14 | #include <asm/jazz.h> | ||
15 | |||
16 | /* | ||
17 | * Map an 16mb segment of the EISA address space to 0xe3000000; | ||
18 | */ | ||
19 | static inline void map_eisa_address(unsigned long address) | ||
20 | { | ||
21 | /* XXX */ | ||
22 | /* We've got an wired entry in the TLB. We just need to modify it. | ||
23 | fast and clean. But since we want to get rid of wired entries | ||
24 | things are a little bit more complicated ... */ | ||
25 | } | ||
26 | |||
27 | static unsigned char jazz_readb(unsigned long addr) | ||
28 | { | ||
29 | unsigned char res; | ||
30 | |||
31 | map_eisa_address(addr); | ||
32 | addr &= 0xffffff; | ||
33 | res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr); | ||
34 | |||
35 | return res; | ||
36 | } | ||
37 | |||
38 | static unsigned short jazz_readw(unsigned long addr) | ||
39 | { | ||
40 | unsigned short res; | ||
41 | |||
42 | map_eisa_address(addr); | ||
43 | addr &= 0xffffff; | ||
44 | res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr); | ||
45 | |||
46 | return res; | ||
47 | } | ||
48 | |||
49 | static unsigned int jazz_readl(unsigned long addr) | ||
50 | { | ||
51 | unsigned int res; | ||
52 | |||
53 | map_eisa_address(addr); | ||
54 | addr &= 0xffffff; | ||
55 | res = *(volatile unsigned char *) (JAZZ_EISA_BASE + addr); | ||
56 | |||
57 | return res; | ||
58 | } | ||
59 | |||
60 | static void jazz_writeb(unsigned char val, unsigned long addr) | ||
61 | { | ||
62 | map_eisa_address(addr); | ||
63 | addr &= 0xffffff; | ||
64 | *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val; | ||
65 | } | ||
66 | |||
67 | static void jazz_writew(unsigned short val, unsigned long addr) | ||
68 | { | ||
69 | map_eisa_address(addr); | ||
70 | addr &= 0xffffff; | ||
71 | *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val; | ||
72 | } | ||
73 | |||
74 | static void jazz_writel(unsigned int val, unsigned long addr) | ||
75 | { | ||
76 | map_eisa_address(addr); | ||
77 | addr &= 0xffffff; | ||
78 | *(volatile unsigned char *) (JAZZ_EISA_BASE + addr) = val; | ||
79 | } | ||
80 | |||
81 | static void jazz_memset_io(unsigned long addr, int val, unsigned long len) | ||
82 | { | ||
83 | unsigned long waddr; | ||
84 | |||
85 | waddr = JAZZ_EISA_BASE | (addr & 0xffffff); | ||
86 | while(len) { | ||
87 | unsigned long fraglen; | ||
88 | |||
89 | fraglen = (~addr + 1) & 0xffffff; | ||
90 | fraglen = (fraglen < len) ? fraglen : len; | ||
91 | map_eisa_address(addr); | ||
92 | memset((char *)waddr, val, fraglen); | ||
93 | addr += fraglen; | ||
94 | waddr = waddr + fraglen - 0x1000000; | ||
95 | len -= fraglen; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | static void jazz_memcpy_fromio(unsigned long to, unsigned long from, unsigned long len) | ||
100 | { | ||
101 | unsigned long waddr; | ||
102 | |||
103 | waddr = JAZZ_EISA_BASE | (from & 0xffffff); | ||
104 | while(len) { | ||
105 | unsigned long fraglen; | ||
106 | |||
107 | fraglen = (~from + 1) & 0xffffff; | ||
108 | fraglen = (fraglen < len) ? fraglen : len; | ||
109 | map_eisa_address(from); | ||
110 | memcpy((void *)to, (void *)waddr, fraglen); | ||
111 | to += fraglen; | ||
112 | from += fraglen; | ||
113 | waddr = waddr + fraglen - 0x1000000; | ||
114 | len -= fraglen; | ||
115 | } | ||
116 | } | ||
117 | |||
118 | static void jazz_memcpy_toio(unsigned long to, unsigned long from, unsigned long len) | ||
119 | { | ||
120 | unsigned long waddr; | ||
121 | |||
122 | waddr = JAZZ_EISA_BASE | (to & 0xffffff); | ||
123 | while(len) { | ||
124 | unsigned long fraglen; | ||
125 | |||
126 | fraglen = (~to + 1) & 0xffffff; | ||
127 | fraglen = (fraglen < len) ? fraglen : len; | ||
128 | map_eisa_address(to); | ||
129 | memcpy((char *)to + JAZZ_EISA_BASE, (void *)from, fraglen); | ||
130 | to += fraglen; | ||
131 | from += fraglen; | ||
132 | waddr = waddr + fraglen - 0x1000000; | ||
133 | len -= fraglen; | ||
134 | } | ||
135 | } | ||
diff --git a/arch/mips/jazz/reset.c b/arch/mips/jazz/reset.c index 2a9754750bc8..d8ade85060b3 100644 --- a/arch/mips/jazz/reset.c +++ b/arch/mips/jazz/reset.c | |||
@@ -6,10 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | #include <linux/jiffies.h> | 7 | #include <linux/jiffies.h> |
8 | #include <asm/jazz.h> | 8 | #include <asm/jazz.h> |
9 | #include <asm/io.h> | ||
10 | #include <asm/system.h> | ||
11 | #include <asm/reboot.h> | ||
12 | #include <asm/delay.h> | ||
13 | 9 | ||
14 | #define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ | 10 | #define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ |
15 | 11 | ||
@@ -58,12 +54,3 @@ void jazz_machine_restart(char *command) | |||
58 | jazz_write_output (0x00); | 54 | jazz_write_output (0x00); |
59 | } | 55 | } |
60 | } | 56 | } |
61 | |||
62 | void jazz_machine_halt(void) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | void jazz_machine_power_off(void) | ||
67 | { | ||
68 | /* Jazz machines don't have a software power switch */ | ||
69 | } | ||
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 81ec559a1c26..798279e06691 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c | |||
@@ -34,8 +34,6 @@ | |||
34 | extern asmlinkage void jazz_handle_int(void); | 34 | extern asmlinkage void jazz_handle_int(void); |
35 | 35 | ||
36 | extern void jazz_machine_restart(char *command); | 36 | extern void jazz_machine_restart(char *command); |
37 | extern void jazz_machine_halt(void); | ||
38 | extern void jazz_machine_power_off(void); | ||
39 | 37 | ||
40 | void __init plat_timer_setup(struct irqaction *irq) | 38 | void __init plat_timer_setup(struct irqaction *irq) |
41 | { | 39 | { |
@@ -95,8 +93,6 @@ void __init plat_mem_setup(void) | |||
95 | /* The RTC is outside the port address space */ | 93 | /* The RTC is outside the port address space */ |
96 | 94 | ||
97 | _machine_restart = jazz_machine_restart; | 95 | _machine_restart = jazz_machine_restart; |
98 | _machine_halt = jazz_machine_halt; | ||
99 | pm_power_off = jazz_machine_power_off; | ||
100 | 96 | ||
101 | screen_info = (struct screen_info) { | 97 | screen_info = (struct screen_info) { |
102 | 0, 0, /* orig-x, orig-y */ | 98 | 0, 0, /* orig-x, orig-y */ |