xref: /rk3399_rockchip-uboot/include/ide.h (revision 0f9cfa09df48b86ce5f8baefb3300417cc5b845b)
1*0f9cfa09Swdenk /*
2*0f9cfa09Swdenk  * (C) Copyright 2000
3*0f9cfa09Swdenk  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4*0f9cfa09Swdenk  *
5*0f9cfa09Swdenk  * See file CREDITS for list of people who contributed to this
6*0f9cfa09Swdenk  * project.
7*0f9cfa09Swdenk  *
8*0f9cfa09Swdenk  * This program is free software; you can redistribute it and/or
9*0f9cfa09Swdenk  * modify it under the terms of the GNU General Public License as
10*0f9cfa09Swdenk  * published by the Free Software Foundation; either version 2 of
11*0f9cfa09Swdenk  * the License, or (at your option) any later version.
12*0f9cfa09Swdenk  *
13*0f9cfa09Swdenk  * This program is distributed in the hope that it will be useful,
14*0f9cfa09Swdenk  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15*0f9cfa09Swdenk  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*0f9cfa09Swdenk  * GNU General Public License for more details.
17*0f9cfa09Swdenk  *
18*0f9cfa09Swdenk  * You should have received a copy of the GNU General Public License
19*0f9cfa09Swdenk  * along with this program; if not, write to the Free Software
20*0f9cfa09Swdenk  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21*0f9cfa09Swdenk  * MA 02111-1307 USA
22*0f9cfa09Swdenk  */
23*0f9cfa09Swdenk 
24*0f9cfa09Swdenk #ifndef	_IDE_H
25*0f9cfa09Swdenk #define _IDE_H
26*0f9cfa09Swdenk 
27*0f9cfa09Swdenk #define	IDE_BUS(dev)	(dev >> 1)
28*0f9cfa09Swdenk 
29*0f9cfa09Swdenk #ifdef CONFIG_IDE_LED
30*0f9cfa09Swdenk 
31*0f9cfa09Swdenk /*
32*0f9cfa09Swdenk  * LED Port
33*0f9cfa09Swdenk  */
34*0f9cfa09Swdenk #define	LED_PORT	((uchar *)(PER8_BASE + 0x3000))
35*0f9cfa09Swdenk #define LED_IDE1	0x01
36*0f9cfa09Swdenk #define LED_IDE2	0x02
37*0f9cfa09Swdenk #define	DEVICE_LED(d)	((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */
38*0f9cfa09Swdenk 
39*0f9cfa09Swdenk #endif /* CONFIG_IDE_LED */
40*0f9cfa09Swdenk 
41*0f9cfa09Swdenk /*
42*0f9cfa09Swdenk  * Function Prototypes
43*0f9cfa09Swdenk  */
44*0f9cfa09Swdenk 
45*0f9cfa09Swdenk void  ide_init  (void);
46*0f9cfa09Swdenk ulong ide_read  (int device, ulong blknr, ulong blkcnt, ulong *buffer);
47*0f9cfa09Swdenk ulong ide_write (int device, ulong blknr, ulong blkcnt, ulong *buffer);
48*0f9cfa09Swdenk 
49*0f9cfa09Swdenk #endif /* _IDE_H */
50