Commit 559510f5 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] m68k: seq_file fixes [17/20]

update some proc functions to use the seq_file interface
parent 0e209536
......@@ -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>
......@@ -406,7 +407,7 @@ void __init setup_arch(char **cmdline_p)
#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;
......@@ -467,7 +468,7 @@ int get_cpuinfo(char * buffer)
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"
......@@ -476,9 +477,28 @@ int get_cpuinfo(char * buffer)
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)
{
......
......@@ -36,13 +36,11 @@ extern char _text, _end;
char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
extern unsigned long sun3_gettimeoffset(void);
extern int show_sun3_interrupts (char *);
extern int show_sun3_interrupts (struct seq_file *, void *);
extern void sun3_sched_init(void (*handler)(int, void *, struct pt_regs *));
extern void sun3_get_model (char* model);
extern void idprom_init (void);
extern void sun3_gettod (int *yearp, int *monp, int *dayp,
int *hourp, int *minp, int *secp);
extern int sun3_hwclk(int set, struct hwclk_time *t);
extern int sun3_hwclk(int set, struct rtc_time *t);
extern void sun_serial_setup(void);
volatile char* clock_va;
......@@ -50,6 +48,18 @@ extern volatile unsigned char* sun3_intreg;
extern unsigned long availmem;
unsigned long num_pages;
static int sun3_get_hardware_list(char *buffer)
{
int len = 0;
len += sprintf(buffer + len, "PROM Revision:\t%s\n",
romvec->pv_monid);
return len;
}
void __init sun3_init(void)
{
unsigned char enable_register;
......@@ -167,7 +177,6 @@ void __init config_sun3(void)
sun_serial_setup();
}
void __init sun3_sched_init(void (*timer_routine)(int, void *, struct pt_regs *))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment