root/include/asm-mips/floppy.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Architecture specific parts of the Floppy driver
   3  *
   4  * This file is subject to the terms and conditions of the GNU General Public
   5  * License.  See the file "COPYING" in the main directory of this archive
   6  * for more details.
   7  *
   8  * Copyright (C) 1995
   9  */
  10 #ifndef __ASM_MIPS_FLOPPY_H
  11 #define __ASM_MIPS_FLOPPY_H
  12 
  13 #include <linux/config.h>
  14 
  15 #include <asm/bootinfo.h>
  16 #include <asm/jazz.h>
  17 #include <asm/jazzdma.h>
  18 #include <asm/mipsconfig.h>
  19 #include <asm/vector.h>
  20 
  21 #define fd_inb(port)                    feature->fd_inb(port)
  22 #define fd_outb(port,value)             feature->fd_outb(port,value)
  23 
  24 #define fd_enable_dma()                 feature->fd_enable_dma()
  25 #define fd_disable_dma()                feature->fd_disable_dma()
  26 #define fd_request_dma()                feature->fd_request_dma()
  27 #define fd_free_dma()                   feature->fd_free_dma()
  28 #define fd_clear_dma_ff()               feature->fd_clear_dma_ff()
  29 #define fd_set_dma_mode(mode)           feature->fd_set_dma_mode(mode)
  30 #define fd_set_dma_addr(addr)           feature->fd_set_dma_addr(addr)
  31 #define fd_set_dma_count(count)         feature->fd_set_dma_count(count)
  32 #define fd_get_dma_residue()            feature->fd_get_dma_residue()
  33 #define fd_enable_irq()                 feature->fd_enable_irq()
  34 #define fd_disable_irq()                feature->fd_disable_irq()
  35 #define fd_cacheflush(addr, size)       feature->fd_cacheflush((void *)addr, size)
  36 #define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt, \
  37                                             SA_INTERRUPT|SA_SAMPLE_RANDOM, \
  38                                             "floppy")
  39 #define fd_free_irq()           free_irq(FLOPPY_IRQ);
  40 
  41 #define virtual_dma_init()                                              \
  42         if (boot_info.machtype == MACH_ACER_PICA_61 ||                  \
  43             boot_info.machtype == MACH_MIPS_MAGNUM_4000 ||              \
  44             boot_info.machtype == MACH_OLIVETTI_M700)                   \
  45                 vdma_alloc(PHYSADDR(floppy_track_buffer),               \
  46                            512*2*MAX_BUFFER_SECTORS);
  47 
  48 /*
  49  * And on Mips's the CMOS info failes also ...
  50  *
  51  * FIXME: This information should come from the ARC configuration tree
  52  *        or whereever a parivular machine has stored this ...
  53  */
  54 #define FLOPPY0_TYPE 4          /* this is wrong for the Olli M700, but who cares... */
  55 #define FLOPPY1_TYPE 0
  56 
  57 #ifdef MODULE
  58 #define FDC1                    ((boot_info.machtype == MACH_ACER_PICA_61 || \
  59                                 boot_info.machtype == MACH_MIPS_MAGNUM_4000 || \
  60                                 boot_info.machtype == MACH_OLIVETTI_M700) ? \
  61                                 0xe0003000 : 0x3f0)
  62 int FDC2=-1;
  63 #else
  64 #define FDC1                    ((boot_info.machtype == MACH_ACER_PICA_61 || \
  65                                 boot_info.machtype == MACH_MIPS_MAGNUM_4000 || \
  66                                 boot_info.machtype == MACH_OLIVETTI_M700) ? \
  67                                 0xe0003000 : 0x3f0)
  68 static int FDC2=-1;
  69 #endif /* MODULE */
  70 
  71 #define N_FDC 1                 /* do you *really* want a second controller? */
  72 #define N_DRIVE 8
  73 
  74 /*
  75  * The DMA channel used by the floppy controller cannot access data at
  76  * addresses >= 16MB
  77  *
  78  * Went back to the 1MB limit, as some people had problems with the floppy
  79  * driver otherwise. It doesn't matter much for performance anyway, as most
  80  * floppy accesses go through the track buffer.
  81  *
  82  * On MIPSes using vdma, this actually means that *all* transfers go thru
  83  * the * track buffer since 0x1000000 is always smaller than KSEG0/1.
  84  * Actually this needs to be a bit more complicated since the so much different
  85  * hardware available with MIPS CPUs ...
  86  */
  87 #define CROSS_64KB(a,s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
  88 
  89 #endif /* __ASM_MIPS_FLOPPY_H */

/* [previous][next][first][last][top][bottom][index][help] */