]> err.no Git - linux-2.6/blobdiff - include/asm-sparc/floppy.h
aout: move STACK_TOP[_MAX] to asm/processor.h
[linux-2.6] / include / asm-sparc / floppy.h
index 28ce2b9c3da80708af5e9c02995643a4cc3af769..dbe7a586be5b12e77d5a87df291bdf1886dfaac5 100644 (file)
@@ -1,6 +1,6 @@
 /* asm-sparc/floppy.h: Sparc specific parts of the Floppy driver.
  *
- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
  */
 
 #ifndef __ASM_SPARC_FLOPPY_H
@@ -48,7 +48,7 @@ struct sun_flpy_controller {
 
 /* You'll only ever find one controller on a SparcStation anyways. */
 static struct sun_flpy_controller *sun_fdc = NULL;
-volatile unsigned char *fdc_status;
+extern volatile unsigned char *fdc_status;
 
 struct sun_floppy_ops {
        unsigned char (*fd_inb)(int port);
@@ -77,8 +77,6 @@ static struct sun_floppy_ops sun_fdops;
 #define fd_dma_mem_free(addr,size) (vfree((void *)(addr)))
 #endif
 
-#define FLOPPY_MOTOR_MASK         0x10
-
 /* XXX This isn't really correct. XXX */
 #define get_dma_residue(x)        (0)
 
@@ -225,21 +223,21 @@ static void sun_82077_fd_outb(unsigned char value, int port)
  * underruns.  If non-zero, doing_pdma encodes the direction of
  * the transfer for debugging.  1=read 2=write
  */
-char *pdma_vaddr;
-unsigned long pdma_size;
-volatile int doing_pdma = 0;
+extern char *pdma_vaddr;
+extern unsigned long pdma_size;
+extern volatile int doing_pdma;
 
 /* This is software state */
-char *pdma_base = NULL;
-unsigned long pdma_areasize;
+extern char *pdma_base;
+extern unsigned long pdma_areasize;
 
 /* Common routines to all controller types on the Sparc. */
-static __inline__ void virtual_dma_init(void)
+static inline void virtual_dma_init(void)
 {
        /* nothing... */
 }
 
-static __inline__ void sun_fd_disable_dma(void)
+static inline void sun_fd_disable_dma(void)
 {
        doing_pdma = 0;
        if (pdma_base) {
@@ -248,7 +246,7 @@ static __inline__ void sun_fd_disable_dma(void)
        }
 }
 
-static __inline__ void sun_fd_set_dma_mode(int mode)
+static inline void sun_fd_set_dma_mode(int mode)
 {
        switch(mode) {
        case DMA_MODE_READ:
@@ -263,17 +261,17 @@ static __inline__ void sun_fd_set_dma_mode(int mode)
        }
 }
 
-static __inline__ void sun_fd_set_dma_addr(char *buffer)
+static inline void sun_fd_set_dma_addr(char *buffer)
 {
        pdma_vaddr = buffer;
 }
 
-static __inline__ void sun_fd_set_dma_count(int length)
+static inline void sun_fd_set_dma_count(int length)
 {
        pdma_size = length;
 }
 
-static __inline__ void sun_fd_enable_dma(void)
+static inline void sun_fd_enable_dma(void)
 {
        pdma_vaddr = mmu_lockarea(pdma_vaddr, pdma_size);
        pdma_base = pdma_vaddr;
@@ -281,7 +279,8 @@ static __inline__ void sun_fd_enable_dma(void)
 }
 
 /* Our low-level entry point in arch/sparc/kernel/entry.S */
-irqreturn_t floppy_hardint(int irq, void *unused);
+extern int sparc_floppy_request_irq(int irq, unsigned long flags,
+                                   irqreturn_t (*irq_handler)(int irq, void *));
 
 static int sun_fd_request_irq(void)
 {
@@ -290,8 +289,9 @@ static int sun_fd_request_irq(void)
 
        if(!once) {
                once = 1;
-               error = request_fast_irq(FLOPPY_IRQ, floppy_hardint,
-                                        IRQF_DISABLED, "floppy");
+               error = sparc_floppy_request_irq(FLOPPY_IRQ,
+                                                IRQF_DISABLED,
+                                                floppy_interrupt);
                return ((error == 0) ? 0 : -1);
        } else return 0;
 }