linux/drivers/ide/umc8672.c
<<
>>
Prefs
   1/*
   2 *  Copyright (C) 1995-1996  Linus Torvalds & author (see below)
   3 */
   4
   5/*
   6 *  Principal Author/Maintainer:  PODIEN@hml2.atlas.de (Wolfram Podien)
   7 *
   8 *  This file provides support for the advanced features
   9 *  of the UMC 8672 IDE interface.
  10 *
  11 *  Version 0.01        Initial version, hacked out of ide.c,
  12 *                      and #include'd rather than compiled separately.
  13 *                      This will get cleaned up in a subsequent release.
  14 *
  15 *  Version 0.02        now configs/compiles separate from ide.c  -ml
  16 *  Version 0.03        enhanced auto-tune, fix display bug
  17 *  Version 0.05        replace sti() with restore_flags()  -ml
  18 *                      add detection of possible race condition  -ml
  19 */
  20
  21/*
  22 * VLB Controller Support from
  23 * Wolfram Podien
  24 * Rohoefe 3
  25 * D28832 Achim
  26 * Germany
  27 *
  28 * To enable UMC8672 support there must a lilo line like
  29 * append="ide0=umc8672"...
  30 * To set the speed according to the abilities of the hardware there must be a
  31 * line like
  32 * #define UMC_DRIVE0 11
  33 * in the beginning of the driver, which sets the speed of drive 0 to 11 (there
  34 * are some lines present). 0 - 11 are allowed speed values. These values are
  35 * the results from the DOS speed test program supplied from UMC. 11 is the
  36 * highest speed (about PIO mode 3)
  37 */
  38#define REALLY_SLOW_IO          /* some systems can safely undef this */
  39
  40#include <linux/module.h>
  41#include <linux/types.h>
  42#include <linux/kernel.h>
  43#include <linux/delay.h>
  44#include <linux/timer.h>
  45#include <linux/mm.h>
  46#include <linux/ioport.h>
  47#include <linux/blkdev.h>
  48#include <linux/ide.h>
  49#include <linux/init.h>
  50
  51#include <  50
  38#define =umc86ot;ide0=umc86 this */
   4
   5/*
  36  37 */
  38#define  */
  38#define  */
  38#define  */
  38#define  */
  50
#define #define #define #define >
conspe#define  */
  50
  36 0IO */
conspe#define 
{0x0f, 0x0b, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1},/
{0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1},/
{0xff, 0xcb, 0xc0, 0x58, 0x36, 0x33, 0x23, 0x22, 0x21, 0x11, 0x10, 0x0}/
>
  50
voidW define sharW define 

 define 0x108)h>
 define 0x109)h>

  50
#define 

 define 0x108)h>
submit= define >

   4
voidW define 

inpe#define #define >
  50
 define 0x108)h          * Toers mment"> */
  50
 define >
 define >
 define >
supp( define 
W_IO define >
 define #define >
supp( define 
W_IO define #define >
W_IO define #define >
}/
 define 0x108)h          */
  50
 define =umc86ot;ide0:speed ohigheeo[f drive]: %d %d %d %d\n=umc86 this *,/
W_IO define #define #define #define >

  50
#define 

 define >
unsigget longW define >
conspe#define >
  50
 define =umc86%s:r, wte beers/ide dri (about %d (ets th%d)\n=umc86 this *,/
W_IO define #define >
ifp( define 
W_IO define #define >
ifp( define 
W_IO define =umc86ot;ide0:so#39;d672 IDE i UMCbusy: exite beed a_ers()\n=umc86 this *)h>
} else {/
W_IO define =incla=incl this *] =  define >
W_IO define >
}/
ifp( define 
W_IO define #define >

  50

. define W_IO=  define 
}h>
  50
rc="..>conspestrucpe#define 
. define 
. define W_IO=  define 
. define W_IO= orval define 
. define W_IO
. define W_IO=  define 
}h>
  50


unsigget longW define >
  50
ifp(! define =umc86ot;ide0=umc86 this *)) {/
W_IO define =umc86ot;ide0:sports>0x108-0x109 alreadymentuse.\n=umc86 this *)h>
W_IOsubmit=1h>
}/
 define >
 define 0x108)h          * Toers mment"> */
ifp( define 0xa0) {/
W_IO define >
W_IO define =umc86ot;ide0:snos suund\n=umc86 this *)h>
W_IO define >
W_IOsubmit=1h>
}/
 define 0x108)h          */
  50
 define >
 define >
  39
submit= define 0)h>
}/
  50
>
   4
 define linu_pilem_="lid_SLOW_IO" classm>linu_pilem_="lid_SLO( define #define #define 0)h>
 define #       =umc86prob >supp enable chipsep=umc86 this *)h>
>


ifp( define 0)  50
W_IOgoto> define >
  50
ifp( define 0)  50
W_IOsubmit=0h>
 define >
submit=- define >

  50
linu_i   _SLOW_IO" classm>linu_i   _SLO( define >
  50
=umc86ent"> * Wolfra=umc86 this *)h>
=umc86Sovides supp of the UMC 8chipsep=umc86 this *)h>
=umc86GPL=umc86 this *)h>

      
The original LXR softthe hbylts f/a>>
LXR  clau   y_SLO,>y undexperiass=   Initialhbyl/a>>

     
lxr.l"fre.no kindly hostedhbyl/a>>
is filersof L"fre>consulte be    operace c/comrvice/coinceight .
>