#include <part.h>
#include <ide.h>
#include <ata.h>
-
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-extern int sata_curr_device;
+#include <sata.h>
#define DEBUG_SATA 0 /* For debug prints set DEBUG_SATA to 1 */
void dev_select(struct sata_ioports *ioaddr, int dev);
u8 sata_busy_wait(struct sata_ioports *ioaddr, int bits, unsigned int max);
u8 sata_chk_status(struct sata_ioports *ioaddr);
-ulong sata_read(int device, ulong blknr,lbaint_t blkcnt, void *buffer);
-ulong sata_write(int device,ulong blknr, lbaint_t blkcnt, const void *buffer);
#endif
/************DRIVER SPECIFIC DEFINITIONS AND DECLARATIONS**************/
#include <libata.h>
#include <ahci.h>
#include <fis.h>
+#include <sata.h>
#include <common.h>
#include <malloc.h>
#define READ_CMD 0
#define WRITE_CMD 1
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-
#endif /* __FSL_SATA_H__ */
#include <malloc.h>
#include <libata.h>
#include <fis.h>
+#include <sata.h>
#include "fsl_sata.h"
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-
#ifndef CONFIG_SYS_SATA1_FLAGS
#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
#endif
#include <asm/portmux.h>
#include <asm/mach-common/bits/pata.h>
#include <ata.h>
+#include <sata.h>
#include <libata.h>
#include "pata_bfin.h"
unsigned char dev_mask;
};
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-
#define DRV_NAME "pata-bfin"
#define DRV_VERSION "0.9"
#define __iomem
#include <asm/io.h>
#include <malloc.h>
#include <ata.h>
+#include <sata.h>
#include <linux/ctype.h>
#include "sata_dwc.h"
unsigned int flags, u16 *id);
static int check_sata_dev_state(void);
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-
static const struct ata_port_info sata_dwc_port_info[] = {
{
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
#include <malloc.h>
#include <asm/io.h>
#include <fis.h>
+#include <sata.h>
#include <libata.h>
#include "sata_sil.h"
#define READ_CMD 0
#define WRITE_CMD 1
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
-
/*
* SATA device driver struct for each dev
*/
#include <asm/byteorder.h>
#include <asm/io.h>
#include <ide.h>
+#include <sata.h>
#include <libata.h>
#include "sata_sil3114.h"
static void msleep (int count);
static u32 iobase[6] = { 0, 0, 0, 0, 0, 0}; /* PCI BAR registers for device */
-extern block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
static struct sata_port port[CONFIG_SYS_SATA_MAX_DEVICE];
#ifndef __SATA_H__
#define __SATA_H__
+#include <part.h>
int init_sata(int dev);
int scan_sata(int dev);
-ulong sata_read(int dev, ulong blknr, ulong blkcnt, void *buffer);
-ulong sata_write(int dev, ulong blknr, ulong blkcnt, const void *buffer);
+ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer);
+ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer);
int sata_initialize(void);
int __sata_initialize(void);
+extern block_dev_desc_t sata_dev_desc[];
+
#endif