aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-06-10 22:59:26 -0400
committerTom Rini <trini@konsulko.com>2022-06-28 17:03:31 -0400
commit21af94f882b764353b781c8a4569961124189e0b (patch)
tree6e53e1e906aa5aad73ae94a05f2e39bb8e020a5c
parent7b976f7a0b5ab18e3671d683f8092d7ddb0622b5 (diff)
downloadu-boot-21af94f882b764353b781c8a4569961124189e0b.zip
u-boot-21af94f882b764353b781c8a4569961124189e0b.tar.gz
u-boot-21af94f882b764353b781c8a4569961124189e0b.tar.bz2
ata: fsl_sata: Remove legacy non-BLK code
The migration deadline for this has passed and all boards have been updated, remove this legacy code and references for it. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--drivers/ata/fsl_sata.c70
-rw-r--r--drivers/ata/fsl_sata.h2
-rw-r--r--include/configs/MPC837XERDB.h9
-rw-r--r--include/configs/P1010RDB.h7
-rw-r--r--include/configs/P2041RDB.h7
-rw-r--r--include/configs/T104xRDB.h4
-rw-r--r--include/configs/T208xQDS.h6
-rw-r--r--include/configs/T208xRDB.h6
-rw-r--r--include/configs/T4240RDB.h14
-rw-r--r--include/configs/corenet_ds.h7
-rw-r--r--include/configs/ls1028aqds.h1
-rw-r--r--include/configs/ls1028ardb.h1
-rw-r--r--include/configs/ls1088a_common.h5
-rw-r--r--include/configs/ls2080aqds.h5
-rw-r--r--include/configs/ls2080ardb.h5
-rw-r--r--include/configs/lx2160a_common.h7
16 files changed, 3 insertions, 153 deletions
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index d1bab93..6db4247 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -6,10 +6,13 @@
*/
#include <common.h>
+#include <ahci.h>
#include <blk.h>
#include <command.h>
#include <console.h>
#include <cpu_func.h>
+#include <dm.h>
+#include <dm/device-internal.h>
#include <log.h>
#include <asm/io.h>
#include <asm/processor.h>
@@ -21,33 +24,6 @@
#include <linux/delay.h>
#include "fsl_sata.h"
-#if CONFIG_IS_ENABLED(BLK)
-#include <dm.h>
-#include <ahci.h>
-#include <blk.h>
-#include <dm/device-internal.h>
-#else
-#ifndef CONFIG_SYS_SATA1_FLAGS
- #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#endif
-#ifndef CONFIG_SYS_SATA2_FLAGS
- #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-#endif
-
-static struct fsl_sata_info fsl_sata_info[] = {
-#ifdef CONFIG_SATA1
- {CONFIG_SYS_SATA1, CONFIG_SYS_SATA1_FLAGS},
-#else
- {0, 0},
-#endif
-#ifdef CONFIG_SATA2
- {CONFIG_SYS_SATA2, CONFIG_SYS_SATA2_FLAGS},
-#else
- {0, 0},
-#endif
-};
-#endif
-
static inline void sdelay(unsigned long sec)
{
unsigned long i;
@@ -86,11 +62,7 @@ static int ata_wait_register(unsigned __iomem *addr, u32 mask,
return (i < timeout_msec) ? 0 : -1;
}
-#if !CONFIG_IS_ENABLED(BLK)
-int init_sata(int dev)
-#else
static int init_sata(struct fsl_ata_priv *priv, int dev)
-#endif
{
u32 length, align;
cmd_hdr_tbl_t *cmd_hdr;
@@ -129,15 +101,9 @@ static int init_sata(struct fsl_ata_priv *priv, int dev)
snprintf(sata->name, 12, "SATA%d:", dev);
/* Set the controller register base address to device struct */
-#if !CONFIG_IS_ENABLED(BLK)
- sata_dev_desc[dev].priv = (void *)sata;
- reg = (fsl_sata_reg_t *)(fsl_sata_info[dev].sata_reg_base);
- sata->dma_flag = fsl_sata_info[dev].flags;
-#else
reg = (fsl_sata_reg_t *)(priv->base + priv->offset * dev);
sata->dma_flag = priv->flag;
priv->fsl_sata = sata;
-#endif
sata->reg_base = reg;
/* Allocate the command header table, 4 bytes aligned */
@@ -738,17 +704,11 @@ static u32 ata_low_level_rw_lba28(fsl_sata_t *sata, u32 blknr, u32 blkcnt,
/*
* SATA interface between low level driver and command layer
*/
-#if !CONFIG_IS_ENABLED(BLK)
-ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer)
-{
- fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv;
-#else
static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
void *buffer)
{
struct fsl_ata_priv *priv = dev_get_plat(dev);
fsl_sata_t *sata = priv->fsl_sata;
-#endif
u32 rc;
if (sata->lba48)
@@ -760,17 +720,11 @@ static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
return rc;
}
-#if !CONFIG_IS_ENABLED(BLK)
-ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer)
-{
- fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv;
-#else
static ulong sata_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
const void *buffer)
{
struct fsl_ata_priv *priv = dev_get_plat(dev);
fsl_sata_t *sata = priv->fsl_sata;
-#endif
u32 rc;
if (sata->lba48) {
@@ -801,17 +755,11 @@ static void fsl_sata_identify(fsl_sata_t *sata, u16 *id)
ata_swap_buf_le16(id, ATA_ID_WORDS);
}
-#if !CONFIG_IS_ENABLED(BLK)
-int scan_sata(int dev)
-{
- fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv;
-#else
static int scan_sata(struct udevice *dev)
{
struct blk_desc *desc = dev_get_uclass_plat(dev);
struct fsl_ata_priv *priv = dev_get_plat(dev);
fsl_sata_t *sata = priv->fsl_sata;
-#endif
unsigned char serial[ATA_ID_SERNO_LEN + 1];
unsigned char firmware[ATA_ID_FW_REV_LEN + 1];
@@ -853,15 +801,6 @@ static int scan_sata(struct udevice *dev)
debug("Device supports LBA28\n\r");
#endif
-#if !CONFIG_IS_ENABLED(BLK)
- memcpy(sata_dev_desc[dev].product, serial, sizeof(serial));
- memcpy(sata_dev_desc[dev].revision, firmware, sizeof(firmware));
- memcpy(sata_dev_desc[dev].vendor, product, sizeof(product));
- sata_dev_desc[dev].lba = (u32)n_sectors;
-#ifdef CONFIG_LBA48
- sata_dev_desc[dev].lba48 = sata->lba48;
-#endif
-#else
memcpy(desc->product, serial, sizeof(serial));
memcpy(desc->revision, firmware, sizeof(firmware));
memcpy(desc->vendor, product, sizeof(product));
@@ -869,7 +808,6 @@ static int scan_sata(struct udevice *dev)
#ifdef CONFIG_LBA48
desc->lba48 = sata->lba48;
#endif
-#endif
/* Get the NCQ queue depth from device */
sata->queue_depth = ata_id_queue_depth(id);
@@ -890,7 +828,6 @@ static int scan_sata(struct udevice *dev)
return 0;
}
-#if CONFIG_IS_ENABLED(BLK)
static const struct blk_ops sata_fsl_blk_ops = {
.read = sata_read,
.write = sata_write,
@@ -1042,4 +979,3 @@ U_BOOT_DRIVER(fsl_ahci) = {
.remove = fsl_ata_remove,
.priv_auto = sizeof(struct fsl_ata_priv),
};
-#endif
diff --git a/drivers/ata/fsl_sata.h b/drivers/ata/fsl_sata.h
index 5b9daa7..e1ea8eb3 100644
--- a/drivers/ata/fsl_sata.h
+++ b/drivers/ata/fsl_sata.h
@@ -319,7 +319,6 @@ typedef struct fsl_sata {
#define READ_CMD 0
#define WRITE_CMD 1
-#if CONFIG_IS_ENABLED(BLK)
struct fsl_ata_priv {
u32 base;
u32 flag;
@@ -327,6 +326,5 @@ struct fsl_ata_priv {
u32 offset;
fsl_sata_t *fsl_sata;
};
-#endif
#endif /* __FSL_SATA_H__ */
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 4995bce..de197a0 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -265,15 +265,6 @@
/*
* SATA
*/
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1_OFFSET 0x18000
-#define CONFIG_SYS_SATA1 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA1_OFFSET)
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2_OFFSET 0x19000
-#define CONFIG_SYS_SATA2 (CONFIG_SYS_IMMR + CONFIG_SYS_SATA2_OFFSET)
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#ifdef CONFIG_FSL_SATA
#define CONFIG_LBA48
#endif
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index d5b8cfa..15add28 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -476,13 +476,6 @@ extern unsigned long get_sdram_size(void);
#define CONFIG_FSL_SATA_V2
#ifdef CONFIG_FSL_SATA
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif /* #ifdef CONFIG_FSL_SATA */
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 38acb38..8a71239 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -340,13 +340,6 @@
#define CONFIG_FSL_SATA_V2
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index bb05b2e..e7ebf79 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -393,10 +393,6 @@
/* SATA */
#define CONFIG_FSL_SATA_V2
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index e46488b..06be25b 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -462,12 +462,6 @@
* SATA
*/
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
#define CONFIG_LBA48
#endif
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index d4bf938..f96208d 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -418,12 +418,6 @@
* SATA
*/
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
#define CONFIG_LBA48
#endif
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index ebdd47e..542786a 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -155,13 +155,6 @@
/* SATA */
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif
@@ -435,13 +428,6 @@
/* SATA */
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 56b56e8..6006f76 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -339,13 +339,6 @@
/* SATA */
#ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SATA1
-#define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
-#define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
-#define CONFIG_SATA2
-#define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
-#define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
-
#define CONFIG_LBA48
#endif
diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h
index 35363cc..5270363 100644
--- a/include/configs/ls1028aqds.h
+++ b/include/configs/ls1028aqds.h
@@ -60,7 +60,6 @@
/* SATA */
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
#ifndef SPL_NO_ENV
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/ls1028ardb.h b/include/configs/ls1028ardb.h
index 9122378..665723b 100644
--- a/include/configs/ls1028ardb.h
+++ b/include/configs/ls1028ardb.h
@@ -53,7 +53,6 @@
#define SCSI_VEND_ID 0x1b4b
#define SCSI_DEV_ID 0x9170
#define CONFIG_SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
/* Initial environment variables */
#ifndef SPL_NO_ENV
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index 9a29bb6..ff85f1e 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -115,11 +115,6 @@ unsigned long long get_qixis_addr(void);
/* Miscellaneous configurable options */
-/* SATA */
-#ifdef CONFIG_SCSI
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
-#endif
-
/* Physical Memory Map */
#define CONFIG_HWCONFIG
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 9ce48a0..f2eae07 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -29,11 +29,6 @@
#define CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR 1
#endif
-/* SATA */
-
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
-#define CONFIG_SYS_SATA2 AHCI_BASE_ADDR2
-
#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
#define CONFIG_SYS_NOR_AMASK IFC_AMASK(128*1024*1024)
#define CONFIG_SYS_NOR_AMASK_EARLY IFC_AMASK(64*1024*1024)
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index cdfc9fd..43bcc5a 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -34,11 +34,6 @@
#define CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR 1
#endif
-/* SATA */
-
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
-#define CONFIG_SYS_SATA2 AHCI_BASE_ADDR2
-
#if !defined(CONFIG_FSL_QSPI) || defined(CONFIG_TFABOOT)
#define CONFIG_SYS_NOR0_CSPR_EXT (0x0)
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index 5609668..f8c3a09 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -95,13 +95,6 @@
#define CONFIG_PCI_SCAN_SHOW
#endif
-/* SATA */
-
-#ifdef CONFIG_SCSI
-#define CONFIG_SYS_SATA1 AHCI_BASE_ADDR1
-#define CONFIG_SYS_SATA2 AHCI_BASE_ADDR2
-#endif
-
/* USB */
#ifdef CONFIG_USB_HOST
#ifndef CONFIG_TARGET_LX2162AQDS