]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sata.h: Make all sata/ata drivers include <sata.h>
authorPavel Herrmann <morpheus.ibis@gmail.com>
Thu, 27 Sep 2012 23:18:04 +0000 (23:18 +0000)
committerTom Rini <trini@ti.com>
Mon, 15 Oct 2012 18:54:03 +0000 (11:54 -0700)
- block_dev_desc_t says that block_(read|write) take lbaint_t for blkcnt
  not ulong.
- We also move the extern of sata_dev_desc into <sata.h>
- Remove now duplicate declarations from driver-specific headers.

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
12 files changed:
drivers/block/ata_piix.c
drivers/block/ata_piix.h
drivers/block/dwc_ahsata.c
drivers/block/dwc_ahsata.h
drivers/block/fsl_sata.c
drivers/block/pata_bfin.c
drivers/block/pata_bfin.h
drivers/block/sata_dwc.c
drivers/block/sata_sil.c
drivers/block/sata_sil.h
drivers/block/sata_sil3114.c
include/sata.h

index dd411f12d67f9e1ba4c8dc90a0eb149947486e3f..1e33a66c45078acc66640346d17323babd2e2579 100644 (file)
@@ -34,9 +34,7 @@
 #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 */
 
index 85a8843a2d3536f27ea64ed6f8dbd7fa5539406a..6c68ea2f0184e7d5f3da11bac7a62372197c4d42 100644 (file)
@@ -56,8 +56,6 @@ int sata_devchk(struct sata_ioports *ioaddr, int dev);
 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**************/
index 70752d286903f7c7a0209212e88cbbddb995521c..c9b71f7e1f92b3afc6fc26082140f9dd7d2aca47 100644 (file)
@@ -24,6 +24,7 @@
 #include <libata.h>
 #include <ahci.h>
 #include <fis.h>
+#include <sata.h>
 
 #include <common.h>
 #include <malloc.h>
index 84860ea49259afcce797487e0df86c751d261309..4dac5dcae25d8ab01d65e419be1305ce52e41b0a 100644 (file)
 #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__ */
index ed4647f8370ea43baf99a13b0e37662a89df537c..fda3389e8bf69a1ad6a321f7d499384e3c7b81b7 100644 (file)
 #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
index 2b4437efd326bdaf36fc340b3f266285fe449d2d..b847dd91e73b474d65f428cc0763c8a1939eb287 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/portmux.h>
 #include <asm/mach-common/bits/pata.h>
 #include <ata.h>
+#include <sata.h>
 #include <libata.h>
 #include "pata_bfin.h"
 
index 2b3425bc9547222c8a60d21339741d068ad05457..2093cf06b4bbda0a3693982499933563e1fc0156 100644 (file)
@@ -41,8 +41,6 @@ struct ata_port {
        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
index cc4446ad7b6af52a74c088d135a712c717589c17..28d87f538bff23ab8cd988bdf017c6a1ffd40fe6 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/io.h>
 #include <malloc.h>
 #include <ata.h>
+#include <sata.h>
 #include <linux/ctype.h>
 
 #include "sata_dwc.h"
@@ -268,8 +269,6 @@ static int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
                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 |
index 27cfa3da93d290ed7fc4905faad0f80aa83cd54a..245b872f993942ae02958f5563bc7475f504f83b 100644 (file)
@@ -25,6 +25,7 @@
 #include <malloc.h>
 #include <asm/io.h>
 #include <fis.h>
+#include <sata.h>
 #include <libata.h>
 #include "sata_sil.h"
 
index 2dfd4a5e549aedccbdb328fbeb5c07c9732ffe5b..9f3a37f508f6618e548d97e6fbab5d1b298350c5 100644 (file)
@@ -24,8 +24,6 @@
 #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
  */
index 34fe038608500c412f186bfba39607e9b189fcf5..3a5e0328f5d9a0319116ded17da75d5122b00ec0 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/byteorder.h>
 #include <asm/io.h>
 #include <ide.h>
+#include <sata.h>
 #include <libata.h>
 #include "sata_sil3114.h"
 
@@ -48,7 +49,6 @@ static u8 sata_chk_status (struct sata_ioports *ioaddr, u8 usealtstatus);
 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];
 
index 37573cfee20a43befcfb6da7257fbdb7b3e7e8f4..c95dc56e944c338b1022901788857a2d699a2e33 100644 (file)
@@ -1,12 +1,15 @@
 #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