2 * Copyright (c) 2008 John Hay. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 #ifndef ARM_BOOT_CF_ATA_H
28 #define ARM_BOOT_CF_ATA_H
32 #define CF_FEATURE 0x01
33 #define CF_SECT_CNT 0x02
34 #define CF_SECT_NUM 0x03
37 #define CF_DRV_HEAD 0x06
38 #define CF_D_MASTER 0x00
41 #define CF_STATUS 0x07
42 #define CF_S_ERROR 0x01
43 #define CF_S_INDEX 0x02
44 #define CF_S_CORR 0x04
48 #define CF_S_READY 0x40
49 #define CF_S_BUSY 0x80
50 #define CF_COMMAND 0x07
52 /* This is according to the appnote, but Sam use 0x1e in avila_ata.c */
53 #define CF_ALT_STATUS 0x16
54 #define CF_ALT_DEV_CTR 0x16
55 #define CF_ALT_DEV_CTR2 0x1e
57 #define CF_A_RESET 0x04
58 #define CF_A_4BIT 0x08
60 #define AVILA_IDE_GPIN 12
62 #endif /* !ARM_BOOT_CF_ATA_H */