config SATA
bool "Support SATA controllers"
+ depends on BLK
select HAVE_BLOCK_DEVICE
help
This enables support for SATA (Serial Advanced Technology
bool "Enable Freescale SATA controller driver support"
select AHCI
select LIBATA
- depends on BLK
help
Enable this driver to support the SATA controller found in
some Freescale PowerPC SoCs.
bool "Enable Marvell SATA controller driver support"
select AHCI
select LIBATA
- depends on BLK
help
Enable this driver to support the SATA controller found in
some Marvell SoCs.
bool "Enable Silicon Image SIL3131 / SIL3132 / SIL3124 SATA driver support"
select AHCI
select LIBATA
- depends on BLK
help
Enable this driver to support the SIL3131, SIL3132 and SIL3124
SATA controllers.
#endif
#endif
-#ifdef CONFIG_BLK
static unsigned long sata_bread(struct udevice *dev, lbaint_t start,
lbaint_t blkcnt, void *dst)
{
{
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
int __sata_initialize(void)
sata_dev_desc[i].lba = 0;
sata_dev_desc[i].blksz = 512;
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);
if (!rc) {
rc = scan_sata(i);
int sata_stop(void) __attribute__((weak, alias("__sata_stop")));
#endif
-#ifdef CONFIG_BLK
static const struct blk_ops sata_blk_ops = {
.read = sata_bread,
.write = sata_bwrite,
.id = UCLASS_BLK,
.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