summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-05-19 10:51:43 -0400
committerTom Rini <trini@konsulko.com>2020-05-19 10:51:43 -0400
commitc2279d784e35fa25ee3a9fa28a74a1ba545f8c1e (patch)
tree158fd30f3d06142f6a99cbae6ed8ccb0f3be567b /drivers/ata
parented9a3aa6452f57af65eb74f73bd2a54c3a2f4b03 (diff)
parentcd93d625fd751d55c729c78b10f82109d56a5f1d (diff)
Merge branch '2020-05-18-reduce-size-of-common.h'
Bring in the latest round of Simon's changes to reduce what's in <common.h> overall.
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c4
-rw-r--r--drivers/ata/ahci_mvebu.c1
-rw-r--r--drivers/ata/ahci_sunxi.c2
-rw-r--r--drivers/ata/dwc_ahsata.c5
-rw-r--r--drivers/ata/fsl_sata.c3
-rw-r--r--drivers/ata/mvsata_ide.c1
-rw-r--r--drivers/ata/sata.c2
-rw-r--r--drivers/ata/sata_ceva.c1
-rw-r--r--drivers/ata/sata_mv.c5
-rw-r--r--drivers/ata/sata_sandbox.c1
-rw-r--r--drivers/ata/sata_sil.c2
-rw-r--r--drivers/ata/sata_sil3114.c20
12 files changed, 39 insertions, 8 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 4cd7420c3c..47cdea1f58 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -9,7 +9,11 @@
* This driver provides a SCSI interface to SATA.
*/
#include <common.h>
+#include <blk.h>
#include <cpu_func.h>
+#include <log.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <command.h>
#include <dm.h>
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 48a9d00d14..8be1826d40 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <ahci.h>
#include <dm.h>
+#include <log.h>
/*
* Dummy implementation that can be overwritten by a board
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 77b932aa03..58e345d998 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -1,10 +1,12 @@
#include <common.h>
#include <ahci.h>
#include <dm.h>
+#include <log.h>
#include <scsi.h>
#include <errno.h>
#include <asm/io.h>
#include <asm/gpio.h>
+#include <linux/delay.h>
#define AHCI_PHYCS0R 0x00c0
#define AHCI_PHYCS1R 0x00c4
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 2bc1de8b98..562e982e32 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -6,20 +6,25 @@
#include <common.h>
#include <ahci.h>
+#include <blk.h>
#include <cpu_func.h>
#include <dm.h>
#include <dwc_ahsata.h>
#include <fis.h>
#include <libata.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
+#include <part.h>
#include <sata.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/mach-imx/sata.h>
#include <linux/bitops.h>
#include <linux/ctype.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include "dwc_ahsata_priv.h"
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index c6680dc1c9..8c6726a621 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -6,9 +6,11 @@
*/
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <console.h>
#include <cpu_func.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/fsl_serdes.h>
@@ -16,6 +18,7 @@
#include <libata.h>
#include <fis.h>
#include <sata.h>
+#include <linux/delay.h>
#include "fsl_sata.h"
#if CONFIG_IS_ENABLED(BLK)
diff --git a/drivers/ata/mvsata_ide.c b/drivers/ata/mvsata_ide.c
index 6bbb345f6e..41f9a91617 100644
--- a/drivers/ata/mvsata_ide.c
+++ b/drivers/ata/mvsata_ide.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/io.h>
+#include <linux/delay.h>
#if defined(CONFIG_ARCH_ORION5X)
#include <asm/arch/orion5x.h>
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index e384b805b2..6a38d50024 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -11,7 +11,9 @@
#include <common.h>
#include <ahci.h>
+#include <blk.h>
#include <dm.h>
+#include <part.h>
#include <sata.h>
#ifndef CONFIG_AHCI
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index 2d496305d0..77508aa5bc 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <ahci.h>
+#include <log.h>
#include <scsi.h>
#include <asm/io.h>
#include <linux/ioport.h>
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 9ced9c0fa8..b2b5c699ad 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -33,14 +33,19 @@
#include <common.h>
#include <ahci.h>
+#include <blk.h>
#include <cpu_func.h>
#include <dm.h>
+#include <log.h>
+#include <asm/cache.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <fis.h>
#include <libata.h>
#include <malloc.h>
#include <sata.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <linux/mbus.h>
diff --git a/drivers/ata/sata_sandbox.c b/drivers/ata/sata_sandbox.c
index a28ac56ccd..e64cc4a5c1 100644
--- a/drivers/ata/sata_sandbox.c
+++ b/drivers/ata/sata_sandbox.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <blk.h>
int init_sata(int dev)
{
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 71ee0c04ef..6896fa8771 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <pci.h>
#include <command.h>
#include <asm/byteorder.h>
@@ -16,6 +17,7 @@
#include <sata.h>
#include <libata.h>
#include <sata.h>
+#include <linux/delay.h>
#if CONFIG_IS_ENABLED(BLK)
#include <dm.h>
diff --git a/drivers/ata/sata_sil3114.c b/drivers/ata/sata_sil3114.c
index 41635742a8..4d3a680f17 100644
--- a/drivers/ata/sata_sil3114.c
+++ b/drivers/ata/sata_sil3114.c
@@ -8,6 +8,9 @@
*/
#include <common.h>
+#include <blk.h>
+#include <log.h>
+#include <part.h>
#include <pci.h>
#include <command.h>
#include <config.h>
@@ -16,6 +19,7 @@
#include <ide.h>
#include <sata.h>
#include <libata.h>
+#include <linux/delay.h>
#include "sata_sil3114.h"
/* Convert sectorsize to wordsize */
@@ -61,9 +65,9 @@ static int sata_bus_softreset (int num)
port[num].ctl_reg = 0x08; /*Default value of control reg */
writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr);
- udelay (10);
+ udelay(10);
writeb (port[num].ctl_reg | ATA_SRST, port[num].ioaddr.ctl_addr);
- udelay (10);
+ udelay(10);
writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr);
/* spec mandates ">= 2ms" before checking status.
@@ -118,7 +122,7 @@ static void sata_identify (int num, int dev)
cmd = ATA_CMD_ID_ATA; /*Device Identify Command */
writeb (cmd, port[num].ioaddr.command_addr);
readb (port[num].ioaddr.altstatus_addr);
- udelay (10);
+ udelay(10);
status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 1000, 0);
if (status & ATA_ERR) {
@@ -191,7 +195,7 @@ static void set_Feature_cmd (int num, int dev)
writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr);
writeb (ATA_CMD_SET_FEATURES, port[num].ioaddr.command_addr);
- udelay (50);
+ udelay(50);
msleep (150);
status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 5000, 0);
@@ -389,7 +393,7 @@ static u8 wait_for_irq (int num, unsigned int max)
if (readl (port) & VND_TF_CNST_INTST) {
break;
}
- udelay (1000);
+ udelay(1000);
max--;
} while ((max > 0));
@@ -405,7 +409,7 @@ static u8 sata_busy_wait (struct sata_ioports *ioaddr, int bits,
if (!((status = sata_chk_status (ioaddr, usealtstatus)) & bits)) {
break;
}
- udelay (1000);
+ udelay(1000);
max--;
} while ((status & bits) && (max > 0));
@@ -426,7 +430,7 @@ static void msleep (int count)
int i;
for (i = 0; i < count; i++)
- udelay (1000);
+ udelay(1000);
}
/* Read up to 255 sectors
@@ -613,7 +617,7 @@ ulong sata_write (int device, ulong block, lbaint_t blkcnt, const void *buff)
output_data (&port[num].ioaddr, buffer, ATA_SECTOR_WORDS);
readb (port[num].ioaddr.altstatus_addr);
- udelay (50);
+ udelay(50);
++n;
++blknr;