1183651Sjhay/*- 2183651Sjhay * Copyright (c) 2008 John Hay. All rights reserved. 3183651Sjhay * 4183651Sjhay * Redistribution and use in source and binary forms, with or without 5183651Sjhay * modification, are permitted provided that the following conditions 6183651Sjhay * are met: 7183651Sjhay * 1. Redistributions of source code must retain the above copyright 8183651Sjhay * notice, this list of conditions and the following disclaimer. 9183651Sjhay * 2. Redistributions in binary form must reproduce the above copyright 10183651Sjhay * notice, this list of conditions and the following disclaimer in the 11183651Sjhay * documentation and/or other materials provided with the distribution. 12183651Sjhay * 13183651Sjhay * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14183651Sjhay * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15183651Sjhay * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16183651Sjhay * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17183651Sjhay * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18183651Sjhay * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19183651Sjhay * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20183651Sjhay * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21183651Sjhay * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22183651Sjhay * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23183651Sjhay * 24183651Sjhay * $FreeBSD$ 25183651Sjhay */ 26183651Sjhay 27183651Sjhay#ifndef ARM_BOOT_CF_ATA_H 28183651Sjhay#define ARM_BOOT_CF_ATA_H 29183651Sjhay 30183651Sjhay#define CF_DATA 0x00 31183651Sjhay#define CF_ERROR 0x01 32183651Sjhay#define CF_FEATURE 0x01 33183651Sjhay#define CF_SECT_CNT 0x02 34183651Sjhay#define CF_SECT_NUM 0x03 35183651Sjhay#define CF_CYL_L 0x04 36183651Sjhay#define CF_CYL_H 0x05 37183651Sjhay#define CF_DRV_HEAD 0x06 38183651Sjhay#define CF_D_MASTER 0x00 39183651Sjhay#define CF_D_LBA 0x40 40183651Sjhay#define CF_D_IBM 0xa0 41183651Sjhay#define CF_STATUS 0x07 42183651Sjhay#define CF_S_ERROR 0x01 43183651Sjhay#define CF_S_INDEX 0x02 44183651Sjhay#define CF_S_CORR 0x04 45183651Sjhay#define CF_S_DRQ 0x08 46183651Sjhay#define CF_S_DSC 0x10 47183651Sjhay#define CF_S_DWF 0x20 48183651Sjhay#define CF_S_READY 0x40 49183651Sjhay#define CF_S_BUSY 0x80 50183651Sjhay#define CF_COMMAND 0x07 51183651Sjhay 52183651Sjhay/* This is according to the appnote, but Sam use 0x1e in avila_ata.c */ 53183651Sjhay#define CF_ALT_STATUS 0x16 54183651Sjhay#define CF_ALT_DEV_CTR 0x16 55183651Sjhay#define CF_ALT_DEV_CTR2 0x1e 56183651Sjhay#define CF_A_IDS 0x02 57183651Sjhay#define CF_A_RESET 0x04 58183651Sjhay#define CF_A_4BIT 0x08 59183651Sjhay 60183651Sjhay#define AVILA_IDE_GPIN 12 61183651Sjhay 62183651Sjhay#endif /* !ARM_BOOT_CF_ATA_H */ 63