diff options
-rw-r--r-- | arch/m68k/amiga/config.c | 21 | ||||
-rw-r--r-- | arch/m68k/atari/config.c | 15 | ||||
-rw-r--r-- | arch/m68k/bvme6000/config.c | 11 | ||||
-rw-r--r-- | arch/m68k/kernel/setup.c | 35 | ||||
-rw-r--r-- | arch/m68k/mvme147/config.c | 10 | ||||
-rw-r--r-- | arch/m68k/mvme16x/config.c | 15 | ||||
-rw-r--r-- | arch/m68k/q40/config.c | 10 | ||||
-rw-r--r-- | arch/m68k/sun3/config.c | 12 | ||||
-rw-r--r-- | arch/m68k/sun3x/config.c | 12 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 13 | ||||
-rw-r--r-- | include/asm-m68k/machdep.h | 2 |
11 files changed, 56 insertions, 100 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 0a3f9e8ebde0..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> |
@@ -93,7 +94,7 @@ static char amiga_model_name[13] = "Amiga "; | |||
93 | 94 | ||
94 | static void amiga_sched_init(irq_handler_t handler); | 95 | static void amiga_sched_init(irq_handler_t handler); |
95 | static void amiga_get_model(char *model); | 96 | static void amiga_get_model(char *model); |
96 | static int amiga_get_hardware_list(char *buffer); | 97 | static void amiga_get_hardware_list(struct seq_file *m); |
97 | /* amiga specific timer functions */ | 98 | /* amiga specific timer functions */ |
98 | static unsigned long amiga_gettimeoffset(void); | 99 | static unsigned long amiga_gettimeoffset(void); |
99 | static int a3000_hwclk(int, struct rtc_time *); | 100 | static int a3000_hwclk(int, struct rtc_time *); |
@@ -911,13 +912,11 @@ static void amiga_get_model(char *model) | |||
911 | } | 912 | } |
912 | 913 | ||
913 | 914 | ||
914 | static int amiga_get_hardware_list(char *buffer) | 915 | static void amiga_get_hardware_list(struct seq_file *m) |
915 | { | 916 | { |
916 | int len = 0; | ||
917 | |||
918 | if (AMIGAHW_PRESENT(CHIP_RAM)) | 917 | if (AMIGAHW_PRESENT(CHIP_RAM)) |
919 | 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); |
920 | 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", |
921 | amiga_psfreq, amiga_eclock); | 920 | amiga_psfreq, amiga_eclock); |
922 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { | 921 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { |
923 | char *type; | 922 | char *type; |
@@ -935,14 +934,14 @@ static int amiga_get_hardware_list(char *buffer) | |||
935 | type = "Old or Unknown"; | 934 | type = "Old or Unknown"; |
936 | break; | 935 | break; |
937 | } | 936 | } |
938 | len += sprintf(buffer+len, "Graphics:\t%s\n", type); | 937 | seq_printf(m, "Graphics:\t%s\n", type); |
939 | } | 938 | } |
940 | 939 | ||
941 | #define AMIGAHW_ANNOUNCE(name, str) \ | 940 | #define AMIGAHW_ANNOUNCE(name, str) \ |
942 | if (AMIGAHW_PRESENT(name)) \ | 941 | if (AMIGAHW_PRESENT(name)) \ |
943 | len += sprintf (buffer+len, "\t%s\n", str) | 942 | seq_printf (m, "\t%s\n", str) |
944 | 943 | ||
945 | len += sprintf (buffer + len, "Detected hardware:\n"); | 944 | seq_printf (m, "Detected hardware:\n"); |
946 | 945 | ||
947 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); | 946 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); |
948 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); | 947 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); |
@@ -975,15 +974,13 @@ static int amiga_get_hardware_list(char *buffer) | |||
975 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); | 974 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); |
976 | #ifdef CONFIG_ZORRO | 975 | #ifdef CONFIG_ZORRO |
977 | if (AMIGAHW_PRESENT(ZORRO)) | 976 | if (AMIGAHW_PRESENT(ZORRO)) |
978 | len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion " | 977 | seq_printf(m, "\tZorro II%s AutoConfig: %d Expansion " |
979 | "Device%s\n", | 978 | "Device%s\n", |
980 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", | 979 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", |
981 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); | 980 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); |
982 | #endif /* CONFIG_ZORRO */ | 981 | #endif /* CONFIG_ZORRO */ |
983 | 982 | ||
984 | #undef AMIGAHW_ANNOUNCE | 983 | #undef AMIGAHW_ANNOUNCE |
985 | |||
986 | return len; | ||
987 | } | 984 | } |
988 | 985 | ||
989 | /* | 986 | /* |
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index af031855f796..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); |
@@ -611,21 +612,21 @@ static void atari_get_model(char *model) | |||
611 | } | 612 | } |
612 | 613 | ||
613 | 614 | ||
614 | static int atari_get_hardware_list(char *buffer) | 615 | static void atari_get_hardware_list(struct seq_file *m) |
615 | { | 616 | { |
616 | int len = 0, i; | 617 | int i; |
617 | 618 | ||
618 | for (i = 0; i < m68k_num_memory; i++) | 619 | for (i = 0; i < m68k_num_memory; i++) |
619 | len += sprintf(buffer+len, "\t%3ld MB at 0x%08lx (%s)\n", | 620 | seq_printf(m, "\t%3ld MB at 0x%08lx (%s)\n", |
620 | m68k_memory[i].size >> 20, m68k_memory[i].addr, | 621 | m68k_memory[i].size >> 20, m68k_memory[i].addr, |
621 | (m68k_memory[i].addr & 0xff000000 ? | 622 | (m68k_memory[i].addr & 0xff000000 ? |
622 | "alternate RAM" : "ST-RAM")); | 623 | "alternate RAM" : "ST-RAM")); |
623 | 624 | ||
624 | #define ATARIHW_ANNOUNCE(name, str) \ | 625 | #define ATARIHW_ANNOUNCE(name, str) \ |
625 | if (ATARIHW_PRESENT(name)) \ | 626 | if (ATARIHW_PRESENT(name)) \ |
626 | len += sprintf(buffer + len, "\t%s\n", str) | 627 | seq_printf(m, "\t%s\n", str) |
627 | 628 | ||
628 | len += sprintf(buffer + len, "Detected hardware:\n"); | 629 | seq_printf(m, "Detected hardware:\n"); |
629 | ATARIHW_ANNOUNCE(STND_SHIFTER, "ST Shifter"); | 630 | ATARIHW_ANNOUNCE(STND_SHIFTER, "ST Shifter"); |
630 | ATARIHW_ANNOUNCE(EXTD_SHIFTER, "STe Shifter"); | 631 | ATARIHW_ANNOUNCE(EXTD_SHIFTER, "STe Shifter"); |
631 | ATARIHW_ANNOUNCE(TT_SHIFTER, "TT Shifter"); | 632 | ATARIHW_ANNOUNCE(TT_SHIFTER, "TT Shifter"); |
@@ -654,6 +655,4 @@ static int atari_get_hardware_list(char *buffer) | |||
654 | ATARIHW_ANNOUNCE(BLITTER, "Blitter"); | 655 | ATARIHW_ANNOUNCE(BLITTER, "Blitter"); |
655 | ATARIHW_ANNOUNCE(VME, "VME Bus"); | 656 | ATARIHW_ANNOUNCE(VME, "VME Bus"); |
656 | ATARIHW_ANNOUNCE(DSP56K, "DSP56001 processor"); | 657 | ATARIHW_ANNOUNCE(DSP56K, "DSP56001 processor"); |
657 | |||
658 | return len; | ||
659 | } | 658 | } |
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index 65c9204ab9ac..c072595928c0 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/bvme6000hw.h> | 38 | #include <asm/bvme6000hw.h> |
39 | 39 | ||
40 | static void bvme6000_get_model(char *model); | 40 | static void bvme6000_get_model(char *model); |
41 | static int bvme6000_get_hardware_list(char *buffer); | ||
42 | extern void bvme6000_sched_init(irq_handler_t handler); | 41 | extern void bvme6000_sched_init(irq_handler_t handler); |
43 | extern unsigned long bvme6000_gettimeoffset (void); | 42 | extern unsigned long bvme6000_gettimeoffset (void); |
44 | extern int bvme6000_hwclk (int, struct rtc_time *); | 43 | extern int bvme6000_hwclk (int, struct rtc_time *); |
@@ -82,15 +81,6 @@ static void bvme6000_get_model(char *model) | |||
82 | sprintf(model, "BVME%d000", m68k_cputype == CPU_68060 ? 6 : 4); | 81 | sprintf(model, "BVME%d000", m68k_cputype == CPU_68060 ? 6 : 4); |
83 | } | 82 | } |
84 | 83 | ||
85 | |||
86 | /* No hardware options on BVME6000? */ | ||
87 | |||
88 | static int bvme6000_get_hardware_list(char *buffer) | ||
89 | { | ||
90 | *buffer = '\0'; | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | /* | 84 | /* |
95 | * This function is called during kernel startup to initialize | 85 | * This function is called during kernel startup to initialize |
96 | * the bvme6000 IRQ handling routines. | 86 | * the bvme6000 IRQ handling routines. |
@@ -127,7 +117,6 @@ void __init config_bvme6000(void) | |||
127 | mach_set_clock_mmss = bvme6000_set_clock_mmss; | 117 | mach_set_clock_mmss = bvme6000_set_clock_mmss; |
128 | mach_reset = bvme6000_reset; | 118 | mach_reset = bvme6000_reset; |
129 | mach_get_model = bvme6000_get_model; | 119 | mach_get_model = bvme6000_get_model; |
130 | mach_get_hardware_list = bvme6000_get_hardware_list; | ||
131 | 120 | ||
132 | printk ("Board is %sconfigured as a System Controller\n", | 121 | printk ("Board is %sconfigured as a System Controller\n", |
133 | *config_reg_ptr & BVME_CONFIG_SW1 ? "" : "not "); | 122 | *config_reg_ptr & BVME_CONFIG_SW1 ? "" : "not "); |
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/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/q40/config.c b/arch/m68k/q40/config.c index 9c7eefa3f98a..7110546e3c00 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 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); |
40 | extern void q40_init_IRQ(void); | 40 | extern void q40_init_IRQ(void); |
41 | static void q40_get_model(char *model); | 41 | static void q40_get_model(char *model); |
42 | static int q40_get_hardware_list(char *buffer); | ||
43 | extern void q40_sched_init(irq_handler_t handler); | 42 | extern void q40_sched_init(irq_handler_t handler); |
44 | 43 | ||
45 | static unsigned long q40_gettimeoffset(void); | 44 | static unsigned long q40_gettimeoffset(void); |
@@ -153,14 +152,6 @@ static void q40_get_model(char *model) | |||
153 | sprintf(model, "Q40"); | 152 | sprintf(model, "Q40"); |
154 | } | 153 | } |
155 | 154 | ||
156 | /* No hardware options on Q40? */ | ||
157 | |||
158 | static int q40_get_hardware_list(char *buffer) | ||
159 | { | ||
160 | *buffer = '\0'; | ||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | static unsigned int serports[] = | 155 | static unsigned int serports[] = |
165 | { | 156 | { |
166 | 0x3f8,0x2f8,0x3e8,0x2e8,0 | 157 | 0x3f8,0x2f8,0x3e8,0x2e8,0 |
@@ -191,7 +182,6 @@ void __init config_q40(void) | |||
191 | 182 | ||
192 | mach_reset = q40_reset; | 183 | mach_reset = q40_reset; |
193 | mach_get_model = q40_get_model; | 184 | mach_get_model = q40_get_model; |
194 | mach_get_hardware_list = q40_get_hardware_list; | ||
195 | 185 | ||
196 | #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) |
197 | mach_beep = q40_mksound; | 187 | mach_beep = q40_mksound; |
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/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 4814b111d836..542527f6630f 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -63,7 +63,6 @@ | |||
63 | * have a way to deal with that gracefully. Right now I used straightforward | 63 | * have a way to deal with that gracefully. Right now I used straightforward |
64 | * wrappers, but this needs further analysis wrt potential overflows. | 64 | * wrappers, but this needs further analysis wrt potential overflows. |
65 | */ | 65 | */ |
66 | extern int get_hardware_list(char *); | ||
67 | extern int get_stram_list(char *); | 66 | extern int get_stram_list(char *); |
68 | extern int get_exec_domain_list(char *); | 67 | extern int get_exec_domain_list(char *); |
69 | 68 | ||
@@ -198,15 +197,6 @@ static const struct file_operations proc_vmstat_file_operations = { | |||
198 | .release = seq_release, | 197 | .release = seq_release, |
199 | }; | 198 | }; |
200 | 199 | ||
201 | #ifdef CONFIG_PROC_HARDWARE | ||
202 | static int hardware_read_proc(char *page, char **start, off_t off, | ||
203 | int count, int *eof, void *data) | ||
204 | { | ||
205 | int len = get_hardware_list(page); | ||
206 | return proc_calc_metrics(page, start, off, count, eof, len); | ||
207 | } | ||
208 | #endif | ||
209 | |||
210 | #ifdef CONFIG_STRAM_PROC | 200 | #ifdef CONFIG_STRAM_PROC |
211 | static int stram_read_proc(char *page, char **start, off_t off, | 201 | static int stram_read_proc(char *page, char **start, off_t off, |
212 | int count, int *eof, void *data) | 202 | int count, int *eof, void *data) |
@@ -668,9 +658,6 @@ void __init proc_misc_init(void) | |||
668 | char *name; | 658 | char *name; |
669 | int (*read_proc)(char*,char**,off_t,int,int*,void*); | 659 | int (*read_proc)(char*,char**,off_t,int,int*,void*); |
670 | } *p, simple_ones[] = { | 660 | } *p, simple_ones[] = { |
671 | #ifdef CONFIG_PROC_HARDWARE | ||
672 | {"hardware", hardware_read_proc}, | ||
673 | #endif | ||
674 | #ifdef CONFIG_STRAM_PROC | 661 | #ifdef CONFIG_STRAM_PROC |
675 | {"stram", stram_read_proc}, | 662 | {"stram", stram_read_proc}, |
676 | #endif | 663 | #endif |
diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h index 26d2b91209c5..5637dcef314e 100644 --- a/include/asm-m68k/machdep.h +++ b/include/asm-m68k/machdep.h | |||
@@ -14,7 +14,7 @@ extern void (*mach_sched_init) (irq_handler_t handler); | |||
14 | /* machine dependent irq functions */ | 14 | /* machine dependent irq functions */ |
15 | extern void (*mach_init_IRQ) (void); | 15 | extern void (*mach_init_IRQ) (void); |
16 | extern void (*mach_get_model) (char *model); | 16 | extern void (*mach_get_model) (char *model); |
17 | extern int (*mach_get_hardware_list) (char *buffer); | 17 | extern void (*mach_get_hardware_list) (struct seq_file *m); |
18 | /* machine dependent timer functions */ | 18 | /* machine dependent timer functions */ |
19 | extern unsigned long (*mach_gettimeoffset)(void); | 19 | extern unsigned long (*mach_gettimeoffset)(void); |
20 | extern int (*mach_hwclk)(int, struct rtc_time*); | 20 | extern int (*mach_hwclk)(int, struct rtc_time*); |