sata: Only support BLK

No boards currently use SATA without BLK:

   ./tools/moveconfig.py -f SATA ~BLK
   0 matches

Make SATA depend on BLK to avoid any future confusion. Drop the dead code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Simon Glass 2022-01-31 07:49:32 -07:00 committed by Tom Rini
parent e32ec06c9e
commit 580937bcd8
2 changed files with 1 additions and 30 deletions

View File

@ -9,6 +9,7 @@ config AHCI
config SATA config SATA
bool "Support SATA controllers" bool "Support SATA controllers"
depends on BLK
select HAVE_BLOCK_DEVICE select HAVE_BLOCK_DEVICE
help help
This enables support for SATA (Serial Advanced Technology This enables support for SATA (Serial Advanced Technology
@ -86,7 +87,6 @@ config FSL_SATA
bool "Enable Freescale SATA controller driver support" bool "Enable Freescale SATA controller driver support"
select AHCI select AHCI
select LIBATA select LIBATA
depends on BLK
help help
Enable this driver to support the SATA controller found in Enable this driver to support the SATA controller found in
some Freescale PowerPC SoCs. some Freescale PowerPC SoCs.
@ -95,7 +95,6 @@ config SATA_MV
bool "Enable Marvell SATA controller driver support" bool "Enable Marvell SATA controller driver support"
select AHCI select AHCI
select LIBATA select LIBATA
depends on BLK
help help
Enable this driver to support the SATA controller found in Enable this driver to support the SATA controller found in
some Marvell SoCs. some Marvell SoCs.
@ -104,7 +103,6 @@ config SATA_SIL
bool "Enable Silicon Image SIL3131 / SIL3132 / SIL3124 SATA driver support" bool "Enable Silicon Image SIL3131 / SIL3132 / SIL3124 SATA driver support"
select AHCI select AHCI
select LIBATA select LIBATA
depends on BLK
help help
Enable this driver to support the SIL3131, SIL3132 and SIL3124 Enable this driver to support the SIL3131, SIL3132 and SIL3124
SATA controllers. SATA controllers.

View File

@ -59,7 +59,6 @@ struct blk_desc *sata_get_dev(int dev)
#endif #endif
#endif #endif
#ifdef CONFIG_BLK
static unsigned long sata_bread(struct udevice *dev, lbaint_t start, static unsigned long sata_bread(struct udevice *dev, lbaint_t start,
lbaint_t blkcnt, void *dst) lbaint_t blkcnt, void *dst)
{ {
@ -71,19 +70,6 @@ static unsigned long sata_bwrite(struct udevice *dev, lbaint_t start,
{ {
return -ENOSYS; return -ENOSYS;
} }
#else
static unsigned long sata_bread(struct blk_desc *block_dev, lbaint_t start,
lbaint_t blkcnt, void *dst)
{
return sata_read(block_dev->devnum, start, blkcnt, dst);
}
static unsigned long sata_bwrite(struct blk_desc *block_dev, lbaint_t start,
lbaint_t blkcnt, const void *buffer)
{
return sata_write(block_dev->devnum, start, blkcnt, buffer);
}
#endif
#ifndef CONFIG_AHCI #ifndef CONFIG_AHCI
int __sata_initialize(void) int __sata_initialize(void)
@ -100,10 +86,6 @@ int __sata_initialize(void)
sata_dev_desc[i].lba = 0; sata_dev_desc[i].lba = 0;
sata_dev_desc[i].blksz = 512; sata_dev_desc[i].blksz = 512;
sata_dev_desc[i].log2blksz = LOG2(sata_dev_desc[i].blksz); sata_dev_desc[i].log2blksz = LOG2(sata_dev_desc[i].blksz);
#ifndef CONFIG_BLK
sata_dev_desc[i].block_read = sata_bread;
sata_dev_desc[i].block_write = sata_bwrite;
#endif
rc = init_sata(i); rc = init_sata(i);
if (!rc) { if (!rc) {
rc = scan_sata(i); rc = scan_sata(i);
@ -134,7 +116,6 @@ __weak int __sata_stop(void)
int sata_stop(void) __attribute__((weak, alias("__sata_stop"))); int sata_stop(void) __attribute__((weak, alias("__sata_stop")));
#endif #endif
#ifdef CONFIG_BLK
static const struct blk_ops sata_blk_ops = { static const struct blk_ops sata_blk_ops = {
.read = sata_bread, .read = sata_bread,
.write = sata_bwrite, .write = sata_bwrite,
@ -145,11 +126,3 @@ U_BOOT_DRIVER(sata_blk) = {
.id = UCLASS_BLK, .id = UCLASS_BLK,
.ops = &sata_blk_ops, .ops = &sata_blk_ops,
}; };
#else
U_BOOT_LEGACY_BLK(sata) = {
.if_typename = "sata",
.if_type = IF_TYPE_SATA,
.max_devs = CONFIG_SYS_SATA_MAX_DEVICE,
.desc = sata_dev_desc,
};
#endif