]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/m68k/amiga/config.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into...
[linux-2.6-omap-h63xx.git] / arch / m68k / amiga / config.c
index 35748531327dac74710c653017395b73348014fc..ab9862c3a136f4bc49f744b04bd2feae51912e83 100644 (file)
@@ -15,6 +15,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/rtc.h>
@@ -23,6 +24,8 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/zorro.h>
+#include <linux/module.h>
+#include <linux/keyboard.h>
 
 #include <asm/bootinfo.h>
 #include <asm/setup.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
 
-unsigned long amiga_model;
+static unsigned long amiga_model;
+
 unsigned long amiga_eclock;
-unsigned long amiga_masterclock;
+EXPORT_SYMBOL(amiga_eclock);
+
 unsigned long amiga_colorclock;
+EXPORT_SYMBOL(amiga_colorclock);
+
 unsigned long amiga_chipset;
+EXPORT_SYMBOL(amiga_chipset);
+
 unsigned char amiga_vblank;
-unsigned char amiga_psfreq;
+EXPORT_SYMBOL(amiga_vblank);
+
+static unsigned char amiga_psfreq;
+
 struct amiga_hw_present amiga_hw_present;
+EXPORT_SYMBOL(amiga_hw_present);
 
 static char s_a500[] __initdata = "A500";
 static char s_a500p[] __initdata = "A500+";
@@ -80,10 +93,8 @@ static char *amiga_models[] __initdata = {
 static char amiga_model_name[13] = "Amiga ";
 
 static void amiga_sched_init(irq_handler_t handler);
-/* amiga specific irq functions */
-extern void amiga_init_IRQ(void);
 static void amiga_get_model(char *model);
-static int amiga_get_hardware_list(char *buffer);
+static void amiga_get_hardware_list(struct seq_file *m);
 /* amiga specific timer functions */
 static unsigned long amiga_gettimeoffset(void);
 static int a3000_hwclk(int, struct rtc_time *);
@@ -95,8 +106,6 @@ static void amiga_reset(void);
 extern void amiga_init_sound(void);
 static void amiga_mem_console_write(struct console *co, const char *b,
                                    unsigned int count);
-void amiga_serial_console_write(struct console *co, const char *s,
-                               unsigned int count);
 #ifdef CONFIG_HEARTBEAT
 static void amiga_heartbeat(int on);
 #endif
@@ -406,8 +415,7 @@ void __init config_amiga(void)
        mach_heartbeat = amiga_heartbeat;
 #endif
 
-       /* Fill in the clock values (based on the 700 kHz E-Clock) */
-       amiga_masterclock = 40*amiga_eclock;    /* 28 MHz */
+       /* Fill in the clock value (based on the 700 kHz E-Clock) */
        amiga_colorclock = 5*amiga_eclock;      /* 3.5 MHz */
 
        /* clear all DMA bits */
@@ -805,8 +813,8 @@ static void amiga_serial_putc(char c)
                ;
 }
 
-void amiga_serial_console_write(struct console *co, const char *s,
-                               unsigned int count)
+static void amiga_serial_console_write(struct console *co, const char *s,
+                                      unsigned int count)
 {
        while (count--) {
                if (*s == '\n')
@@ -815,7 +823,7 @@ void amiga_serial_console_write(struct console *co, const char *s,
        }
 }
 
-#ifdef CONFIG_SERIAL_CONSOLE
+#if 0
 void amiga_serial_puts(const char *s)
 {
        amiga_serial_console_write(NULL, s, strlen(s));
@@ -904,13 +912,11 @@ static void amiga_get_model(char *model)
 }
 
 
-static int amiga_get_hardware_list(char *buffer)
+static void amiga_get_hardware_list(struct seq_file *m)
 {
-       int len = 0;
-
        if (AMIGAHW_PRESENT(CHIP_RAM))
-               len += sprintf(buffer+len, "Chip RAM:\t%ldK\n", amiga_chip_size>>10);
-       len += sprintf(buffer+len, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n",
+               seq_printf(m, "Chip RAM:\t%ldK\n", amiga_chip_size>>10);
+       seq_printf(m, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n",
                        amiga_psfreq, amiga_eclock);
        if (AMIGAHW_PRESENT(AMI_VIDEO)) {
                char *type;
@@ -928,14 +934,14 @@ static int amiga_get_hardware_list(char *buffer)
                        type = "Old or Unknown";
                        break;
                }
-               len += sprintf(buffer+len, "Graphics:\t%s\n", type);
+               seq_printf(m, "Graphics:\t%s\n", type);
        }
 
 #define AMIGAHW_ANNOUNCE(name, str)                    \
        if (AMIGAHW_PRESENT(name))                      \
-               len += sprintf (buffer+len, "\t%s\n", str)
+               seq_printf (m, "\t%s\n", str)
 
-       len += sprintf (buffer + len, "Detected hardware:\n");
+       seq_printf (m, "Detected hardware:\n");
 
        AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video");
        AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter");
@@ -968,13 +974,19 @@ static int amiga_get_hardware_list(char *buffer)
        AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot");
 #ifdef CONFIG_ZORRO
        if (AMIGAHW_PRESENT(ZORRO))
-               len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion "
+               seq_printf(m, "\tZorro II%s AutoConfig: %d Expansion "
                                "Device%s\n",
                                AMIGAHW_PRESENT(ZORRO3) ? "I" : "",
                                zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s");
 #endif /* CONFIG_ZORRO */
 
 #undef AMIGAHW_ANNOUNCE
-
-       return len;
 }
+
+/*
+ * The Amiga keyboard driver needs key_maps, but we cannot export it in
+ * drivers/char/defkeymap.c, as it is autogenerated
+ */
+#ifdef CONFIG_HW_CONSOLE
+EXPORT_SYMBOL_GPL(key_maps);
+#endif