]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/m68k/mvme16x/config.c
proc: move /proc/hardware to m68k-specific code
[linux-2.6-omap-h63xx.git] / arch / m68k / mvme16x / config.c
index ce2727ed1bc05d64c37059fd67e49873aa534143..1521826fc3c7caef9a62935a2bde21f0f6135378 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/seq_file.h>
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/linkage.h>
@@ -25,6 +26,7 @@
 #include <linux/genhd.h>
 #include <linux/rtc.h>
 #include <linux/interrupt.h>
+#include <linux/module.h>
 
 #include <asm/bootinfo.h>
 #include <asm/system.h>
@@ -41,8 +43,7 @@ extern t_bdid mvme_bdid;
 static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
 
 static void mvme16x_get_model(char *model);
-static int  mvme16x_get_hardware_list(char *buffer);
-extern void mvme16x_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
+extern void mvme16x_sched_init(irq_handler_t handler);
 extern unsigned long mvme16x_gettimeoffset (void);
 extern int mvme16x_hwclk (int, struct rtc_time *);
 extern int mvme16x_set_clock_mmss (unsigned long);
@@ -54,10 +55,11 @@ int bcd2int (unsigned char b);
 /* Save tick handler routine pointer, will point to do_timer() in
  * kernel/sched.c, called via mvme16x_process_int() */
 
-static irqreturn_t (*tick_handler)(int, void *, struct pt_regs *);
+static irq_handler_t tick_handler;
 
 
 unsigned short mvme16x_config;
+EXPORT_SYMBOL(mvme16x_config);
 
 
 int mvme16x_parse_bootinfo(const struct bi_record *bi)
@@ -91,26 +93,21 @@ static void mvme16x_get_model(char *model)
 }
 
 
-static int mvme16x_get_hardware_list(char *buffer)
+static void mvme16x_get_hardware_list(struct seq_file *m)
 {
     p_bdid p = &mvme_bdid;
-    int len = 0;
 
     if (p->brdno == 0x0162 || p->brdno == 0x0172)
     {
        unsigned char rev = *(unsigned char *)MVME162_VERSION_REG;
 
-       len += sprintf (buffer+len, "VMEchip2        %spresent\n",
+       seq_printf (m, "VMEchip2        %spresent\n",
                        rev & MVME16x_CONFIG_NO_VMECHIP2 ? "NOT " : "");
-       len += sprintf (buffer+len, "SCSI interface  %spresent\n",
+       seq_printf (m, "SCSI interface  %spresent\n",
                        rev & MVME16x_CONFIG_NO_SCSICHIP ? "NOT " : "");
-       len += sprintf (buffer+len, "Ethernet i/f    %spresent\n",
+       seq_printf (m, "Ethernet i/f    %spresent\n",
                        rev & MVME16x_CONFIG_NO_ETHERNET ? "NOT " : "");
     }
-    else
-       *buffer = '\0';
-
-    return (len);
 }
 
 /*
@@ -119,7 +116,7 @@ static int mvme16x_get_hardware_list(char *buffer)
  * that the base vectors for the VMEChip2 and PCCChip2 are valid.
  */
 
-static void mvme16x_init_IRQ (void)
+static void __init mvme16x_init_IRQ (void)
 {
        m68k_setup_user_interrupt(VEC_USER, 192, NULL);
 }
@@ -190,7 +187,7 @@ void __init config_mvme16x(void)
     }
 }
 
-static irqreturn_t mvme16x_abort_int (int irq, void *dev_id, struct pt_regs *fp)
+static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
 {
        p_bdid p = &mvme_bdid;
        unsigned long *new = (unsigned long *)vectors;
@@ -218,13 +215,13 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id, struct pt_regs *fp)
        return IRQ_HANDLED;
 }
 
-static irqreturn_t mvme16x_timer_int (int irq, void *dev_id, struct pt_regs *fp)
+static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
 {
     *(volatile unsigned char *)0xfff4201b |= 8;
-    return tick_handler(irq, dev_id, fp);
+    return tick_handler(irq, dev_id);
 }
 
-void mvme16x_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *))
+void mvme16x_sched_init (irq_handler_t timer_routine)
 {
     p_bdid p = &mvme_bdid;
     int irq;