Home | History | Annotate | Line # | Download | only in dev
      1 /*	$NetBSD: efareg.h,v 1.3 2014/01/03 00:33:06 rkujawa Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 2011 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Radoslaw Kujawa.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  *
     19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29  * POSSIBILITY OF SUCH DAMAGE.
     30  */
     31 
     32 #ifndef _AMIGA_EFAREG_H_
     33 
     34 #define FATA1_BASE		0xDA2000
     35 
     36 /* Offsets. Stride of 4 is used, so multiply any offset by 4. */
     37 #define FATA1_PIO0_OFF		0x0
     38 #define FATA1_PIO3_OFF		0x4000
     39 #define FATA1_PIO4_OFF		0x5000
     40 #define FATA1_PIO5_OFF		0x4800
     41 
     42 #define FATA1_CHAN_SIZE		0x400
     43 #define FATA1_REGS_SIZE		0x4BC0
     44 
     45 /* PIO0 */
     46 #define FATA1_PIO0_OFF_DATA	0x0
     47 #define FATA1_PIO0_OFF_ERROR	0x1
     48 #define FATA1_PIO0_OFF_SECCNT	0x2
     49 #define FATA1_PIO0_OFF_SECTOR	0x3
     50 #define FATA1_PIO0_OFF_CYL_LO	0x4
     51 #define FATA1_PIO0_OFF_CYL_HI	0x5
     52 #define FATA1_PIO0_OFF_SDH	0x6
     53 #define FATA1_PIO0_OFF_COMMAND	0x7
     54 
     55 /* PIO3-5 */
     56 #define FATA1_PION_OFF_DATA	0x82	/* 16-bit data port */
     57 #define FATA1_PION_OFF_DATA32	0x0	/* 32-bit data port, 2 cycles to HD */
     58 #define FATA1_PION_OFF_ERROR	0x80
     59 #define FATA1_PION_OFF_SECCNT	0x100
     60 #define FATA1_PION_OFF_SECTOR	0x180
     61 #define FATA1_PION_OFF_CYL_LO	0x200
     62 #define FATA1_PION_OFF_CYL_HI	0x280
     63 #define FATA1_PION_OFF_SDH	0x300
     64 #define FATA1_PION_OFF_COMMAND	0x380
     65 
     66 #define FATA1_PION_OFF_INTST	0x140	/* FastATA interrupt status */
     67 
     68 #define FATA1_INT_ANY		0x80
     69 #define FATA1_INT_DRIVE0	0x40
     70 #define FATA1_INT_DRIVE1	0x20
     71 
     72 #endif /* _AMIGA_EFAREG_H_ */
     73 
     74