diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/Kconfig | 66 | ||||
-rw-r--r-- | arch/m68k/amiga/config.c | 30 | ||||
-rw-r--r-- | arch/m68k/atari/Makefile | 3 | ||||
-rw-r--r-- | arch/m68k/atari/ataints.c | 6 | ||||
-rw-r--r-- | arch/m68k/atari/atakeyb.c | 12 | ||||
-rw-r--r-- | arch/m68k/atari/config.c | 52 | ||||
-rw-r--r-- | arch/m68k/atari/hades-pci.c | 440 | ||||
-rw-r--r-- | arch/m68k/atari/stram.c | 28 | ||||
-rw-r--r-- | arch/m68k/atari/time.c | 38 | ||||
-rw-r--r-- | arch/m68k/bvme6000/config.c | 26 | ||||
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 31 | ||||
-rw-r--r-- | arch/m68k/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/bios32.c | 514 | ||||
-rw-r--r-- | arch/m68k/kernel/dma.c | 4 | ||||
-rw-r--r-- | arch/m68k/kernel/ints.c | 3 | ||||
-rw-r--r-- | arch/m68k/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/m68k/kernel/setup.c | 35 | ||||
-rw-r--r-- | arch/m68k/kernel/traps.c | 9 | ||||
-rw-r--r-- | arch/m68k/kernel/vmlinux-std.lds | 9 | ||||
-rw-r--r-- | arch/m68k/mm/kmap.c | 4 | ||||
-rw-r--r-- | arch/m68k/mvme147/config.c | 10 | ||||
-rw-r--r-- | arch/m68k/mvme16x/config.c | 15 | ||||
-rw-r--r-- | arch/m68k/mvme16x/rtc.c | 26 | ||||
-rw-r--r-- | arch/m68k/q40/config.c | 22 | ||||
-rw-r--r-- | arch/m68k/sun3/config.c | 12 | ||||
-rw-r--r-- | arch/m68k/sun3x/config.c | 12 | ||||
-rw-r--r-- | arch/m68k/sun3x/time.c | 28 |
27 files changed, 206 insertions, 1232 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 8c5e1de68fcb..836fb66f080d 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -5,6 +5,7 @@ | |||
5 | config M68K | 5 | config M68K |
6 | bool | 6 | bool |
7 | default y | 7 | default y |
8 | select HAVE_AOUT | ||
8 | select HAVE_IDE | 9 | select HAVE_IDE |
9 | 10 | ||
10 | config MMU | 11 | config MMU |
@@ -53,9 +54,6 @@ config NO_IOPORT | |||
53 | config NO_DMA | 54 | config NO_DMA |
54 | def_bool SUN3 | 55 | def_bool SUN3 |
55 | 56 | ||
56 | config ARCH_SUPPORTS_AOUT | ||
57 | def_bool y | ||
58 | |||
59 | config HZ | 57 | config HZ |
60 | int | 58 | int |
61 | default 100 | 59 | default 100 |
@@ -64,6 +62,8 @@ mainmenu "Linux/68k Kernel Configuration" | |||
64 | 62 | ||
65 | source "init/Kconfig" | 63 | source "init/Kconfig" |
66 | 64 | ||
65 | source "kernel/Kconfig.freezer" | ||
66 | |||
67 | menu "Platform dependent setup" | 67 | menu "Platform dependent setup" |
68 | 68 | ||
69 | config EISA | 69 | config EISA |
@@ -107,21 +107,9 @@ config PCMCIA | |||
107 | To compile this driver as modules, choose M here: the | 107 | To compile this driver as modules, choose M here: the |
108 | modules will be called pcmcia_core and ds. | 108 | modules will be called pcmcia_core and ds. |
109 | 109 | ||
110 | config SUN3 | ||
111 | bool "Sun3 support" | ||
112 | select M68020 | ||
113 | select MMU_SUN3 if MMU | ||
114 | help | ||
115 | This option enables support for the Sun 3 series of workstations | ||
116 | (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires | ||
117 | that all other hardware types must be disabled, as Sun 3 kernels | ||
118 | are incompatible with all other m68k targets (including Sun 3x!). | ||
119 | |||
120 | If you don't want to compile a kernel exclusively for a Sun 3, say N. | ||
121 | |||
122 | config AMIGA | 110 | config AMIGA |
123 | bool "Amiga support" | 111 | bool "Amiga support" |
124 | depends on !MMU_SUN3 | 112 | select MMU_MOTOROLA if MMU |
125 | help | 113 | help |
126 | This option enables support for the Amiga series of computers. If | 114 | This option enables support for the Amiga series of computers. If |
127 | you plan to use this kernel on an Amiga, say Y here and browse the | 115 | you plan to use this kernel on an Amiga, say Y here and browse the |
@@ -129,33 +117,16 @@ config AMIGA | |||
129 | 117 | ||
130 | config ATARI | 118 | config ATARI |
131 | bool "Atari support" | 119 | bool "Atari support" |
132 | depends on !MMU_SUN3 | 120 | select MMU_MOTOROLA if MMU |
133 | help | 121 | help |
134 | This option enables support for the 68000-based Atari series of | 122 | This option enables support for the 68000-based Atari series of |
135 | computers (including the TT, Falcon and Medusa). If you plan to use | 123 | computers (including the TT, Falcon and Medusa). If you plan to use |
136 | this kernel on an Atari, say Y here and browse the material | 124 | this kernel on an Atari, say Y here and browse the material |
137 | available in <file:Documentation/m68k>; otherwise say N. | 125 | available in <file:Documentation/m68k>; otherwise say N. |
138 | 126 | ||
139 | config HADES | ||
140 | bool "Hades support" | ||
141 | depends on ATARI && BROKEN | ||
142 | help | ||
143 | This option enables support for the Hades Atari clone. If you plan | ||
144 | to use this kernel on a Hades, say Y here; otherwise say N. | ||
145 | |||
146 | config PCI | ||
147 | bool | ||
148 | depends on HADES | ||
149 | default y | ||
150 | help | ||
151 | Find out whether you have a PCI motherboard. PCI is the name of a | ||
152 | bus system, i.e. the way the CPU talks to the other stuff inside | ||
153 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or | ||
154 | VESA. If you have PCI, say Y, otherwise N. | ||
155 | |||
156 | config MAC | 127 | config MAC |
157 | bool "Macintosh support" | 128 | bool "Macintosh support" |
158 | depends on !MMU_SUN3 | 129 | select MMU_MOTOROLA if MMU |
159 | help | 130 | help |
160 | This option enables support for the Apple Macintosh series of | 131 | This option enables support for the Apple Macintosh series of |
161 | computers (yes, there is experimental support now, at least for part | 132 | computers (yes, there is experimental support now, at least for part |
@@ -176,14 +147,14 @@ config M68K_L2_CACHE | |||
176 | 147 | ||
177 | config APOLLO | 148 | config APOLLO |
178 | bool "Apollo support" | 149 | bool "Apollo support" |
179 | depends on !MMU_SUN3 | 150 | select MMU_MOTOROLA if MMU |
180 | help | 151 | help |
181 | Say Y here if you want to run Linux on an MC680x0-based Apollo | 152 | Say Y here if you want to run Linux on an MC680x0-based Apollo |
182 | Domain workstation such as the DN3500. | 153 | Domain workstation such as the DN3500. |
183 | 154 | ||
184 | config VME | 155 | config VME |
185 | bool "VME (Motorola and BVM) support" | 156 | bool "VME (Motorola and BVM) support" |
186 | depends on !MMU_SUN3 | 157 | select MMU_MOTOROLA if MMU |
187 | help | 158 | help |
188 | Say Y here if you want to build a kernel for a 680x0 based VME | 159 | Say Y here if you want to build a kernel for a 680x0 based VME |
189 | board. Boards currently supported include Motorola boards MVME147, | 160 | board. Boards currently supported include Motorola boards MVME147, |
@@ -220,7 +191,7 @@ config BVME6000 | |||
220 | 191 | ||
221 | config HP300 | 192 | config HP300 |
222 | bool "HP9000/300 and HP9000/400 support" | 193 | bool "HP9000/300 and HP9000/400 support" |
223 | depends on !MMU_SUN3 | 194 | select MMU_MOTOROLA if MMU |
224 | help | 195 | help |
225 | This option enables support for the HP9000/300 and HP9000/400 series | 196 | This option enables support for the HP9000/300 and HP9000/400 series |
226 | of workstations. Support for these machines is still somewhat | 197 | of workstations. Support for these machines is still somewhat |
@@ -239,7 +210,7 @@ config DIO | |||
239 | 210 | ||
240 | config SUN3X | 211 | config SUN3X |
241 | bool "Sun3x support" | 212 | bool "Sun3x support" |
242 | depends on !MMU_SUN3 | 213 | select MMU_MOTOROLA if MMU |
243 | select M68030 | 214 | select M68030 |
244 | help | 215 | help |
245 | This option enables support for the Sun 3x series of workstations. | 216 | This option enables support for the Sun 3x series of workstations. |
@@ -252,7 +223,7 @@ config SUN3X | |||
252 | 223 | ||
253 | config Q40 | 224 | config Q40 |
254 | bool "Q40/Q60 support" | 225 | bool "Q40/Q60 support" |
255 | depends on !MMU_SUN3 | 226 | select MMU_MOTOROLA if MMU |
256 | help | 227 | help |
257 | The Q40 is a Motorola 68040-based successor to the Sinclair QL | 228 | The Q40 is a Motorola 68040-based successor to the Sinclair QL |
258 | manufactured in Germany. There is an official Q40 home page at | 229 | manufactured in Germany. There is an official Q40 home page at |
@@ -260,6 +231,19 @@ config Q40 | |||
260 | Q60. Select your CPU below. For 68LC060 don't forget to enable FPU | 231 | Q60. Select your CPU below. For 68LC060 don't forget to enable FPU |
261 | emulation. | 232 | emulation. |
262 | 233 | ||
234 | config SUN3 | ||
235 | bool "Sun3 support" | ||
236 | depends on !MMU_MOTOROLA | ||
237 | select MMU_SUN3 if MMU | ||
238 | select M68020 | ||
239 | help | ||
240 | This option enables support for the Sun 3 series of workstations | ||
241 | (3/50, 3/60, 3/1xx, 3/2xx systems). Enabling this option requires | ||
242 | that all other hardware types must be disabled, as Sun 3 kernels | ||
243 | are incompatible with all other m68k targets (including Sun 3x!). | ||
244 | |||
245 | If you don't want to compile a kernel exclusively for a Sun 3, say N. | ||
246 | |||
263 | comment "Processor type" | 247 | comment "Processor type" |
264 | 248 | ||
265 | config M68020 | 249 | config M68020 |
@@ -297,10 +281,10 @@ config M68060 | |||
297 | config MMU_MOTOROLA | 281 | config MMU_MOTOROLA |
298 | bool | 282 | bool |
299 | depends on MMU && !MMU_SUN3 | 283 | depends on MMU && !MMU_SUN3 |
300 | default y | ||
301 | 284 | ||
302 | config MMU_SUN3 | 285 | config MMU_SUN3 |
303 | bool | 286 | bool |
287 | depends on MMU && !MMU_MOTOROLA | ||
304 | 288 | ||
305 | config M68KFPU_EMU | 289 | config M68KFPU_EMU |
306 | bool "Math emulation support (EXPERIMENTAL)" | 290 | bool "Math emulation support (EXPERIMENTAL)" |
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index df679d96b1cb..ab9862c3a136 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/seq_file.h> | ||
18 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
19 | #include <linux/console.h> | 20 | #include <linux/console.h> |
20 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
@@ -24,6 +25,7 @@ | |||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/zorro.h> | 26 | #include <linux/zorro.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/keyboard.h> | ||
27 | 29 | ||
28 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
29 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
@@ -92,7 +94,7 @@ static char amiga_model_name[13] = "Amiga "; | |||
92 | 94 | ||
93 | static void amiga_sched_init(irq_handler_t handler); | 95 | static void amiga_sched_init(irq_handler_t handler); |
94 | static void amiga_get_model(char *model); | 96 | static void amiga_get_model(char *model); |
95 | static int amiga_get_hardware_list(char *buffer); | 97 | static void amiga_get_hardware_list(struct seq_file *m); |
96 | /* amiga specific timer functions */ | 98 | /* amiga specific timer functions */ |
97 | static unsigned long amiga_gettimeoffset(void); | 99 | static unsigned long amiga_gettimeoffset(void); |
98 | static int a3000_hwclk(int, struct rtc_time *); | 100 | static int a3000_hwclk(int, struct rtc_time *); |
@@ -910,13 +912,11 @@ static void amiga_get_model(char *model) | |||
910 | } | 912 | } |
911 | 913 | ||
912 | 914 | ||
913 | static int amiga_get_hardware_list(char *buffer) | 915 | static void amiga_get_hardware_list(struct seq_file *m) |
914 | { | 916 | { |
915 | int len = 0; | ||
916 | |||
917 | if (AMIGAHW_PRESENT(CHIP_RAM)) | 917 | if (AMIGAHW_PRESENT(CHIP_RAM)) |
918 | len += sprintf(buffer+len, "Chip RAM:\t%ldK\n", amiga_chip_size>>10); | 918 | seq_printf(m, "Chip RAM:\t%ldK\n", amiga_chip_size>>10); |
919 | len += sprintf(buffer+len, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n", | 919 | seq_printf(m, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n", |
920 | amiga_psfreq, amiga_eclock); | 920 | amiga_psfreq, amiga_eclock); |
921 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { | 921 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { |
922 | char *type; | 922 | char *type; |
@@ -934,14 +934,14 @@ static int amiga_get_hardware_list(char *buffer) | |||
934 | type = "Old or Unknown"; | 934 | type = "Old or Unknown"; |
935 | break; | 935 | break; |
936 | } | 936 | } |
937 | len += sprintf(buffer+len, "Graphics:\t%s\n", type); | 937 | seq_printf(m, "Graphics:\t%s\n", type); |
938 | } | 938 | } |
939 | 939 | ||
940 | #define AMIGAHW_ANNOUNCE(name, str) \ | 940 | #define AMIGAHW_ANNOUNCE(name, str) \ |
941 | if (AMIGAHW_PRESENT(name)) \ | 941 | if (AMIGAHW_PRESENT(name)) \ |
942 | len += sprintf (buffer+len, "\t%s\n", str) | 942 | seq_printf (m, "\t%s\n", str) |
943 | 943 | ||
944 | len += sprintf (buffer + len, "Detected hardware:\n"); | 944 | seq_printf (m, "Detected hardware:\n"); |
945 | 945 | ||
946 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); | 946 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); |
947 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); | 947 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); |
@@ -974,13 +974,19 @@ static int amiga_get_hardware_list(char *buffer) | |||
974 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); | 974 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); |
975 | #ifdef CONFIG_ZORRO | 975 | #ifdef CONFIG_ZORRO |
976 | if (AMIGAHW_PRESENT(ZORRO)) | 976 | if (AMIGAHW_PRESENT(ZORRO)) |
977 | len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion " | 977 | seq_printf(m, "\tZorro II%s AutoConfig: %d Expansion " |
978 | "Device%s\n", | 978 | "Device%s\n", |
979 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", | 979 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", |
980 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); | 980 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); |
981 | #endif /* CONFIG_ZORRO */ | 981 | #endif /* CONFIG_ZORRO */ |
982 | 982 | ||
983 | #undef AMIGAHW_ANNOUNCE | 983 | #undef AMIGAHW_ANNOUNCE |
984 | |||
985 | return len; | ||
986 | } | 984 | } |
985 | |||
986 | /* | ||
987 | * The Amiga keyboard driver needs key_maps, but we cannot export it in | ||
988 | * drivers/char/defkeymap.c, as it is autogenerated | ||
989 | */ | ||
990 | #ifdef CONFIG_HW_CONSOLE | ||
991 | EXPORT_SYMBOL_GPL(key_maps); | ||
992 | #endif | ||
diff --git a/arch/m68k/atari/Makefile b/arch/m68k/atari/Makefile index 2cd905efe63a..0cac723306f9 100644 --- a/arch/m68k/atari/Makefile +++ b/arch/m68k/atari/Makefile | |||
@@ -5,7 +5,4 @@ | |||
5 | obj-y := config.o time.o debug.o ataints.o stdma.o \ | 5 | obj-y := config.o time.o debug.o ataints.o stdma.o \ |
6 | atasound.o stram.o | 6 | atasound.o stram.o |
7 | 7 | ||
8 | ifeq ($(CONFIG_PCI),y) | ||
9 | obj-$(CONFIG_HADES) += hades-pci.o | ||
10 | endif | ||
11 | obj-$(CONFIG_ATARI_KBD_CORE) += atakeyb.o | 8 | obj-$(CONFIG_ATARI_KBD_CORE) += atakeyb.o |
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index b45593a60bdd..dba4afabb444 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -407,10 +407,8 @@ void __init atari_init_IRQ(void) | |||
407 | * gets overruns) | 407 | * gets overruns) |
408 | */ | 408 | */ |
409 | 409 | ||
410 | if (!MACH_IS_HADES) { | 410 | vectors[VEC_INT2] = falcon_hblhandler; |
411 | vectors[VEC_INT2] = falcon_hblhandler; | 411 | vectors[VEC_INT4] = falcon_hblhandler; |
412 | vectors[VEC_INT4] = falcon_hblhandler; | ||
413 | } | ||
414 | } | 412 | } |
415 | 413 | ||
416 | if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) { | 414 | if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) { |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index bb959fbab2dc..c038b7c7eff0 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -635,15 +635,3 @@ int atari_keyb_init(void) | |||
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | EXPORT_SYMBOL_GPL(atari_keyb_init); | 637 | EXPORT_SYMBOL_GPL(atari_keyb_init); |
638 | |||
639 | int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode) | ||
640 | { | ||
641 | #ifdef CONFIG_MAGIC_SYSRQ | ||
642 | /* ALT+HELP pressed? */ | ||
643 | if ((keycode == 98) && ((shift_state & 0xff) == 8)) | ||
644 | *keycodep = 0xff; | ||
645 | else | ||
646 | #endif | ||
647 | *keycodep = keycode; | ||
648 | return 1; | ||
649 | } | ||
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index 5945e1505558..49c28cdbea5c 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/seq_file.h> | ||
29 | #include <linux/console.h> | 30 | #include <linux/console.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
@@ -63,7 +64,7 @@ int atari_rtc_year_offset; | |||
63 | /* local function prototypes */ | 64 | /* local function prototypes */ |
64 | static void atari_reset(void); | 65 | static void atari_reset(void); |
65 | static void atari_get_model(char *model); | 66 | static void atari_get_model(char *model); |
66 | static int atari_get_hardware_list(char *buffer); | 67 | static void atari_get_hardware_list(struct seq_file *m); |
67 | 68 | ||
68 | /* atari specific irq functions */ | 69 | /* atari specific irq functions */ |
69 | extern void atari_init_IRQ (void); | 70 | extern void atari_init_IRQ (void); |
@@ -231,7 +232,7 @@ void __init config_atari(void) | |||
231 | */ | 232 | */ |
232 | 233 | ||
233 | printk("Atari hardware found: "); | 234 | printk("Atari hardware found: "); |
234 | if (MACH_IS_MEDUSA || MACH_IS_HADES) { | 235 | if (MACH_IS_MEDUSA) { |
235 | /* There's no Atari video hardware on the Medusa, but all the | 236 | /* There's no Atari video hardware on the Medusa, but all the |
236 | * addresses below generate a DTACK so no bus error occurs! */ | 237 | * addresses below generate a DTACK so no bus error occurs! */ |
237 | } else if (hwreg_present(f030_xreg)) { | 238 | } else if (hwreg_present(f030_xreg)) { |
@@ -269,10 +270,6 @@ void __init config_atari(void) | |||
269 | ATARIHW_SET(SCSI_DMA); | 270 | ATARIHW_SET(SCSI_DMA); |
270 | printk("TT_SCSI_DMA "); | 271 | printk("TT_SCSI_DMA "); |
271 | } | 272 | } |
272 | if (!MACH_IS_HADES && hwreg_present(&st_dma.dma_hi)) { | ||
273 | ATARIHW_SET(STND_DMA); | ||
274 | printk("STND_DMA "); | ||
275 | } | ||
276 | /* | 273 | /* |
277 | * The ST-DMA address registers aren't readable | 274 | * The ST-DMA address registers aren't readable |
278 | * on all Medusas, so the test below may fail | 275 | * on all Medusas, so the test below may fail |
@@ -294,12 +291,11 @@ void __init config_atari(void) | |||
294 | ATARIHW_SET(YM_2149); | 291 | ATARIHW_SET(YM_2149); |
295 | printk("YM2149 "); | 292 | printk("YM2149 "); |
296 | } | 293 | } |
297 | if (!MACH_IS_MEDUSA && !MACH_IS_HADES && | 294 | if (!MACH_IS_MEDUSA && hwreg_present(&tt_dmasnd.ctrl)) { |
298 | hwreg_present(&tt_dmasnd.ctrl)) { | ||
299 | ATARIHW_SET(PCM_8BIT); | 295 | ATARIHW_SET(PCM_8BIT); |
300 | printk("PCM "); | 296 | printk("PCM "); |
301 | } | 297 | } |
302 | if (!MACH_IS_HADES && hwreg_present(&falcon_codec.unused5)) { | 298 | if (hwreg_present(&falcon_codec.unused5)) { |
303 | ATARIHW_SET(CODEC); | 299 | ATARIHW_SET(CODEC); |
304 | printk("CODEC "); | 300 | printk("CODEC "); |
305 | } | 301 | } |
@@ -313,7 +309,7 @@ void __init config_atari(void) | |||
313 | (tt_scc_dma.dma_ctrl = 0x01, (tt_scc_dma.dma_ctrl & 1) == 1) && | 309 | (tt_scc_dma.dma_ctrl = 0x01, (tt_scc_dma.dma_ctrl & 1) == 1) && |
314 | (tt_scc_dma.dma_ctrl = 0x00, (tt_scc_dma.dma_ctrl & 1) == 0) | 310 | (tt_scc_dma.dma_ctrl = 0x00, (tt_scc_dma.dma_ctrl & 1) == 0) |
315 | #else | 311 | #else |
316 | !MACH_IS_MEDUSA && !MACH_IS_HADES | 312 | !MACH_IS_MEDUSA |
317 | #endif | 313 | #endif |
318 | ) { | 314 | ) { |
319 | ATARIHW_SET(SCC_DMA); | 315 | ATARIHW_SET(SCC_DMA); |
@@ -327,10 +323,7 @@ void __init config_atari(void) | |||
327 | ATARIHW_SET(ST_ESCC); | 323 | ATARIHW_SET(ST_ESCC); |
328 | printk("ST_ESCC "); | 324 | printk("ST_ESCC "); |
329 | } | 325 | } |
330 | if (MACH_IS_HADES) { | 326 | if (hwreg_present(&tt_scu.sys_mask)) { |
331 | ATARIHW_SET(VME); | ||
332 | printk("VME "); | ||
333 | } else if (hwreg_present(&tt_scu.sys_mask)) { | ||
334 | ATARIHW_SET(SCU); | 327 | ATARIHW_SET(SCU); |
335 | /* Assume a VME bus if there's a SCU */ | 328 | /* Assume a VME bus if there's a SCU */ |
336 | ATARIHW_SET(VME); | 329 | ATARIHW_SET(VME); |
@@ -340,7 +333,7 @@ void __init config_atari(void) | |||
340 | ATARIHW_SET(ANALOG_JOY); | 333 | ATARIHW_SET(ANALOG_JOY); |
341 | printk("ANALOG_JOY "); | 334 | printk("ANALOG_JOY "); |
342 | } | 335 | } |
343 | if (!MACH_IS_HADES && hwreg_present(blitter.halftone)) { | 336 | if (hwreg_present(blitter.halftone)) { |
344 | ATARIHW_SET(BLITTER); | 337 | ATARIHW_SET(BLITTER); |
345 | printk("BLITTER "); | 338 | printk("BLITTER "); |
346 | } | 339 | } |
@@ -349,8 +342,7 @@ void __init config_atari(void) | |||
349 | printk("IDE "); | 342 | printk("IDE "); |
350 | } | 343 | } |
351 | #if 1 /* This maybe wrong */ | 344 | #if 1 /* This maybe wrong */ |
352 | if (!MACH_IS_MEDUSA && !MACH_IS_HADES && | 345 | if (!MACH_IS_MEDUSA && hwreg_present(&tt_microwire.data) && |
353 | hwreg_present(&tt_microwire.data) && | ||
354 | hwreg_present(&tt_microwire.mask) && | 346 | hwreg_present(&tt_microwire.mask) && |
355 | (tt_microwire.mask = 0x7ff, | 347 | (tt_microwire.mask = 0x7ff, |
356 | udelay(1), | 348 | udelay(1), |
@@ -369,19 +361,18 @@ void __init config_atari(void) | |||
369 | mach_hwclk = atari_tt_hwclk; | 361 | mach_hwclk = atari_tt_hwclk; |
370 | mach_set_clock_mmss = atari_tt_set_clock_mmss; | 362 | mach_set_clock_mmss = atari_tt_set_clock_mmss; |
371 | } | 363 | } |
372 | if (!MACH_IS_HADES && hwreg_present(&mste_rtc.sec_ones)) { | 364 | if (hwreg_present(&mste_rtc.sec_ones)) { |
373 | ATARIHW_SET(MSTE_CLK); | 365 | ATARIHW_SET(MSTE_CLK); |
374 | printk("MSTE_CLK "); | 366 | printk("MSTE_CLK "); |
375 | mach_hwclk = atari_mste_hwclk; | 367 | mach_hwclk = atari_mste_hwclk; |
376 | mach_set_clock_mmss = atari_mste_set_clock_mmss; | 368 | mach_set_clock_mmss = atari_mste_set_clock_mmss; |
377 | } | 369 | } |
378 | if (!MACH_IS_MEDUSA && !MACH_IS_HADES && | 370 | if (!MACH_IS_MEDUSA && hwreg_present(&dma_wd.fdc_speed) && |
379 | hwreg_present(&dma_wd.fdc_speed) && | ||
380 | hwreg_write(&dma_wd.fdc_speed, 0)) { | 371 | hwreg_write(&dma_wd.fdc_speed, 0)) { |
381 | ATARIHW_SET(FDCSPEED); | 372 | ATARIHW_SET(FDCSPEED); |
382 | printk("FDC_SPEED "); | 373 | printk("FDC_SPEED "); |
383 | } | 374 | } |
384 | if (!MACH_IS_HADES && !ATARIHW_PRESENT(ST_SCSI)) { | 375 | if (!ATARIHW_PRESENT(ST_SCSI)) { |
385 | ATARIHW_SET(ACSI); | 376 | ATARIHW_SET(ACSI); |
386 | printk("ACSI "); | 377 | printk("ACSI "); |
387 | } | 378 | } |
@@ -449,7 +440,7 @@ void __init config_atari(void) | |||
449 | * 0xFFxxxxxx -> 0x00xxxxxx, so that the first 16MB is accessible | 440 | * 0xFFxxxxxx -> 0x00xxxxxx, so that the first 16MB is accessible |
450 | * in the last 16MB of the address space. | 441 | * in the last 16MB of the address space. |
451 | */ | 442 | */ |
452 | tos_version = (MACH_IS_MEDUSA || MACH_IS_HADES) ? | 443 | tos_version = (MACH_IS_MEDUSA) ? |
453 | 0xfff : *(unsigned short *)0xff000002; | 444 | 0xfff : *(unsigned short *)0xff000002; |
454 | atari_rtc_year_offset = (tos_version < 0x306) ? 70 : 68; | 445 | atari_rtc_year_offset = (tos_version < 0x306) ? 70 : 68; |
455 | } | 446 | } |
@@ -511,8 +502,7 @@ static void atari_reset(void) | |||
511 | * On the Medusa, phys. 0x4 may contain garbage because it's no | 502 | * On the Medusa, phys. 0x4 may contain garbage because it's no |
512 | * ROM. See above for explanation why we cannot use PTOV(4). | 503 | * ROM. See above for explanation why we cannot use PTOV(4). |
513 | */ | 504 | */ |
514 | reset_addr = MACH_IS_HADES ? 0x7fe00030 : | 505 | reset_addr = MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 : |
515 | MACH_IS_MEDUSA || MACH_IS_AB40 ? 0xe00030 : | ||
516 | *(unsigned long *) 0xff000004; | 506 | *(unsigned long *) 0xff000004; |
517 | 507 | ||
518 | /* reset ACIA for switch off OverScan, if it's active */ | 508 | /* reset ACIA for switch off OverScan, if it's active */ |
@@ -606,8 +596,6 @@ static void atari_get_model(char *model) | |||
606 | if (MACH_IS_MEDUSA) | 596 | if (MACH_IS_MEDUSA) |
607 | /* Medusa has TT _MCH cookie */ | 597 | /* Medusa has TT _MCH cookie */ |
608 | strcat(model, "Medusa"); | 598 | strcat(model, "Medusa"); |
609 | else if (MACH_IS_HADES) | ||
610 | strcat(model, "Hades"); | ||
611 | else | 599 | else |
612 | strcat(model, "TT"); | 600 | strcat(model, "TT"); |
613 | break; | 601 | break; |
@@ -624,21 +612,21 @@ static void atari_get_model(char *model) | |||
624 | } | 612 | } |
625 | 613 | ||
626 | 614 | ||
627 | static int atari_get_hardware_list(char *buffer) | 615 | static void atari_get_hardware_list(struct seq_file *m) |
628 | { | 616 | { |
629 | int len = 0, i; | 617 | int i; |
630 | 618 | ||
631 | for (i = 0; i < m68k_num_memory; i++) | 619 | for (i = 0; i < m68k_num_memory; i++) |
632 | len += sprintf(buffer+len, "\t%3ld MB at 0x%08lx (%s)\n", | 620 | seq_printf(m, "\t%3ld MB at 0x%08lx (%s)\n", |
633 | m68k_memory[i].size >> 20, m68k_memory[i].addr, | 621 | m68k_memory[i].size >> 20, m68k_memory[i].addr, |
634 | (m68k_memory[i].addr & 0xff000000 ? | 622 | (m68k_memory[i].addr & 0xff000000 ? |
635 | "alternate RAM" : "ST-RAM")); | 623 | "alternate RAM" : "ST-RAM")); |
636 | 624 | ||
637 | #define ATARIHW_ANNOUNCE(name, str) \ | 625 | #define ATARIHW_ANNOUNCE(name, str) \ |
638 | if (ATARIHW_PRESENT(name)) \ | 626 | if (ATARIHW_PRESENT(name)) \ |
639 | len += sprintf(buffer + len, "\t%s\n", str) | 627 | seq_printf(m, "\t%s\n", str) |
640 | 628 | ||
641 | len += sprintf(buffer + len, "Detected hardware:\n"); | 629 | seq_printf(m, "Detected hardware:\n"); |
642 | ATARIHW_ANNOUNCE(STND_SHIFTER, "ST Shifter"); | 630 | ATARIHW_ANNOUNCE(STND_SHIFTER, "ST Shifter"); |
643 | ATARIHW_ANNOUNCE(EXTD_SHIFTER, "STe Shifter"); | 631 | ATARIHW_ANNOUNCE(EXTD_SHIFTER, "STe Shifter"); |
644 | ATARIHW_ANNOUNCE(TT_SHIFTER, "TT Shifter"); | 632 | ATARIHW_ANNOUNCE(TT_SHIFTER, "TT Shifter"); |
@@ -667,6 +655,4 @@ static int atari_get_hardware_list(char *buffer) | |||
667 | ATARIHW_ANNOUNCE(BLITTER, "Blitter"); | 655 | ATARIHW_ANNOUNCE(BLITTER, "Blitter"); |
668 | ATARIHW_ANNOUNCE(VME, "VME Bus"); | 656 | ATARIHW_ANNOUNCE(VME, "VME Bus"); |
669 | ATARIHW_ANNOUNCE(DSP56K, "DSP56001 processor"); | 657 | ATARIHW_ANNOUNCE(DSP56K, "DSP56001 processor"); |
670 | |||
671 | return len; | ||
672 | } | 658 | } |
diff --git a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c deleted file mode 100644 index 2bbabc008708..000000000000 --- a/arch/m68k/atari/hades-pci.c +++ /dev/null | |||
@@ -1,440 +0,0 @@ | |||
1 | /* | ||
2 | * hades-pci.c - Hardware specific PCI BIOS functions the Hades Atari clone. | ||
3 | * | ||
4 | * Written by Wout Klaren. | ||
5 | */ | ||
6 | |||
7 | #include <linux/init.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <asm/io.h> | ||
10 | |||
11 | #if 0 | ||
12 | # define DBG_DEVS(args) printk args | ||
13 | #else | ||
14 | # define DBG_DEVS(args) | ||
15 | #endif | ||
16 | |||
17 | #if defined(CONFIG_PCI) && defined(CONFIG_HADES) | ||
18 | |||
19 | #include <linux/slab.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/pci.h> | ||
22 | |||
23 | #include <asm/atarihw.h> | ||
24 | #include <asm/atariints.h> | ||
25 | #include <asm/byteorder.h> | ||
26 | #include <asm/pci.h> | ||
27 | |||
28 | #define HADES_MEM_BASE 0x80000000 | ||
29 | #define HADES_MEM_SIZE 0x20000000 | ||
30 | #define HADES_CONFIG_BASE 0xA0000000 | ||
31 | #define HADES_CONFIG_SIZE 0x10000000 | ||
32 | #define HADES_IO_BASE 0xB0000000 | ||
33 | #define HADES_IO_SIZE 0x10000000 | ||
34 | #define HADES_VIRT_IO_SIZE 0x00010000 /* Only 64k is remapped and actually used. */ | ||
35 | |||
36 | #define N_SLOTS 4 /* Number of PCI slots. */ | ||
37 | |||
38 | static const char pci_mem_name[] = "PCI memory space"; | ||
39 | static const char pci_io_name[] = "PCI I/O space"; | ||
40 | static const char pci_config_name[] = "PCI config space"; | ||
41 | |||
42 | static struct resource config_space = { | ||
43 | .name = pci_config_name, | ||
44 | .start = HADES_CONFIG_BASE, | ||
45 | .end = HADES_CONFIG_BASE + HADES_CONFIG_SIZE - 1 | ||
46 | }; | ||
47 | static struct resource io_space = { | ||
48 | .name = pci_io_name, | ||
49 | .start = HADES_IO_BASE, | ||
50 | .end = HADES_IO_BASE + HADES_IO_SIZE - 1 | ||
51 | }; | ||
52 | |||
53 | static const unsigned long pci_conf_base_phys[] = { | ||
54 | 0xA0080000, 0xA0040000, 0xA0020000, 0xA0010000 | ||
55 | }; | ||
56 | static unsigned long pci_conf_base_virt[N_SLOTS]; | ||
57 | static unsigned long pci_io_base_virt; | ||
58 | |||
59 | /* | ||
60 | * static void *mk_conf_addr(unsigned char bus, unsigned char device_fn, | ||
61 | * unsigned char where) | ||
62 | * | ||
63 | * Calculate the address of the PCI configuration area of the given | ||
64 | * device. | ||
65 | * | ||
66 | * BUG: boards with multiple functions are probably not correctly | ||
67 | * supported. | ||
68 | */ | ||
69 | |||
70 | static void *mk_conf_addr(struct pci_dev *dev, int where) | ||
71 | { | ||
72 | int device = dev->devfn >> 3, function = dev->devfn & 7; | ||
73 | void *result; | ||
74 | |||
75 | DBG_DEVS(("mk_conf_addr(bus=%d ,device_fn=0x%x, where=0x%x, pci_addr=0x%p)\n", | ||
76 | dev->bus->number, dev->devfn, where, pci_addr)); | ||
77 | |||
78 | if (device > 3) | ||
79 | { | ||
80 | DBG_DEVS(("mk_conf_addr: device (%d) > 3, returning NULL\n", device)); | ||
81 | return NULL; | ||
82 | } | ||
83 | |||
84 | if (dev->bus->number != 0) | ||
85 | { | ||
86 | DBG_DEVS(("mk_conf_addr: bus (%d) > 0, returning NULL\n", device)); | ||
87 | return NULL; | ||
88 | } | ||
89 | |||
90 | result = (void *) (pci_conf_base_virt[device] | (function << 8) | (where)); | ||
91 | DBG_DEVS(("mk_conf_addr: returning pci_addr 0x%lx\n", (unsigned long) result)); | ||
92 | return result; | ||
93 | } | ||
94 | |||
95 | static int hades_read_config_byte(struct pci_dev *dev, int where, u8 *value) | ||
96 | { | ||
97 | volatile unsigned char *pci_addr; | ||
98 | |||
99 | *value = 0xff; | ||
100 | |||
101 | if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL) | ||
102 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
103 | |||
104 | *value = *pci_addr; | ||
105 | |||
106 | return PCIBIOS_SUCCESSFUL; | ||
107 | } | ||
108 | |||
109 | static int hades_read_config_word(struct pci_dev *dev, int where, u16 *value) | ||
110 | { | ||
111 | volatile unsigned short *pci_addr; | ||
112 | |||
113 | *value = 0xffff; | ||
114 | |||
115 | if (where & 0x1) | ||
116 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
117 | |||
118 | if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL) | ||
119 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
120 | |||
121 | *value = le16_to_cpu(*pci_addr); | ||
122 | |||
123 | return PCIBIOS_SUCCESSFUL; | ||
124 | } | ||
125 | |||
126 | static int hades_read_config_dword(struct pci_dev *dev, int where, u32 *value) | ||
127 | { | ||
128 | volatile unsigned int *pci_addr; | ||
129 | unsigned char header_type; | ||
130 | int result; | ||
131 | |||
132 | *value = 0xffffffff; | ||
133 | |||
134 | if (where & 0x3) | ||
135 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
136 | |||
137 | if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL) | ||
138 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
139 | |||
140 | *value = le32_to_cpu(*pci_addr); | ||
141 | |||
142 | /* | ||
143 | * Check if the value is an address on the bus. If true, add the | ||
144 | * base address of the PCI memory or PCI I/O area on the Hades. | ||
145 | */ | ||
146 | |||
147 | if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE, | ||
148 | &header_type)) != PCIBIOS_SUCCESSFUL) | ||
149 | return result; | ||
150 | |||
151 | if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) || | ||
152 | ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) && | ||
153 | (where <= PCI_BASE_ADDRESS_5)))) | ||
154 | { | ||
155 | if ((*value & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) | ||
156 | { | ||
157 | /* | ||
158 | * Base address register that contains an I/O address. If the | ||
159 | * address is valid on the Hades (0 <= *value < HADES_VIRT_IO_SIZE), | ||
160 | * add 'pci_io_base_virt' to the value. | ||
161 | */ | ||
162 | |||
163 | if (*value < HADES_VIRT_IO_SIZE) | ||
164 | *value += pci_io_base_virt; | ||
165 | } | ||
166 | else | ||
167 | { | ||
168 | /* | ||
169 | * Base address register that contains an memory address. If the | ||
170 | * address is valid on the Hades (0 <= *value < HADES_MEM_SIZE), | ||
171 | * add HADES_MEM_BASE to the value. | ||
172 | */ | ||
173 | |||
174 | if (*value == 0) | ||
175 | { | ||
176 | /* | ||
177 | * Base address is 0. Test if this base | ||
178 | * address register is used. | ||
179 | */ | ||
180 | |||
181 | *pci_addr = 0xffffffff; | ||
182 | if (*pci_addr != 0) | ||
183 | { | ||
184 | *pci_addr = *value; | ||
185 | if (*value < HADES_MEM_SIZE) | ||
186 | *value += HADES_MEM_BASE; | ||
187 | } | ||
188 | } | ||
189 | else | ||
190 | { | ||
191 | if (*value < HADES_MEM_SIZE) | ||
192 | *value += HADES_MEM_BASE; | ||
193 | } | ||
194 | } | ||
195 | } | ||
196 | |||
197 | return PCIBIOS_SUCCESSFUL; | ||
198 | } | ||
199 | |||
200 | static int hades_write_config_byte(struct pci_dev *dev, int where, u8 value) | ||
201 | { | ||
202 | volatile unsigned char *pci_addr; | ||
203 | |||
204 | if ((pci_addr = (unsigned char *) mk_conf_addr(dev, where)) == NULL) | ||
205 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
206 | |||
207 | *pci_addr = value; | ||
208 | |||
209 | return PCIBIOS_SUCCESSFUL; | ||
210 | } | ||
211 | |||
212 | static int hades_write_config_word(struct pci_dev *dev, int where, u16 value) | ||
213 | { | ||
214 | volatile unsigned short *pci_addr; | ||
215 | |||
216 | if ((pci_addr = (unsigned short *) mk_conf_addr(dev, where)) == NULL) | ||
217 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
218 | |||
219 | *pci_addr = cpu_to_le16(value); | ||
220 | |||
221 | return PCIBIOS_SUCCESSFUL; | ||
222 | } | ||
223 | |||
224 | static int hades_write_config_dword(struct pci_dev *dev, int where, u32 value) | ||
225 | { | ||
226 | volatile unsigned int *pci_addr; | ||
227 | unsigned char header_type; | ||
228 | int result; | ||
229 | |||
230 | if ((pci_addr = (unsigned int *) mk_conf_addr(dev, where)) == NULL) | ||
231 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
232 | |||
233 | /* | ||
234 | * Check if the value is an address on the bus. If true, subtract the | ||
235 | * base address of the PCI memory or PCI I/O area on the Hades. | ||
236 | */ | ||
237 | |||
238 | if ((result = hades_read_config_byte(dev, PCI_HEADER_TYPE, | ||
239 | &header_type)) != PCIBIOS_SUCCESSFUL) | ||
240 | return result; | ||
241 | |||
242 | if (((where >= PCI_BASE_ADDRESS_0) && (where <= PCI_BASE_ADDRESS_1)) || | ||
243 | ((header_type != PCI_HEADER_TYPE_BRIDGE) && ((where >= PCI_BASE_ADDRESS_2) && | ||
244 | (where <= PCI_BASE_ADDRESS_5)))) | ||
245 | { | ||
246 | if ((value & PCI_BASE_ADDRESS_SPACE) == | ||
247 | PCI_BASE_ADDRESS_SPACE_IO) | ||
248 | { | ||
249 | /* | ||
250 | * I/O address. Check if the address is valid address on | ||
251 | * the Hades (pci_io_base_virt <= value < pci_io_base_virt + | ||
252 | * HADES_VIRT_IO_SIZE) or if the value is 0xffffffff. If not | ||
253 | * true do not write the base address register. If it is a | ||
254 | * valid base address subtract 'pci_io_base_virt' from the value. | ||
255 | */ | ||
256 | |||
257 | if ((value >= pci_io_base_virt) && (value < (pci_io_base_virt + | ||
258 | HADES_VIRT_IO_SIZE))) | ||
259 | value -= pci_io_base_virt; | ||
260 | else | ||
261 | { | ||
262 | if (value != 0xffffffff) | ||
263 | return PCIBIOS_SET_FAILED; | ||
264 | } | ||
265 | } | ||
266 | else | ||
267 | { | ||
268 | /* | ||
269 | * Memory address. Check if the address is valid address on | ||
270 | * the Hades (HADES_MEM_BASE <= value < HADES_MEM_BASE + HADES_MEM_SIZE) or | ||
271 | * if the value is 0xffffffff. If not true do not write | ||
272 | * the base address register. If it is a valid base address | ||
273 | * subtract HADES_MEM_BASE from the value. | ||
274 | */ | ||
275 | |||
276 | if ((value >= HADES_MEM_BASE) && (value < (HADES_MEM_BASE + HADES_MEM_SIZE))) | ||
277 | value -= HADES_MEM_BASE; | ||
278 | else | ||
279 | { | ||
280 | if (value != 0xffffffff) | ||
281 | return PCIBIOS_SET_FAILED; | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | |||
286 | *pci_addr = cpu_to_le32(value); | ||
287 | |||
288 | return PCIBIOS_SUCCESSFUL; | ||
289 | } | ||
290 | |||
291 | /* | ||
292 | * static inline void hades_fixup(void) | ||
293 | * | ||
294 | * Assign IRQ numbers as used by Linux to the interrupt pins | ||
295 | * of the PCI cards. | ||
296 | */ | ||
297 | |||
298 | static void __init hades_fixup(int pci_modify) | ||
299 | { | ||
300 | char irq_tab[4] = { | ||
301 | [0] = IRQ_TT_MFP_IO0, /* Slot 0. */ | ||
302 | [1] = IRQ_TT_MFP_IO1, /* Slot 1. */ | ||
303 | [2] = IRQ_TT_MFP_SCC, /* Slot 2. */ | ||
304 | [3] = IRQ_TT_MFP_SCSIDMA /* Slot 3. */ | ||
305 | }; | ||
306 | struct pci_dev *dev = NULL; | ||
307 | unsigned char slot; | ||
308 | |||
309 | /* | ||
310 | * Go through all devices, fixing up irqs as we see fit: | ||
311 | */ | ||
312 | |||
313 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) | ||
314 | { | ||
315 | if (dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) | ||
316 | { | ||
317 | slot = PCI_SLOT(dev->devfn); /* Determine slot number. */ | ||
318 | dev->irq = irq_tab[slot]; | ||
319 | if (pci_modify) | ||
320 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | ||
321 | } | ||
322 | } | ||
323 | } | ||
324 | |||
325 | /* | ||
326 | * static void hades_conf_device(struct pci_dev *dev) | ||
327 | * | ||
328 | * Machine dependent Configure the given device. | ||
329 | * | ||
330 | * Parameters: | ||
331 | * | ||
332 | * dev - the pci device. | ||
333 | */ | ||
334 | |||
335 | static void __init hades_conf_device(struct pci_dev *dev) | ||
336 | { | ||
337 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 0); | ||
338 | } | ||
339 | |||
340 | static struct pci_ops hades_pci_ops = { | ||
341 | .read_byte = hades_read_config_byte, | ||
342 | .read_word = hades_read_config_word, | ||
343 | .read_dword = hades_read_config_dword, | ||
344 | .write_byte = hades_write_config_byte, | ||
345 | .write_word = hades_write_config_word, | ||
346 | .write_dword = hades_write_config_dword | ||
347 | }; | ||
348 | |||
349 | /* | ||
350 | * struct pci_bus_info *init_hades_pci(void) | ||
351 | * | ||
352 | * Machine specific initialisation: | ||
353 | * | ||
354 | * - Allocate and initialise a 'pci_bus_info' structure | ||
355 | * - Initialise hardware | ||
356 | * | ||
357 | * Result: pointer to 'pci_bus_info' structure. | ||
358 | */ | ||
359 | |||
360 | struct pci_bus_info * __init init_hades_pci(void) | ||
361 | { | ||
362 | struct pci_bus_info *bus; | ||
363 | int i; | ||
364 | |||
365 | /* | ||
366 | * Remap I/O and configuration space. | ||
367 | */ | ||
368 | |||
369 | pci_io_base_virt = (unsigned long) ioremap(HADES_IO_BASE, HADES_VIRT_IO_SIZE); | ||
370 | |||
371 | for (i = 0; i < N_SLOTS; i++) | ||
372 | pci_conf_base_virt[i] = (unsigned long) ioremap(pci_conf_base_phys[i], 0x10000); | ||
373 | |||
374 | /* | ||
375 | * Allocate memory for bus info structure. | ||
376 | */ | ||
377 | |||
378 | bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL); | ||
379 | if (unlikely(!bus)) | ||
380 | goto iounmap_base_virt; | ||
381 | |||
382 | /* | ||
383 | * Claim resources. The m68k has no separate I/O space, both | ||
384 | * PCI memory space and PCI I/O space are in memory space. Therefore | ||
385 | * the I/O resources are requested in memory space as well. | ||
386 | */ | ||
387 | |||
388 | if (unlikely(request_resource(&iomem_resource, &config_space) != 0)) | ||
389 | goto free_bus; | ||
390 | |||
391 | if (unlikely(request_resource(&iomem_resource, &io_space) != 0)) | ||
392 | goto release_config_space; | ||
393 | |||
394 | bus->mem_space.start = HADES_MEM_BASE; | ||
395 | bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1; | ||
396 | bus->mem_space.name = pci_mem_name; | ||
397 | #if 1 | ||
398 | if (unlikely(request_resource(&iomem_resource, &bus->mem_space) != 0)) | ||
399 | goto release_io_space; | ||
400 | #endif | ||
401 | bus->io_space.start = pci_io_base_virt; | ||
402 | bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1; | ||
403 | bus->io_space.name = pci_io_name; | ||
404 | #if 1 | ||
405 | if (unlikely(request_resource(&ioport_resource, &bus->io_space) != 0)) | ||
406 | goto release_bus_mem_space; | ||
407 | #endif | ||
408 | /* | ||
409 | * Set hardware dependent functions. | ||
410 | */ | ||
411 | |||
412 | bus->m68k_pci_ops = &hades_pci_ops; | ||
413 | bus->fixup = hades_fixup; | ||
414 | bus->conf_device = hades_conf_device; | ||
415 | |||
416 | /* | ||
417 | * Select high to low edge for PCI interrupts. | ||
418 | */ | ||
419 | |||
420 | tt_mfp.active_edge &= ~0x27; | ||
421 | |||
422 | return bus; | ||
423 | |||
424 | release_bus_mem_space: | ||
425 | release_resource(&bus->mem_space); | ||
426 | release_io_space: | ||
427 | release_resource(&io_space); | ||
428 | release_config_space: | ||
429 | release_resource(&config_space); | ||
430 | free_bus: | ||
431 | kfree(bus); | ||
432 | iounmap_base_virt: | ||
433 | iounmap((void *)pci_io_base_virt); | ||
434 | |||
435 | for (i = 0; i < N_SLOTS; i++) | ||
436 | iounmap((void *)pci_conf_base_virt[i]); | ||
437 | |||
438 | return NULL; | ||
439 | } | ||
440 | #endif | ||
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index 04c69ffbea71..6ec3b7f33779 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c | |||
@@ -42,6 +42,7 @@ | |||
42 | /* abbrev for the && above... */ | 42 | /* abbrev for the && above... */ |
43 | #define DO_PROC | 43 | #define DO_PROC |
44 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
45 | #include <linux/seq_file.h> | ||
45 | #endif | 46 | #endif |
46 | 47 | ||
47 | /* | 48 | /* |
@@ -323,19 +324,16 @@ static int remove_region( BLOCK *block ) | |||
323 | 324 | ||
324 | #ifdef DO_PROC | 325 | #ifdef DO_PROC |
325 | 326 | ||
326 | #define PRINT_PROC(fmt,args...) len += sprintf( buf+len, fmt, ##args ) | 327 | #define PRINT_PROC(fmt,args...) seq_printf( m, fmt, ##args ) |
327 | 328 | ||
328 | int get_stram_list( char *buf ) | 329 | static int stram_proc_show(struct seq_file *m, void *v) |
329 | { | 330 | { |
330 | int len = 0; | ||
331 | BLOCK *p; | 331 | BLOCK *p; |
332 | 332 | ||
333 | PRINT_PROC("Total ST-RAM: %8u kB\n", | 333 | PRINT_PROC("Total ST-RAM: %8u kB\n", |
334 | (stram_end - stram_start) >> 10); | 334 | (stram_end - stram_start) >> 10); |
335 | PRINT_PROC( "Allocated regions:\n" ); | 335 | PRINT_PROC( "Allocated regions:\n" ); |
336 | for( p = alloc_list; p; p = p->next ) { | 336 | for( p = alloc_list; p; p = p->next ) { |
337 | if (len + 50 >= PAGE_SIZE) | ||
338 | break; | ||
339 | PRINT_PROC("0x%08lx-0x%08lx: %s (", | 337 | PRINT_PROC("0x%08lx-0x%08lx: %s (", |
340 | virt_to_phys(p->start), | 338 | virt_to_phys(p->start), |
341 | virt_to_phys(p->start+p->size-1), | 339 | virt_to_phys(p->start+p->size-1), |
@@ -346,9 +344,27 @@ int get_stram_list( char *buf ) | |||
346 | PRINT_PROC( "??)\n" ); | 344 | PRINT_PROC( "??)\n" ); |
347 | } | 345 | } |
348 | 346 | ||
349 | return( len ); | 347 | return 0; |
348 | } | ||
349 | |||
350 | static int stram_proc_open(struct inode *inode, struct file *file) | ||
351 | { | ||
352 | return single_open(file, stram_proc_show, NULL); | ||
350 | } | 353 | } |
351 | 354 | ||
355 | static const struct file_operations stram_proc_fops = { | ||
356 | .open = stram_proc_open, | ||
357 | .read = seq_read, | ||
358 | .llseek = seq_lseek, | ||
359 | .release = single_release, | ||
360 | }; | ||
361 | |||
362 | static int __init proc_stram_init(void) | ||
363 | { | ||
364 | proc_create("stram", 0, NULL, &stram_proc_fops); | ||
365 | return 0; | ||
366 | } | ||
367 | module_init(proc_stram_init); | ||
352 | #endif | 368 | #endif |
353 | 369 | ||
354 | 370 | ||
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index e0d3c8bfb408..1edde27fa32d 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c | |||
@@ -20,6 +20,9 @@ | |||
20 | 20 | ||
21 | #include <asm/atariints.h> | 21 | #include <asm/atariints.h> |
22 | 22 | ||
23 | DEFINE_SPINLOCK(rtc_lock); | ||
24 | EXPORT_SYMBOL_GPL(rtc_lock); | ||
25 | |||
23 | void __init | 26 | void __init |
24 | atari_sched_init(irq_handler_t timer_routine) | 27 | atari_sched_init(irq_handler_t timer_routine) |
25 | { | 28 | { |
@@ -191,13 +194,14 @@ int atari_tt_hwclk( int op, struct rtc_time *t ) | |||
191 | } | 194 | } |
192 | 195 | ||
193 | if (!(ctrl & RTC_DM_BINARY)) { | 196 | if (!(ctrl & RTC_DM_BINARY)) { |
194 | BIN_TO_BCD(sec); | 197 | sec = bin2bcd(sec); |
195 | BIN_TO_BCD(min); | 198 | min = bin2bcd(min); |
196 | BIN_TO_BCD(hour); | 199 | hour = bin2bcd(hour); |
197 | BIN_TO_BCD(day); | 200 | day = bin2bcd(day); |
198 | BIN_TO_BCD(mon); | 201 | mon = bin2bcd(mon); |
199 | BIN_TO_BCD(year); | 202 | year = bin2bcd(year); |
200 | if (wday >= 0) BIN_TO_BCD(wday); | 203 | if (wday >= 0) |
204 | wday = bin2bcd(wday); | ||
201 | } | 205 | } |
202 | } | 206 | } |
203 | 207 | ||
@@ -252,13 +256,13 @@ int atari_tt_hwclk( int op, struct rtc_time *t ) | |||
252 | } | 256 | } |
253 | 257 | ||
254 | if (!(ctrl & RTC_DM_BINARY)) { | 258 | if (!(ctrl & RTC_DM_BINARY)) { |
255 | BCD_TO_BIN(sec); | 259 | sec = bcd2bin(sec); |
256 | BCD_TO_BIN(min); | 260 | min = bcd2bin(min); |
257 | BCD_TO_BIN(hour); | 261 | hour = bcd2bin(hour); |
258 | BCD_TO_BIN(day); | 262 | day = bcd2bin(day); |
259 | BCD_TO_BIN(mon); | 263 | mon = bcd2bin(mon); |
260 | BCD_TO_BIN(year); | 264 | year = bcd2bin(year); |
261 | BCD_TO_BIN(wday); | 265 | wday = bcd2bin(wday); |
262 | } | 266 | } |
263 | 267 | ||
264 | if (!(ctrl & RTC_24H)) { | 268 | if (!(ctrl & RTC_24H)) { |
@@ -318,7 +322,7 @@ int atari_tt_set_clock_mmss (unsigned long nowtime) | |||
318 | 322 | ||
319 | rtc_minutes = RTC_READ (RTC_MINUTES); | 323 | rtc_minutes = RTC_READ (RTC_MINUTES); |
320 | if (!(save_control & RTC_DM_BINARY)) | 324 | if (!(save_control & RTC_DM_BINARY)) |
321 | BCD_TO_BIN (rtc_minutes); | 325 | rtc_minutes = bcd2bin(rtc_minutes); |
322 | 326 | ||
323 | /* Since we're only adjusting minutes and seconds, don't interfere | 327 | /* Since we're only adjusting minutes and seconds, don't interfere |
324 | with hour overflow. This avoids messing with unknown time zones | 328 | with hour overflow. This avoids messing with unknown time zones |
@@ -329,8 +333,8 @@ int atari_tt_set_clock_mmss (unsigned long nowtime) | |||
329 | { | 333 | { |
330 | if (!(save_control & RTC_DM_BINARY)) | 334 | if (!(save_control & RTC_DM_BINARY)) |
331 | { | 335 | { |
332 | BIN_TO_BCD (real_seconds); | 336 | real_seconds = bin2bcd(real_seconds); |
333 | BIN_TO_BCD (real_minutes); | 337 | real_minutes = bin2bcd(real_minutes); |
334 | } | 338 | } |
335 | RTC_WRITE (RTC_SECONDS, real_seconds); | 339 | RTC_WRITE (RTC_SECONDS, real_seconds); |
336 | RTC_WRITE (RTC_MINUTES, real_minutes); | 340 | RTC_WRITE (RTC_MINUTES, real_minutes); |
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index 9433a88a33c4..c072595928c0 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/genhd.h> | 25 | #include <linux/genhd.h> |
26 | #include <linux/rtc.h> | 26 | #include <linux/rtc.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/bcd.h> | ||
28 | 29 | ||
29 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <asm/bvme6000hw.h> | 38 | #include <asm/bvme6000hw.h> |
38 | 39 | ||
39 | static void bvme6000_get_model(char *model); | 40 | static void bvme6000_get_model(char *model); |
40 | static int bvme6000_get_hardware_list(char *buffer); | ||
41 | extern void bvme6000_sched_init(irq_handler_t handler); | 41 | extern void bvme6000_sched_init(irq_handler_t handler); |
42 | extern unsigned long bvme6000_gettimeoffset (void); | 42 | extern unsigned long bvme6000_gettimeoffset (void); |
43 | extern int bvme6000_hwclk (int, struct rtc_time *); | 43 | extern int bvme6000_hwclk (int, struct rtc_time *); |
@@ -46,9 +46,6 @@ extern void bvme6000_reset (void); | |||
46 | extern void bvme6000_waitbut(void); | 46 | extern void bvme6000_waitbut(void); |
47 | void bvme6000_set_vectors (void); | 47 | void bvme6000_set_vectors (void); |
48 | 48 | ||
49 | static unsigned char bcd2bin (unsigned char b); | ||
50 | static unsigned char bin2bcd (unsigned char b); | ||
51 | |||
52 | /* Save tick handler routine pointer, will point to do_timer() in | 49 | /* Save tick handler routine pointer, will point to do_timer() in |
53 | * kernel/sched.c, called via bvme6000_process_int() */ | 50 | * kernel/sched.c, called via bvme6000_process_int() */ |
54 | 51 | ||
@@ -84,15 +81,6 @@ static void bvme6000_get_model(char *model) | |||
84 | sprintf(model, "BVME%d000", m68k_cputype == CPU_68060 ? 6 : 4); | 81 | sprintf(model, "BVME%d000", m68k_cputype == CPU_68060 ? 6 : 4); |
85 | } | 82 | } |
86 | 83 | ||
87 | |||
88 | /* No hardware options on BVME6000? */ | ||
89 | |||
90 | static int bvme6000_get_hardware_list(char *buffer) | ||
91 | { | ||
92 | *buffer = '\0'; | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | /* | 84 | /* |
97 | * This function is called during kernel startup to initialize | 85 | * This function is called during kernel startup to initialize |
98 | * the bvme6000 IRQ handling routines. | 86 | * the bvme6000 IRQ handling routines. |
@@ -129,7 +117,6 @@ void __init config_bvme6000(void) | |||
129 | mach_set_clock_mmss = bvme6000_set_clock_mmss; | 117 | mach_set_clock_mmss = bvme6000_set_clock_mmss; |
130 | mach_reset = bvme6000_reset; | 118 | mach_reset = bvme6000_reset; |
131 | mach_get_model = bvme6000_get_model; | 119 | mach_get_model = bvme6000_get_model; |
132 | mach_get_hardware_list = bvme6000_get_hardware_list; | ||
133 | 120 | ||
134 | printk ("Board is %sconfigured as a System Controller\n", | 121 | printk ("Board is %sconfigured as a System Controller\n", |
135 | *config_reg_ptr & BVME_CONFIG_SW1 ? "" : "not "); | 122 | *config_reg_ptr & BVME_CONFIG_SW1 ? "" : "not "); |
@@ -264,17 +251,6 @@ unsigned long bvme6000_gettimeoffset (void) | |||
264 | return v; | 251 | return v; |
265 | } | 252 | } |
266 | 253 | ||
267 | static unsigned char bcd2bin (unsigned char b) | ||
268 | { | ||
269 | return ((b>>4)*10 + (b&15)); | ||
270 | } | ||
271 | |||
272 | static unsigned char bin2bcd (unsigned char b) | ||
273 | { | ||
274 | return (((b/10)*16) + (b%10)); | ||
275 | } | ||
276 | |||
277 | |||
278 | /* | 254 | /* |
279 | * Looks like op is non-zero for setting the clock, and zero for | 255 | * Looks like op is non-zero for setting the clock, and zero for |
280 | * reading the clock. | 256 | * reading the clock. |
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index e8ac3f7d72df..c50bec8aabb1 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ | 20 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ |
21 | #include <linux/smp_lock.h> | ||
22 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
23 | #include <asm/bvme6000hw.h> | 22 | #include <asm/bvme6000hw.h> |
24 | 23 | ||
@@ -57,16 +56,16 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
57 | rtc->msr = 0x40; | 56 | rtc->msr = 0x40; |
58 | memset(&wtime, 0, sizeof(struct rtc_time)); | 57 | memset(&wtime, 0, sizeof(struct rtc_time)); |
59 | do { | 58 | do { |
60 | wtime.tm_sec = BCD2BIN(rtc->bcd_sec); | 59 | wtime.tm_sec = bcd2bin(rtc->bcd_sec); |
61 | wtime.tm_min = BCD2BIN(rtc->bcd_min); | 60 | wtime.tm_min = bcd2bin(rtc->bcd_min); |
62 | wtime.tm_hour = BCD2BIN(rtc->bcd_hr); | 61 | wtime.tm_hour = bcd2bin(rtc->bcd_hr); |
63 | wtime.tm_mday = BCD2BIN(rtc->bcd_dom); | 62 | wtime.tm_mday = bcd2bin(rtc->bcd_dom); |
64 | wtime.tm_mon = BCD2BIN(rtc->bcd_mth)-1; | 63 | wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; |
65 | wtime.tm_year = BCD2BIN(rtc->bcd_year); | 64 | wtime.tm_year = bcd2bin(rtc->bcd_year); |
66 | if (wtime.tm_year < 70) | 65 | if (wtime.tm_year < 70) |
67 | wtime.tm_year += 100; | 66 | wtime.tm_year += 100; |
68 | wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1; | 67 | wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; |
69 | } while (wtime.tm_sec != BCD2BIN(rtc->bcd_sec)); | 68 | } while (wtime.tm_sec != bcd2bin(rtc->bcd_sec)); |
70 | rtc->msr = msr; | 69 | rtc->msr = msr; |
71 | local_irq_restore(flags); | 70 | local_irq_restore(flags); |
72 | return copy_to_user(argp, &wtime, sizeof wtime) ? | 71 | return copy_to_user(argp, &wtime, sizeof wtime) ? |
@@ -114,14 +113,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
114 | 113 | ||
115 | rtc->t0cr_rtmr = yrs%4; | 114 | rtc->t0cr_rtmr = yrs%4; |
116 | rtc->bcd_tenms = 0; | 115 | rtc->bcd_tenms = 0; |
117 | rtc->bcd_sec = BIN2BCD(sec); | 116 | rtc->bcd_sec = bin2bcd(sec); |
118 | rtc->bcd_min = BIN2BCD(min); | 117 | rtc->bcd_min = bin2bcd(min); |
119 | rtc->bcd_hr = BIN2BCD(hrs); | 118 | rtc->bcd_hr = bin2bcd(hrs); |
120 | rtc->bcd_dom = BIN2BCD(day); | 119 | rtc->bcd_dom = bin2bcd(day); |
121 | rtc->bcd_mth = BIN2BCD(mon); | 120 | rtc->bcd_mth = bin2bcd(mon); |
122 | rtc->bcd_year = BIN2BCD(yrs%100); | 121 | rtc->bcd_year = bin2bcd(yrs%100); |
123 | if (rtc_tm.tm_wday >= 0) | 122 | if (rtc_tm.tm_wday >= 0) |
124 | rtc->bcd_dow = BIN2BCD(rtc_tm.tm_wday+1); | 123 | rtc->bcd_dow = bin2bcd(rtc_tm.tm_wday+1); |
125 | rtc->t0cr_rtmr = yrs%4 | 0x08; | 124 | rtc->t0cr_rtmr = yrs%4 | 0x08; |
126 | 125 | ||
127 | rtc->msr = msr; | 126 | rtc->msr = msr; |
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 3a7f62225504..55d5d6b680a2 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile | |||
@@ -14,5 +14,4 @@ obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o module.o \ | |||
14 | 14 | ||
15 | devres-y = ../../../kernel/irq/devres.o | 15 | devres-y = ../../../kernel/irq/devres.o |
16 | 16 | ||
17 | obj-$(CONFIG_PCI) += bios32.o | ||
18 | obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo | 17 | obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo |
diff --git a/arch/m68k/kernel/bios32.c b/arch/m68k/kernel/bios32.c deleted file mode 100644 index af170c2be735..000000000000 --- a/arch/m68k/kernel/bios32.c +++ /dev/null | |||
@@ -1,514 +0,0 @@ | |||
1 | /* | ||
2 | * bios32.c - PCI BIOS functions for m68k systems. | ||
3 | * | ||
4 | * Written by Wout Klaren. | ||
5 | * | ||
6 | * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger. | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/kernel.h> | ||
11 | |||
12 | #if 0 | ||
13 | # define DBG_DEVS(args) printk args | ||
14 | #else | ||
15 | # define DBG_DEVS(args) | ||
16 | #endif | ||
17 | |||
18 | #ifdef CONFIG_PCI | ||
19 | |||
20 | /* | ||
21 | * PCI support for Linux/m68k. Currently only the Hades is supported. | ||
22 | * | ||
23 | * The support for PCI bridges in the DEC Alpha version has | ||
24 | * been removed in this version. | ||
25 | */ | ||
26 | |||
27 | #include <linux/pci.h> | ||
28 | #include <linux/slab.h> | ||
29 | #include <linux/mm.h> | ||
30 | |||
31 | #include <asm/io.h> | ||
32 | #include <asm/pci.h> | ||
33 | #include <asm/uaccess.h> | ||
34 | |||
35 | #define KB 1024 | ||
36 | #define MB (1024*KB) | ||
37 | #define GB (1024*MB) | ||
38 | |||
39 | #define MAJOR_REV 0 | ||
40 | #define MINOR_REV 5 | ||
41 | |||
42 | /* | ||
43 | * Align VAL to ALIGN, which must be a power of two. | ||
44 | */ | ||
45 | |||
46 | #define ALIGN(val,align) (((val) + ((align) - 1)) & ~((align) - 1)) | ||
47 | |||
48 | /* | ||
49 | * Offsets relative to the I/O and memory base addresses from where resources | ||
50 | * are allocated. | ||
51 | */ | ||
52 | |||
53 | #define IO_ALLOC_OFFSET 0x00004000 | ||
54 | #define MEM_ALLOC_OFFSET 0x04000000 | ||
55 | |||
56 | /* | ||
57 | * Declarations of hardware specific initialisation functions. | ||
58 | */ | ||
59 | |||
60 | extern struct pci_bus_info *init_hades_pci(void); | ||
61 | |||
62 | /* | ||
63 | * Bus info structure of the PCI bus. A pointer to this structure is | ||
64 | * put in the sysdata member of the pci_bus structure. | ||
65 | */ | ||
66 | |||
67 | static struct pci_bus_info *bus_info; | ||
68 | |||
69 | static int pci_modify = 1; /* If set, layout the PCI bus ourself. */ | ||
70 | static int skip_vga; /* If set do not modify base addresses | ||
71 | of vga cards.*/ | ||
72 | static int disable_pci_burst; /* If set do not allow PCI bursts. */ | ||
73 | |||
74 | static unsigned int io_base; | ||
75 | static unsigned int mem_base; | ||
76 | |||
77 | /* | ||
78 | * static void disable_dev(struct pci_dev *dev) | ||
79 | * | ||
80 | * Disable PCI device DEV so that it does not respond to I/O or memory | ||
81 | * accesses. | ||
82 | * | ||
83 | * Parameters: | ||
84 | * | ||
85 | * dev - device to disable. | ||
86 | */ | ||
87 | |||
88 | static void __init disable_dev(struct pci_dev *dev) | ||
89 | { | ||
90 | unsigned short cmd; | ||
91 | |||
92 | if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) || | ||
93 | (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) || | ||
94 | (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga) | ||
95 | return; | ||
96 | |||
97 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | ||
98 | |||
99 | cmd &= (~PCI_COMMAND_IO & ~PCI_COMMAND_MEMORY & ~PCI_COMMAND_MASTER); | ||
100 | pci_write_config_word(dev, PCI_COMMAND, cmd); | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * static void layout_dev(struct pci_dev *dev) | ||
105 | * | ||
106 | * Layout memory and I/O for a device. | ||
107 | * | ||
108 | * Parameters: | ||
109 | * | ||
110 | * device - device to layout memory and I/O for. | ||
111 | */ | ||
112 | |||
113 | static void __init layout_dev(struct pci_dev *dev) | ||
114 | { | ||
115 | unsigned short cmd; | ||
116 | unsigned int base, mask, size, reg; | ||
117 | unsigned int alignto; | ||
118 | int i; | ||
119 | |||
120 | /* | ||
121 | * Skip video cards if requested. | ||
122 | */ | ||
123 | |||
124 | if (((dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA) || | ||
125 | (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) || | ||
126 | (dev->class >> 8 == PCI_CLASS_DISPLAY_XGA)) && skip_vga) | ||
127 | return; | ||
128 | |||
129 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | ||
130 | |||
131 | for (reg = PCI_BASE_ADDRESS_0, i = 0; reg <= PCI_BASE_ADDRESS_5; reg += 4, i++) | ||
132 | { | ||
133 | /* | ||
134 | * Figure out how much space and of what type this | ||
135 | * device wants. | ||
136 | */ | ||
137 | |||
138 | pci_write_config_dword(dev, reg, 0xffffffff); | ||
139 | pci_read_config_dword(dev, reg, &base); | ||
140 | |||
141 | if (!base) | ||
142 | { | ||
143 | /* this base-address register is unused */ | ||
144 | dev->resource[i].start = 0; | ||
145 | dev->resource[i].end = 0; | ||
146 | dev->resource[i].flags = 0; | ||
147 | continue; | ||
148 | } | ||
149 | |||
150 | /* | ||
151 | * We've read the base address register back after | ||
152 | * writing all ones and so now we must decode it. | ||
153 | */ | ||
154 | |||
155 | if (base & PCI_BASE_ADDRESS_SPACE_IO) | ||
156 | { | ||
157 | /* | ||
158 | * I/O space base address register. | ||
159 | */ | ||
160 | |||
161 | cmd |= PCI_COMMAND_IO; | ||
162 | |||
163 | base &= PCI_BASE_ADDRESS_IO_MASK; | ||
164 | mask = (~base << 1) | 0x1; | ||
165 | size = (mask & base) & 0xffffffff; | ||
166 | |||
167 | /* | ||
168 | * Align to multiple of size of minimum base. | ||
169 | */ | ||
170 | |||
171 | alignto = max_t(unsigned int, 0x040, size); | ||
172 | base = ALIGN(io_base, alignto); | ||
173 | io_base = base + size; | ||
174 | pci_write_config_dword(dev, reg, base | PCI_BASE_ADDRESS_SPACE_IO); | ||
175 | |||
176 | dev->resource[i].start = base; | ||
177 | dev->resource[i].end = dev->resource[i].start + size - 1; | ||
178 | dev->resource[i].flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO; | ||
179 | |||
180 | DBG_DEVS(("layout_dev: IO address: %lX\n", base)); | ||
181 | } | ||
182 | else | ||
183 | { | ||
184 | unsigned int type; | ||
185 | |||
186 | /* | ||
187 | * Memory space base address register. | ||
188 | */ | ||
189 | |||
190 | cmd |= PCI_COMMAND_MEMORY; | ||
191 | type = base & PCI_BASE_ADDRESS_MEM_TYPE_MASK; | ||
192 | base &= PCI_BASE_ADDRESS_MEM_MASK; | ||
193 | mask = (~base << 1) | 0x1; | ||
194 | size = (mask & base) & 0xffffffff; | ||
195 | switch (type) | ||
196 | { | ||
197 | case PCI_BASE_ADDRESS_MEM_TYPE_32: | ||
198 | case PCI_BASE_ADDRESS_MEM_TYPE_64: | ||
199 | break; | ||
200 | |||
201 | case PCI_BASE_ADDRESS_MEM_TYPE_1M: | ||
202 | printk("bios32 WARNING: slot %d, function %d " | ||
203 | "requests memory below 1MB---don't " | ||
204 | "know how to do that.\n", | ||
205 | PCI_SLOT(dev->devfn), | ||
206 | PCI_FUNC(dev->devfn)); | ||
207 | continue; | ||
208 | } | ||
209 | |||
210 | /* | ||
211 | * Align to multiple of size of minimum base. | ||
212 | */ | ||
213 | |||
214 | alignto = max_t(unsigned int, 0x1000, size); | ||
215 | base = ALIGN(mem_base, alignto); | ||
216 | mem_base = base + size; | ||
217 | pci_write_config_dword(dev, reg, base); | ||
218 | |||
219 | dev->resource[i].start = base; | ||
220 | dev->resource[i].end = dev->resource[i].start + size - 1; | ||
221 | dev->resource[i].flags = IORESOURCE_MEM; | ||
222 | |||
223 | if (type == PCI_BASE_ADDRESS_MEM_TYPE_64) | ||
224 | { | ||
225 | /* | ||
226 | * 64-bit address, set the highest 32 bits | ||
227 | * to zero. | ||
228 | */ | ||
229 | |||
230 | reg += 4; | ||
231 | pci_write_config_dword(dev, reg, 0); | ||
232 | |||
233 | i++; | ||
234 | dev->resource[i].start = 0; | ||
235 | dev->resource[i].end = 0; | ||
236 | dev->resource[i].flags = 0; | ||
237 | } | ||
238 | } | ||
239 | } | ||
240 | |||
241 | /* | ||
242 | * Enable device: | ||
243 | */ | ||
244 | |||
245 | if (dev->class >> 8 == PCI_CLASS_NOT_DEFINED || | ||
246 | dev->class >> 8 == PCI_CLASS_NOT_DEFINED_VGA || | ||
247 | dev->class >> 8 == PCI_CLASS_DISPLAY_VGA || | ||
248 | dev->class >> 8 == PCI_CLASS_DISPLAY_XGA) | ||
249 | { | ||
250 | /* | ||
251 | * All of these (may) have I/O scattered all around | ||
252 | * and may not use i/o-base address registers at all. | ||
253 | * So we just have to always enable I/O to these | ||
254 | * devices. | ||
255 | */ | ||
256 | cmd |= PCI_COMMAND_IO; | ||
257 | } | ||
258 | |||
259 | pci_write_config_word(dev, PCI_COMMAND, cmd | PCI_COMMAND_MASTER); | ||
260 | |||
261 | pci_write_config_byte(dev, PCI_LATENCY_TIMER, (disable_pci_burst) ? 0 : 32); | ||
262 | |||
263 | if (bus_info != NULL) | ||
264 | bus_info->conf_device(dev); /* Machine dependent configuration. */ | ||
265 | |||
266 | DBG_DEVS(("layout_dev: bus %d slot 0x%x VID 0x%x DID 0x%x class 0x%x\n", | ||
267 | dev->bus->number, PCI_SLOT(dev->devfn), dev->vendor, dev->device, dev->class)); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * static void layout_bus(struct pci_bus *bus) | ||
272 | * | ||
273 | * Layout memory and I/O for all devices on the given bus. | ||
274 | * | ||
275 | * Parameters: | ||
276 | * | ||
277 | * bus - bus. | ||
278 | */ | ||
279 | |||
280 | static void __init layout_bus(struct pci_bus *bus) | ||
281 | { | ||
282 | unsigned int bio, bmem; | ||
283 | struct pci_dev *dev; | ||
284 | |||
285 | DBG_DEVS(("layout_bus: starting bus %d\n", bus->number)); | ||
286 | |||
287 | if (!bus->devices && !bus->children) | ||
288 | return; | ||
289 | |||
290 | /* | ||
291 | * Align the current bases on appropriate boundaries (4K for | ||
292 | * IO and 1MB for memory). | ||
293 | */ | ||
294 | |||
295 | bio = io_base = ALIGN(io_base, 4*KB); | ||
296 | bmem = mem_base = ALIGN(mem_base, 1*MB); | ||
297 | |||
298 | /* | ||
299 | * PCI devices might have been setup by a PCI BIOS emulation | ||
300 | * running under TOS. In these cases there is a | ||
301 | * window during which two devices may have an overlapping | ||
302 | * address range. To avoid this causing trouble, we first | ||
303 | * turn off the I/O and memory address decoders for all PCI | ||
304 | * devices. They'll be re-enabled only once all address | ||
305 | * decoders are programmed consistently. | ||
306 | */ | ||
307 | |||
308 | DBG_DEVS(("layout_bus: disable_dev for bus %d\n", bus->number)); | ||
309 | |||
310 | for (dev = bus->devices; dev; dev = dev->sibling) | ||
311 | { | ||
312 | if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) || | ||
313 | (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA)) | ||
314 | disable_dev(dev); | ||
315 | } | ||
316 | |||
317 | /* | ||
318 | * Allocate space to each device: | ||
319 | */ | ||
320 | |||
321 | DBG_DEVS(("layout_bus: starting bus %d devices\n", bus->number)); | ||
322 | |||
323 | for (dev = bus->devices; dev; dev = dev->sibling) | ||
324 | { | ||
325 | if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) || | ||
326 | (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA)) | ||
327 | layout_dev(dev); | ||
328 | } | ||
329 | |||
330 | DBG_DEVS(("layout_bus: bus %d finished\n", bus->number)); | ||
331 | } | ||
332 | |||
333 | /* | ||
334 | * static void pcibios_fixup(void) | ||
335 | * | ||
336 | * Layout memory and I/O of all devices on the PCI bus if 'pci_modify' is | ||
337 | * true. This might be necessary because not every m68k machine with a PCI | ||
338 | * bus has a PCI BIOS. This function should be called right after | ||
339 | * pci_scan_bus() in pcibios_init(). | ||
340 | */ | ||
341 | |||
342 | static void __init pcibios_fixup(void) | ||
343 | { | ||
344 | if (pci_modify) | ||
345 | { | ||
346 | /* | ||
347 | * Set base addresses for allocation of I/O and memory space. | ||
348 | */ | ||
349 | |||
350 | io_base = bus_info->io_space.start + IO_ALLOC_OFFSET; | ||
351 | mem_base = bus_info->mem_space.start + MEM_ALLOC_OFFSET; | ||
352 | |||
353 | /* | ||
354 | * Scan the tree, allocating PCI memory and I/O space. | ||
355 | */ | ||
356 | |||
357 | layout_bus(pci_bus_b(pci_root.next)); | ||
358 | } | ||
359 | |||
360 | /* | ||
361 | * Fix interrupt assignments, etc. | ||
362 | */ | ||
363 | |||
364 | bus_info->fixup(pci_modify); | ||
365 | } | ||
366 | |||
367 | /* | ||
368 | * static void pcibios_claim_resources(struct pci_bus *bus) | ||
369 | * | ||
370 | * Claim all resources that are assigned to devices on the given bus. | ||
371 | * | ||
372 | * Parameters: | ||
373 | * | ||
374 | * bus - bus. | ||
375 | */ | ||
376 | |||
377 | static void __init pcibios_claim_resources(struct pci_bus *bus) | ||
378 | { | ||
379 | struct pci_dev *dev; | ||
380 | int i; | ||
381 | |||
382 | while (bus) | ||
383 | { | ||
384 | for (dev = bus->devices; (dev != NULL); dev = dev->sibling) | ||
385 | { | ||
386 | for (i = 0; i < PCI_NUM_RESOURCES; i++) | ||
387 | { | ||
388 | struct resource *r = &dev->resource[i]; | ||
389 | struct resource *pr; | ||
390 | struct pci_bus_info *bus_info = (struct pci_bus_info *) dev->sysdata; | ||
391 | |||
392 | if ((r->start == 0) || (r->parent != NULL)) | ||
393 | continue; | ||
394 | #if 1 | ||
395 | if (r->flags & IORESOURCE_IO) | ||
396 | pr = &bus_info->io_space; | ||
397 | else | ||
398 | pr = &bus_info->mem_space; | ||
399 | #else | ||
400 | if (r->flags & IORESOURCE_IO) | ||
401 | pr = &ioport_resource; | ||
402 | else | ||
403 | pr = &iomem_resource; | ||
404 | #endif | ||
405 | if (request_resource(pr, r) < 0) | ||
406 | { | ||
407 | printk(KERN_ERR "PCI: Address space collision on region %d of device %s\n", i, dev->name); | ||
408 | } | ||
409 | } | ||
410 | } | ||
411 | |||
412 | if (bus->children) | ||
413 | pcibios_claim_resources(bus->children); | ||
414 | |||
415 | bus = bus->next; | ||
416 | } | ||
417 | } | ||
418 | |||
419 | /* | ||
420 | * int pcibios_assign_resource(struct pci_dev *dev, int i) | ||
421 | * | ||
422 | * Assign a new address to a PCI resource. | ||
423 | * | ||
424 | * Parameters: | ||
425 | * | ||
426 | * dev - device. | ||
427 | * i - resource. | ||
428 | * | ||
429 | * Result: 0 if successful. | ||
430 | */ | ||
431 | |||
432 | int __init pcibios_assign_resource(struct pci_dev *dev, int i) | ||
433 | { | ||
434 | struct resource *r = &dev->resource[i]; | ||
435 | struct resource *pr = pci_find_parent_resource(dev, r); | ||
436 | unsigned long size = r->end + 1; | ||
437 | |||
438 | if (!pr) | ||
439 | return -EINVAL; | ||
440 | |||
441 | if (r->flags & IORESOURCE_IO) | ||
442 | { | ||
443 | if (size > 0x100) | ||
444 | return -EFBIG; | ||
445 | |||
446 | if (allocate_resource(pr, r, size, bus_info->io_space.start + | ||
447 | IO_ALLOC_OFFSET, bus_info->io_space.end, 1024)) | ||
448 | return -EBUSY; | ||
449 | } | ||
450 | else | ||
451 | { | ||
452 | if (allocate_resource(pr, r, size, bus_info->mem_space.start + | ||
453 | MEM_ALLOC_OFFSET, bus_info->mem_space.end, size)) | ||
454 | return -EBUSY; | ||
455 | } | ||
456 | |||
457 | if (i < 6) | ||
458 | pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + 4 * i, r->start); | ||
459 | |||
460 | return 0; | ||
461 | } | ||
462 | |||
463 | void __init pcibios_fixup_bus(struct pci_bus *bus) | ||
464 | { | ||
465 | struct pci_dev *dev; | ||
466 | void *sysdata; | ||
467 | |||
468 | sysdata = (bus->parent) ? bus->parent->sysdata : bus->sysdata; | ||
469 | |||
470 | for (dev = bus->devices; (dev != NULL); dev = dev->sibling) | ||
471 | dev->sysdata = sysdata; | ||
472 | } | ||
473 | |||
474 | void __init pcibios_init(void) | ||
475 | { | ||
476 | printk("Linux/m68k PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV); | ||
477 | |||
478 | bus_info = NULL; | ||
479 | #ifdef CONFIG_HADES | ||
480 | if (MACH_IS_HADES) | ||
481 | bus_info = init_hades_pci(); | ||
482 | #endif | ||
483 | if (bus_info != NULL) | ||
484 | { | ||
485 | printk("PCI: Probing PCI hardware\n"); | ||
486 | pci_scan_bus(0, bus_info->m68k_pci_ops, bus_info); | ||
487 | pcibios_fixup(); | ||
488 | pcibios_claim_resources(pci_root); | ||
489 | } | ||
490 | else | ||
491 | printk("PCI: No PCI bus detected\n"); | ||
492 | } | ||
493 | |||
494 | char * __init pcibios_setup(char *str) | ||
495 | { | ||
496 | if (!strcmp(str, "nomodify")) | ||
497 | { | ||
498 | pci_modify = 0; | ||
499 | return NULL; | ||
500 | } | ||
501 | else if (!strcmp(str, "skipvga")) | ||
502 | { | ||
503 | skip_vga = 1; | ||
504 | return NULL; | ||
505 | } | ||
506 | else if (!strcmp(str, "noburst")) | ||
507 | { | ||
508 | disable_pci_burst = 1; | ||
509 | return NULL; | ||
510 | } | ||
511 | |||
512 | return str; | ||
513 | } | ||
514 | #endif /* CONFIG_PCI */ | ||
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index 6f8c080dd9f9..2bb4245404d8 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c | |||
@@ -66,8 +66,8 @@ void dma_free_coherent(struct device *dev, size_t size, | |||
66 | } | 66 | } |
67 | EXPORT_SYMBOL(dma_free_coherent); | 67 | EXPORT_SYMBOL(dma_free_coherent); |
68 | 68 | ||
69 | inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, | 69 | void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, |
70 | enum dma_data_direction dir) | 70 | size_t size, enum dma_data_direction dir) |
71 | { | 71 | { |
72 | switch (dir) { | 72 | switch (dir) { |
73 | case DMA_TO_DEVICE: | 73 | case DMA_TO_DEVICE: |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index ded7dd2f67b2..7e8a0d394e61 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -429,8 +429,9 @@ int show_interrupts(struct seq_file *p, void *v) | |||
429 | return 0; | 429 | return 0; |
430 | } | 430 | } |
431 | 431 | ||
432 | #ifdef CONFIG_PROC_FS | ||
432 | void init_irq_proc(void) | 433 | void init_irq_proc(void) |
433 | { | 434 | { |
434 | /* Insert /proc/irq driver here */ | 435 | /* Insert /proc/irq driver here */ |
435 | } | 436 | } |
436 | 437 | #endif | |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 7888cdf91f5d..3042c2bc8c58 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -78,7 +78,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
78 | static void default_idle(void) | 78 | static void default_idle(void) |
79 | { | 79 | { |
80 | if (!need_resched()) | 80 | if (!need_resched()) |
81 | #if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES) | 81 | #if defined(MACH_ATARI_ONLY) |
82 | /* block out HSYNC on the atari (falcon) */ | 82 | /* block out HSYNC on the atari (falcon) */ |
83 | __asm__("stop #0x2200" : : : "cc"); | 83 | __asm__("stop #0x2200" : : : "cc"); |
84 | #else | 84 | #else |
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index ea1e44da19b9..4d97bd2bd573 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
23 | #include <linux/proc_fs.h> | ||
23 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/initrd.h> | 26 | #include <linux/initrd.h> |
@@ -80,7 +81,7 @@ void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL; | |||
80 | /* machine dependent irq functions */ | 81 | /* machine dependent irq functions */ |
81 | void (*mach_init_IRQ) (void) __initdata = NULL; | 82 | void (*mach_init_IRQ) (void) __initdata = NULL; |
82 | void (*mach_get_model) (char *model); | 83 | void (*mach_get_model) (char *model); |
83 | int (*mach_get_hardware_list) (char *buffer); | 84 | void (*mach_get_hardware_list) (struct seq_file *m); |
84 | /* machine dependent timer functions */ | 85 | /* machine dependent timer functions */ |
85 | unsigned long (*mach_gettimeoffset) (void); | 86 | unsigned long (*mach_gettimeoffset) (void); |
86 | int (*mach_hwclk) (int, struct rtc_time*); | 87 | int (*mach_hwclk) (int, struct rtc_time*); |
@@ -467,9 +468,9 @@ const struct seq_operations cpuinfo_op = { | |||
467 | .show = show_cpuinfo, | 468 | .show = show_cpuinfo, |
468 | }; | 469 | }; |
469 | 470 | ||
470 | int get_hardware_list(char *buffer) | 471 | #ifdef CONFIG_PROC_HARDWARE |
472 | static int hardware_proc_show(struct seq_file *m, void *v) | ||
471 | { | 473 | { |
472 | int len = 0; | ||
473 | char model[80]; | 474 | char model[80]; |
474 | unsigned long mem; | 475 | unsigned long mem; |
475 | int i; | 476 | int i; |
@@ -479,17 +480,37 @@ int get_hardware_list(char *buffer) | |||
479 | else | 480 | else |
480 | strcpy(model, "Unknown m68k"); | 481 | strcpy(model, "Unknown m68k"); |
481 | 482 | ||
482 | len += sprintf(buffer + len, "Model:\t\t%s\n", model); | 483 | seq_printf(m, "Model:\t\t%s\n", model); |
483 | for (mem = 0, i = 0; i < m68k_num_memory; i++) | 484 | for (mem = 0, i = 0; i < m68k_num_memory; i++) |
484 | mem += m68k_memory[i].size; | 485 | mem += m68k_memory[i].size; |
485 | len += sprintf(buffer + len, "System Memory:\t%ldK\n", mem >> 10); | 486 | seq_printf(m, "System Memory:\t%ldK\n", mem >> 10); |
486 | 487 | ||
487 | if (mach_get_hardware_list) | 488 | if (mach_get_hardware_list) |
488 | len += mach_get_hardware_list(buffer + len); | 489 | mach_get_hardware_list(m); |
489 | 490 | ||
490 | return len; | 491 | return 0; |
492 | } | ||
493 | |||
494 | static int hardware_proc_open(struct inode *inode, struct file *file) | ||
495 | { | ||
496 | return single_open(file, hardware_proc_show, NULL); | ||
491 | } | 497 | } |
492 | 498 | ||
499 | static const struct file_operations hardware_proc_fops = { | ||
500 | .open = hardware_proc_open, | ||
501 | .read = seq_read, | ||
502 | .llseek = seq_lseek, | ||
503 | .release = single_release, | ||
504 | }; | ||
505 | |||
506 | static int __init proc_hardware_init(void) | ||
507 | { | ||
508 | proc_create("hardware", 0, NULL, &hardware_proc_fops); | ||
509 | return 0; | ||
510 | } | ||
511 | module_init(proc_hardware_init); | ||
512 | #endif | ||
513 | |||
493 | void check_bugs(void) | 514 | void check_bugs(void) |
494 | { | 515 | { |
495 | #ifndef CONFIG_M68KFPU_EMU | 516 | #ifndef CONFIG_M68KFPU_EMU |
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 75b8340b254b..6d813de2baf1 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -883,8 +883,7 @@ void show_trace(unsigned long *stack) | |||
883 | if (i % 5 == 0) | 883 | if (i % 5 == 0) |
884 | printk("\n "); | 884 | printk("\n "); |
885 | #endif | 885 | #endif |
886 | printk(" [<%08lx>]", addr); | 886 | printk(" [<%08lx>] %pS\n", addr, (void *)addr); |
887 | print_symbol(" %s\n", addr); | ||
888 | i++; | 887 | i++; |
889 | } | 888 | } |
890 | } | 889 | } |
@@ -900,10 +899,8 @@ void show_registers(struct pt_regs *regs) | |||
900 | int i; | 899 | int i; |
901 | 900 | ||
902 | print_modules(); | 901 | print_modules(); |
903 | printk("PC: [<%08lx>]",regs->pc); | 902 | printk("PC: [<%08lx>] %pS\n", regs->pc, (void *)regs->pc); |
904 | print_symbol(" %s", regs->pc); | 903 | printk("SR: %04x SP: %p a2: %08lx\n", regs->sr, regs, regs->a2); |
905 | printk("\nSR: %04x SP: %p a2: %08lx\n", | ||
906 | regs->sr, regs, regs->a2); | ||
907 | printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", | 904 | printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", |
908 | regs->d0, regs->d1, regs->d2, regs->d3); | 905 | regs->d0, regs->d1, regs->d2, regs->d3); |
909 | printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", | 906 | printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", |
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds index 99b0784c0552..f846d4e3e5e1 100644 --- a/arch/m68k/kernel/vmlinux-std.lds +++ b/arch/m68k/kernel/vmlinux-std.lds | |||
@@ -34,10 +34,10 @@ SECTIONS | |||
34 | CONSTRUCTORS | 34 | CONSTRUCTORS |
35 | } | 35 | } |
36 | 36 | ||
37 | .bss : { *(.bss) } /* BSS */ | ||
38 | |||
39 | . = ALIGN(16); | 37 | . = ALIGN(16); |
40 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data | 38 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } |
39 | |||
40 | .bss : { *(.bss) } /* BSS */ | ||
41 | 41 | ||
42 | _edata = .; /* End of data section */ | 42 | _edata = .; /* End of data section */ |
43 | 43 | ||
@@ -48,7 +48,7 @@ SECTIONS | |||
48 | _sinittext = .; | 48 | _sinittext = .; |
49 | INIT_TEXT | 49 | INIT_TEXT |
50 | _einittext = .; | 50 | _einittext = .; |
51 | } | 51 | } :data |
52 | .init.data : { INIT_DATA } | 52 | .init.data : { INIT_DATA } |
53 | . = ALIGN(16); | 53 | . = ALIGN(16); |
54 | __setup_start = .; | 54 | __setup_start = .; |
@@ -74,6 +74,7 @@ SECTIONS | |||
74 | .init.ramfs : { *(.init.ramfs) } | 74 | .init.ramfs : { *(.init.ramfs) } |
75 | __initramfs_end = .; | 75 | __initramfs_end = .; |
76 | #endif | 76 | #endif |
77 | NOTES | ||
77 | . = ALIGN(8192); | 78 | . = ALIGN(8192); |
78 | __init_end = .; | 79 | __init_end = .; |
79 | 80 | ||
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index 46b7d6035aab..df620ac2a296 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c | |||
@@ -66,8 +66,10 @@ static struct vm_struct *get_io_area(unsigned long size) | |||
66 | for (p = &iolist; (tmp = *p) ; p = &tmp->next) { | 66 | for (p = &iolist; (tmp = *p) ; p = &tmp->next) { |
67 | if (size + addr < (unsigned long)tmp->addr) | 67 | if (size + addr < (unsigned long)tmp->addr) |
68 | break; | 68 | break; |
69 | if (addr > KMAP_END-size) | 69 | if (addr > KMAP_END-size) { |
70 | kfree(area); | ||
70 | return NULL; | 71 | return NULL; |
72 | } | ||
71 | addr = tmp->size + (unsigned long)tmp->addr; | 73 | addr = tmp->size + (unsigned long)tmp->addr; |
72 | } | 74 | } |
73 | area->addr = (void *)addr; | 75 | area->addr = (void *)addr; |
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 92fe50714112..43cdf476ffab 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | 38 | ||
39 | static void mvme147_get_model(char *model); | 39 | static void mvme147_get_model(char *model); |
40 | static int mvme147_get_hardware_list(char *buffer); | ||
41 | extern void mvme147_sched_init(irq_handler_t handler); | 40 | extern void mvme147_sched_init(irq_handler_t handler); |
42 | extern unsigned long mvme147_gettimeoffset (void); | 41 | extern unsigned long mvme147_gettimeoffset (void); |
43 | extern int mvme147_hwclk (int, struct rtc_time *); | 42 | extern int mvme147_hwclk (int, struct rtc_time *); |
@@ -76,14 +75,6 @@ static void mvme147_get_model(char *model) | |||
76 | sprintf(model, "Motorola MVME147"); | 75 | sprintf(model, "Motorola MVME147"); |
77 | } | 76 | } |
78 | 77 | ||
79 | |||
80 | static int mvme147_get_hardware_list(char *buffer) | ||
81 | { | ||
82 | *buffer = '\0'; | ||
83 | |||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | /* | 78 | /* |
88 | * This function is called during kernel startup to initialize | 79 | * This function is called during kernel startup to initialize |
89 | * the mvme147 IRQ handling routines. | 80 | * the mvme147 IRQ handling routines. |
@@ -104,7 +95,6 @@ void __init config_mvme147(void) | |||
104 | mach_set_clock_mmss = mvme147_set_clock_mmss; | 95 | mach_set_clock_mmss = mvme147_set_clock_mmss; |
105 | mach_reset = mvme147_reset; | 96 | mach_reset = mvme147_reset; |
106 | mach_get_model = mvme147_get_model; | 97 | mach_get_model = mvme147_get_model; |
107 | mach_get_hardware_list = mvme147_get_hardware_list; | ||
108 | 98 | ||
109 | /* Board type is only set by newer versions of vmelilo/tftplilo */ | 99 | /* Board type is only set by newer versions of vmelilo/tftplilo */ |
110 | if (!vme_brdtype) | 100 | if (!vme_brdtype) |
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index 24cbc3030454..1521826fc3c7 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/seq_file.h> | ||
20 | #include <linux/tty.h> | 21 | #include <linux/tty.h> |
21 | #include <linux/console.h> | 22 | #include <linux/console.h> |
22 | #include <linux/linkage.h> | 23 | #include <linux/linkage.h> |
@@ -42,7 +43,6 @@ extern t_bdid mvme_bdid; | |||
42 | static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE; | 43 | static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE; |
43 | 44 | ||
44 | static void mvme16x_get_model(char *model); | 45 | static void mvme16x_get_model(char *model); |
45 | static int mvme16x_get_hardware_list(char *buffer); | ||
46 | extern void mvme16x_sched_init(irq_handler_t handler); | 46 | extern void mvme16x_sched_init(irq_handler_t handler); |
47 | extern unsigned long mvme16x_gettimeoffset (void); | 47 | extern unsigned long mvme16x_gettimeoffset (void); |
48 | extern int mvme16x_hwclk (int, struct rtc_time *); | 48 | extern int mvme16x_hwclk (int, struct rtc_time *); |
@@ -93,26 +93,21 @@ static void mvme16x_get_model(char *model) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | static int mvme16x_get_hardware_list(char *buffer) | 96 | static void mvme16x_get_hardware_list(struct seq_file *m) |
97 | { | 97 | { |
98 | p_bdid p = &mvme_bdid; | 98 | p_bdid p = &mvme_bdid; |
99 | int len = 0; | ||
100 | 99 | ||
101 | if (p->brdno == 0x0162 || p->brdno == 0x0172) | 100 | if (p->brdno == 0x0162 || p->brdno == 0x0172) |
102 | { | 101 | { |
103 | unsigned char rev = *(unsigned char *)MVME162_VERSION_REG; | 102 | unsigned char rev = *(unsigned char *)MVME162_VERSION_REG; |
104 | 103 | ||
105 | len += sprintf (buffer+len, "VMEchip2 %spresent\n", | 104 | seq_printf (m, "VMEchip2 %spresent\n", |
106 | rev & MVME16x_CONFIG_NO_VMECHIP2 ? "NOT " : ""); | 105 | rev & MVME16x_CONFIG_NO_VMECHIP2 ? "NOT " : ""); |
107 | len += sprintf (buffer+len, "SCSI interface %spresent\n", | 106 | seq_printf (m, "SCSI interface %spresent\n", |
108 | rev & MVME16x_CONFIG_NO_SCSICHIP ? "NOT " : ""); | 107 | rev & MVME16x_CONFIG_NO_SCSICHIP ? "NOT " : ""); |
109 | len += sprintf (buffer+len, "Ethernet i/f %spresent\n", | 108 | seq_printf (m, "Ethernet i/f %spresent\n", |
110 | rev & MVME16x_CONFIG_NO_ETHERNET ? "NOT " : ""); | 109 | rev & MVME16x_CONFIG_NO_ETHERNET ? "NOT " : ""); |
111 | } | 110 | } |
112 | else | ||
113 | *buffer = '\0'; | ||
114 | |||
115 | return (len); | ||
116 | } | 111 | } |
117 | 112 | ||
118 | /* | 113 | /* |
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index 432a9f13b2ed..cea5e3e4e636 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c | |||
@@ -52,15 +52,15 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
52 | /* Ensure clock and real-time-mode-register are accessible */ | 52 | /* Ensure clock and real-time-mode-register are accessible */ |
53 | rtc->ctrl = RTC_READ; | 53 | rtc->ctrl = RTC_READ; |
54 | memset(&wtime, 0, sizeof(struct rtc_time)); | 54 | memset(&wtime, 0, sizeof(struct rtc_time)); |
55 | wtime.tm_sec = BCD2BIN(rtc->bcd_sec); | 55 | wtime.tm_sec = bcd2bin(rtc->bcd_sec); |
56 | wtime.tm_min = BCD2BIN(rtc->bcd_min); | 56 | wtime.tm_min = bcd2bin(rtc->bcd_min); |
57 | wtime.tm_hour = BCD2BIN(rtc->bcd_hr); | 57 | wtime.tm_hour = bcd2bin(rtc->bcd_hr); |
58 | wtime.tm_mday = BCD2BIN(rtc->bcd_dom); | 58 | wtime.tm_mday = bcd2bin(rtc->bcd_dom); |
59 | wtime.tm_mon = BCD2BIN(rtc->bcd_mth)-1; | 59 | wtime.tm_mon = bcd2bin(rtc->bcd_mth)-1; |
60 | wtime.tm_year = BCD2BIN(rtc->bcd_year); | 60 | wtime.tm_year = bcd2bin(rtc->bcd_year); |
61 | if (wtime.tm_year < 70) | 61 | if (wtime.tm_year < 70) |
62 | wtime.tm_year += 100; | 62 | wtime.tm_year += 100; |
63 | wtime.tm_wday = BCD2BIN(rtc->bcd_dow)-1; | 63 | wtime.tm_wday = bcd2bin(rtc->bcd_dow)-1; |
64 | rtc->ctrl = 0; | 64 | rtc->ctrl = 0; |
65 | local_irq_restore(flags); | 65 | local_irq_restore(flags); |
66 | return copy_to_user(argp, &wtime, sizeof wtime) ? | 66 | return copy_to_user(argp, &wtime, sizeof wtime) ? |
@@ -104,12 +104,12 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
104 | local_irq_save(flags); | 104 | local_irq_save(flags); |
105 | rtc->ctrl = RTC_WRITE; | 105 | rtc->ctrl = RTC_WRITE; |
106 | 106 | ||
107 | rtc->bcd_sec = BIN2BCD(sec); | 107 | rtc->bcd_sec = bin2bcd(sec); |
108 | rtc->bcd_min = BIN2BCD(min); | 108 | rtc->bcd_min = bin2bcd(min); |
109 | rtc->bcd_hr = BIN2BCD(hrs); | 109 | rtc->bcd_hr = bin2bcd(hrs); |
110 | rtc->bcd_dom = BIN2BCD(day); | 110 | rtc->bcd_dom = bin2bcd(day); |
111 | rtc->bcd_mth = BIN2BCD(mon); | 111 | rtc->bcd_mth = bin2bcd(mon); |
112 | rtc->bcd_year = BIN2BCD(yrs%100); | 112 | rtc->bcd_year = bin2bcd(yrs%100); |
113 | 113 | ||
114 | rtc->ctrl = 0; | 114 | rtc->ctrl = 0; |
115 | local_irq_restore(flags); | 115 | local_irq_restore(flags); |
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index be9de2f3dc48..7110546e3c00 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/serial_reg.h> | 23 | #include <linux/serial_reg.h> |
24 | #include <linux/rtc.h> | 24 | #include <linux/rtc.h> |
25 | #include <linux/vt_kern.h> | 25 | #include <linux/vt_kern.h> |
26 | #include <linux/bcd.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/rtc.h> | 29 | #include <asm/rtc.h> |
@@ -38,7 +39,6 @@ | |||
38 | extern irqreturn_t q40_process_int(int level, struct pt_regs *regs); | 39 | extern irqreturn_t q40_process_int(int level, struct pt_regs *regs); |
39 | extern void q40_init_IRQ(void); | 40 | extern void q40_init_IRQ(void); |
40 | static void q40_get_model(char *model); | 41 | static void q40_get_model(char *model); |
41 | static int q40_get_hardware_list(char *buffer); | ||
42 | extern void q40_sched_init(irq_handler_t handler); | 42 | extern void q40_sched_init(irq_handler_t handler); |
43 | 43 | ||
44 | static unsigned long q40_gettimeoffset(void); | 44 | static unsigned long q40_gettimeoffset(void); |
@@ -152,14 +152,6 @@ static void q40_get_model(char *model) | |||
152 | sprintf(model, "Q40"); | 152 | sprintf(model, "Q40"); |
153 | } | 153 | } |
154 | 154 | ||
155 | /* No hardware options on Q40? */ | ||
156 | |||
157 | static int q40_get_hardware_list(char *buffer) | ||
158 | { | ||
159 | *buffer = '\0'; | ||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | static unsigned int serports[] = | 155 | static unsigned int serports[] = |
164 | { | 156 | { |
165 | 0x3f8,0x2f8,0x3e8,0x2e8,0 | 157 | 0x3f8,0x2f8,0x3e8,0x2e8,0 |
@@ -190,7 +182,6 @@ void __init config_q40(void) | |||
190 | 182 | ||
191 | mach_reset = q40_reset; | 183 | mach_reset = q40_reset; |
192 | mach_get_model = q40_get_model; | 184 | mach_get_model = q40_get_model; |
193 | mach_get_hardware_list = q40_get_hardware_list; | ||
194 | 185 | ||
195 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) | 186 | #if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) |
196 | mach_beep = q40_mksound; | 187 | mach_beep = q40_mksound; |
@@ -216,17 +207,6 @@ int q40_parse_bootinfo(const struct bi_record *rec) | |||
216 | } | 207 | } |
217 | 208 | ||
218 | 209 | ||
219 | static inline unsigned char bcd2bin(unsigned char b) | ||
220 | { | ||
221 | return (b >> 4) * 10 + (b & 15); | ||
222 | } | ||
223 | |||
224 | static inline unsigned char bin2bcd(unsigned char b) | ||
225 | { | ||
226 | return (b / 10) * 16 + (b % 10); | ||
227 | } | ||
228 | |||
229 | |||
230 | static unsigned long q40_gettimeoffset(void) | 210 | static unsigned long q40_gettimeoffset(void) |
231 | { | 211 | { |
232 | return 5000 * (ql_ticks != 0); | 212 | return 5000 * (ql_ticks != 0); |
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c index 732087d0735c..8dfaa201342e 100644 --- a/arch/m68k/sun3/config.c +++ b/arch/m68k/sun3/config.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/seq_file.h> | ||
14 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
15 | #include <linux/console.h> | 16 | #include <linux/console.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -46,16 +47,9 @@ extern volatile unsigned char* sun3_intreg; | |||
46 | extern unsigned long availmem; | 47 | extern unsigned long availmem; |
47 | unsigned long num_pages; | 48 | unsigned long num_pages; |
48 | 49 | ||
49 | static int sun3_get_hardware_list(char *buffer) | 50 | static void sun3_get_hardware_list(struct seq_file *m) |
50 | { | 51 | { |
51 | 52 | seq_printf(m, "PROM Revision:\t%s\n", romvec->pv_monid); | |
52 | int len = 0; | ||
53 | |||
54 | len += sprintf(buffer + len, "PROM Revision:\t%s\n", | ||
55 | romvec->pv_monid); | ||
56 | |||
57 | return len; | ||
58 | |||
59 | } | 53 | } |
60 | 54 | ||
61 | void __init sun3_init(void) | 55 | void __init sun3_init(void) |
diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c index 987891783a47..2b1ca2db070f 100644 --- a/arch/m68k/sun3x/config.c +++ b/arch/m68k/sun3x/config.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/seq_file.h> | ||
11 | #include <linux/console.h> | 12 | #include <linux/console.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | 14 | ||
@@ -31,16 +32,9 @@ void sun3_leds(unsigned int i) | |||
31 | 32 | ||
32 | } | 33 | } |
33 | 34 | ||
34 | static int sun3x_get_hardware_list(char *buffer) | 35 | static void sun3x_get_hardware_list(struct seq_file *m) |
35 | { | 36 | { |
36 | 37 | seq_printf(m, "PROM Revision:\t%s\n", romvec->pv_monid); | |
37 | int len = 0; | ||
38 | |||
39 | len += sprintf(buffer + len, "PROM Revision:\t%s\n", | ||
40 | romvec->pv_monid); | ||
41 | |||
42 | return len; | ||
43 | |||
44 | } | 38 | } |
45 | 39 | ||
46 | /* | 40 | /* |
diff --git a/arch/m68k/sun3x/time.c b/arch/m68k/sun3x/time.c index f5eaafb00d21..536a04aaf22f 100644 --- a/arch/m68k/sun3x/time.c +++ b/arch/m68k/sun3x/time.c | |||
@@ -47,23 +47,23 @@ int sun3x_hwclk(int set, struct rtc_time *t) | |||
47 | 47 | ||
48 | if(set) { | 48 | if(set) { |
49 | h->csr |= C_WRITE; | 49 | h->csr |= C_WRITE; |
50 | h->sec = BIN2BCD(t->tm_sec); | 50 | h->sec = bin2bcd(t->tm_sec); |
51 | h->min = BIN2BCD(t->tm_min); | 51 | h->min = bin2bcd(t->tm_min); |
52 | h->hour = BIN2BCD(t->tm_hour); | 52 | h->hour = bin2bcd(t->tm_hour); |
53 | h->wday = BIN2BCD(t->tm_wday); | 53 | h->wday = bin2bcd(t->tm_wday); |
54 | h->mday = BIN2BCD(t->tm_mday); | 54 | h->mday = bin2bcd(t->tm_mday); |
55 | h->month = BIN2BCD(t->tm_mon); | 55 | h->month = bin2bcd(t->tm_mon); |
56 | h->year = BIN2BCD(t->tm_year); | 56 | h->year = bin2bcd(t->tm_year); |
57 | h->csr &= ~C_WRITE; | 57 | h->csr &= ~C_WRITE; |
58 | } else { | 58 | } else { |
59 | h->csr |= C_READ; | 59 | h->csr |= C_READ; |
60 | t->tm_sec = BCD2BIN(h->sec); | 60 | t->tm_sec = bcd2bin(h->sec); |
61 | t->tm_min = BCD2BIN(h->min); | 61 | t->tm_min = bcd2bin(h->min); |
62 | t->tm_hour = BCD2BIN(h->hour); | 62 | t->tm_hour = bcd2bin(h->hour); |
63 | t->tm_wday = BCD2BIN(h->wday); | 63 | t->tm_wday = bcd2bin(h->wday); |
64 | t->tm_mday = BCD2BIN(h->mday); | 64 | t->tm_mday = bcd2bin(h->mday); |
65 | t->tm_mon = BCD2BIN(h->month); | 65 | t->tm_mon = bcd2bin(h->month); |
66 | t->tm_year = BCD2BIN(h->year); | 66 | t->tm_year = bcd2bin(h->year); |
67 | h->csr &= ~C_READ; | 67 | h->csr &= ~C_READ; |
68 | } | 68 | } |
69 | 69 | ||