root/include/asm-i386/floppy.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. virtual_dma_init

   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_I386_FLOPPY_H
  11 #define __ASM_I386_FLOPPY_H
  12 
  13 #define fd_inb(port)                    inb_p(port)
  14 #define fd_outb(port,value)             outb_p(port,value)
  15 
  16 #define fd_enable_dma()         enable_dma(FLOPPY_DMA)
  17 #define fd_disable_dma()        disable_dma(FLOPPY_DMA)
  18 #define fd_request_dma()        request_dma(FLOPPY_DMA,"floppy")
  19 #define fd_free_dma()           free_dma(FLOPPY_DMA)
  20 #define fd_clear_dma_ff()       clear_dma_ff(FLOPPY_DMA)
  21 #define fd_set_dma_mode(mode)   set_dma_mode(FLOPPY_DMA,mode)
  22 #define fd_set_dma_addr(addr)   set_dma_addr(FLOPPY_DMA,addr)
  23 #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count)
  24 #define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
  25 #define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
  26 #define fd_cacheflush(addr,size) /* nothing */
  27 #define fd_request_irq()        request_irq(FLOPPY_IRQ, floppy_interrupt, \
  28                                             SA_INTERRUPT|SA_SAMPLE_RANDOM, \
  29                                             "floppy")
  30 #define fd_free_irq()           free_irq(FLOPPY_IRQ);
  31 
  32 __inline__ void virtual_dma_init(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  33 {
  34         /* Nothing to do on an i386 */
  35 }
  36 
  37 static int FDC1 = 0x3f0;
  38 static int FDC2 = -1;
  39 
  40 #define FLOPPY0_TYPE    ((CMOS_READ(0x10) >> 4) & 15)
  41 #define FLOPPY1_TYPE    (CMOS_READ(0x10) & 15)
  42 
  43 #define N_FDC 2
  44 #define N_DRIVE 8
  45 
  46 /*
  47  * The DMA channel used by the floppy controller cannot access data at
  48  * addresses >= 16MB
  49  *
  50  * Went back to the 1MB limit, as some people had problems with the floppy
  51  * driver otherwise. It doesn't matter much for performance anyway, as most
  52  * floppy accesses go through the track buffer.
  53  */
  54 #define CROSS_64KB(a,s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)
  55 
  56 #endif /* __ASM_I386_FLOPPY_H */

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