~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/drivers/ide/falconide.c

Version: ~ [ 2.2.5 ] ~ [ 2.4.1 ] ~ [ 2.4.9 ] ~ [ 2.6.17.10 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  linux/drivers/ide/falconide.c -- Atari Falcon IDE Driver
  3  *
  4  *     Created 12 Jul 1997 by Geert Uytterhoeven
  5  *
  6  *  This file is subject to the terms and conditions of the GNU General Public
  7  *  License.  See the file COPYING in the main directory of this archive for
  8  *  more details.
  9  */
 10 
 11 #include <linux/types.h>
 12 #include <linux/mm.h>
 13 #include <linux/interrupt.h>
 14 #include <linux/blkdev.h>
 15 #include <linux/hdreg.h>
 16 #include <linux/ide.h>
 17 #include <linux/init.h>
 18 
 19 #include <asm/atarihw.h>
 20 #include <asm/atariints.h>
 21 #include <asm/atari_stdma.h>
 22 
 23 
 24     /*
 25      *  Base of the IDE interface
 26      */
 27 
 28 #define ATA_HD_BASE     0xfff00000
 29 
 30     /*
 31      *  Offsets from the above base
 32      */
 33 
 34 #define ATA_HD_DATA     0x00
 35 #define ATA_HD_ERROR    0x05            /* see err-bits */
 36 #define ATA_HD_NSECTOR  0x09            /* nr of sectors to read/write */
 37 #define ATA_HD_SECTOR   0x0d            /* starting sector */
 38 #define ATA_HD_LCYL     0x11            /* starting cylinder */
 39 #define ATA_HD_HCYL     0x15            /* high byte of starting cyl */
 40 #define ATA_HD_SELECT   0x19            /* 101dhhhh , d=drive, hhhh=head */
 41 #define ATA_HD_STATUS   0x1d            /* see status-bits */
 42 #define ATA_HD_CONTROL  0x39
 43 
 44 static int __init falconide_offsets[IDE_NR_PORTS] = {
 45     ATA_HD_DATA, ATA_HD_ERROR, ATA_HD_NSECTOR, ATA_HD_SECTOR, ATA_HD_LCYL,
 46     ATA_HD_HCYL, ATA_HD_SELECT, ATA_HD_STATUS, ATA_HD_CONTROL, -1
 47 };
 48 
 49 
 50     /*
 51      *  Probe for a Falcon IDE interface
 52      */
 53 
 54 void __init falconide_init(void)
 55 {
 56     if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
 57         hw_regs_t hw;
 58         int index;
 59 
 60         ide_setup_ports(&hw, (ide_ioreg_t)ATA_HD_BASE, falconide_offsets,
 61                         0, 0, NULL, IRQ_MFP_IDE);
 62         index = ide_register_hw(&hw, NULL);
 63 
 64         if (index != -1)
 65             printk("ide%d: Falcon IDE interface\n", index);
 66     }
 67 }
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.