Add basic support for mini2440 board to barebox.
[barebox-mini2440.git] / include / ata.h
blobd56399ea7546558190d282fa1493949bd99c0efa
1 /*
2 * Copyright (C) 2009 Juergen Beisert, Pengutronix
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17 * MA 02111-1307 USA
21 /**
22 * @file
23 * @brief Declarations to communicate with ATA types of drives
26 #include <types.h>
27 #include <driver.h>
29 /**
30 * Access functions from drives through the specified interface
32 struct ata_interface {
33 /** write a count of sectors from a buffer to the drive */
34 int (*write)(struct device_d*, uint64_t, unsigned, const void*);
35 /** read a count of sectors from the drive into the buffer */
36 int (*read)(struct device_d*, uint64_t, unsigned, void*);
37 /** private interface data */
38 void *priv;