patch-2.4.19 linux-2.4.19/arch/m68k/kernel/setup.c
Next file: linux-2.4.19/arch/m68k/kernel/signal.c
Previous file: linux-2.4.19/arch/m68k/kernel/ptrace.c
Back to the patch index
Back to the overall index
- Lines: 112
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/m68k/kernel/setup.c
- Orig date:
Mon Jun 11 19:15:27 2001
diff -urN linux-2.4.18/arch/m68k/kernel/setup.c linux-2.4.19/arch/m68k/kernel/setup.c
@@ -21,6 +21,7 @@
#include <linux/string.h>
#include <linux/init.h>
#include <linux/bootmem.h>
+#include <linux/seq_file.h>
#include <linux/module.h>
#include <asm/bootinfo.h>
@@ -85,7 +86,7 @@
/* machine dependent timer functions */
unsigned long (*mach_gettimeoffset) (void);
void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
-int (*mach_hwclk) (int, struct hwclk_time*) = NULL;
+int (*mach_hwclk) (int, struct rtc_time*) = NULL;
int (*mach_set_clock_mmss) (unsigned long) = NULL;
void (*mach_reset)( void );
void (*mach_halt)( void ) = NULL;
@@ -93,7 +94,6 @@
long mach_max_dma_address = 0x00ffffff; /* default set to the lower 16MB */
#if defined(CONFIG_AMIGA_FLOPPY) || defined(CONFIG_ATARI_FLOPPY)
void (*mach_floppy_setup) (char *, int *) __initdata = NULL;
-void (*mach_floppy_eject) (void) = NULL;
#endif
#ifdef CONFIG_HEARTBEAT
void (*mach_heartbeat) (int) = NULL;
@@ -110,7 +110,7 @@
char *mach_sysrq_xlate = NULL;
#endif
-#if defined(CONFIG_ISA)
+#if defined(CONFIG_ISA) && defined(MULTI_ISA)
int isa_type;
int isa_sex;
#endif
@@ -388,7 +388,7 @@
paging_init();
/* set ISA defs early as possible */
-#if defined(CONFIG_ISA)
+#if defined(CONFIG_ISA) && defined(MULTI_ISA)
#if defined(CONFIG_Q40)
if (MACH_IS_Q40) {
isa_type = Q40_ISA;
@@ -408,7 +408,7 @@
#endif
}
-int get_cpuinfo(char * buffer)
+static int show_cpuinfo(struct seq_file *m, void *v)
{
const char *cpu, *mmu, *fpu;
unsigned long clockfreq, clockfactor;
@@ -469,7 +469,7 @@
clockfreq = loops_per_jiffy*HZ*clockfactor;
- return(sprintf(buffer, "CPU:\t\t%s\n"
+ seq_printf(m, "CPU:\t\t%s\n"
"MMU:\t\t%s\n"
"FPU:\t\t%s\n"
"Clocking:\t%lu.%1luMHz\n"
@@ -478,9 +478,28 @@
cpu, mmu, fpu,
clockfreq/1000000,(clockfreq/100000)%10,
loops_per_jiffy/(500000/HZ),(loops_per_jiffy/(5000/HZ))%100,
- loops_per_jiffy));
+ loops_per_jiffy);
+ return 0;
+}
+static void *c_start(struct seq_file *m, loff_t *pos)
+{
+ return *pos < 1 ? (void *)1 : NULL;
+}
+static void *c_next(struct seq_file *m, void *v, loff_t *pos)
+{
+ ++*pos;
+ return NULL;
}
+static void c_stop(struct seq_file *m, void *v)
+{
+}
+struct seq_operations cpuinfo_op = {
+ start: c_start,
+ next: c_next,
+ stop: c_stop,
+ show: show_cpuinfo,
+};
int get_hardware_list(char *buffer)
{
@@ -495,7 +514,7 @@
strcpy(model, "Unknown m68k");
len += sprintf(buffer+len, "Model:\t\t%s\n", model);
- len += get_cpuinfo(buffer+len);
+ //len += get_cpuinfo(buffer+len);
for (mem = 0, i = 0; i < m68k_num_memory; i++)
mem += m68k_memory[i].size;
len += sprintf(buffer+len, "System Memory:\t%ldK\n", mem>>10);
@@ -514,11 +533,6 @@
mach_floppy_setup (str, ints);
}
-void floppy_eject(void)
-{
- if (mach_floppy_eject)
- mach_floppy_eject();
-}
#endif
/* for "kbd-reset" cmdline param */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)