mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-26 05:34:30 +08:00
dm: sata: dw_sata: Drop dwc_ahsata_rw_ncq_cmd()
This function is not called from anywhere. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d7f094354c
commit
1dae3b06b7
@ -750,49 +750,6 @@ static u32 dwc_ahsata_rw_cmd_ext(int dev, u32 start, lbaint_t blkcnt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 dwc_ahsata_rw_ncq_cmd(int dev, u32 start, lbaint_t blkcnt,
|
||||
u8 *buffer, int is_write)
|
||||
{
|
||||
struct ahci_uc_priv *probe_ent =
|
||||
(struct ahci_uc_priv *)sata_dev_desc[dev].priv;
|
||||
struct sata_fis_h2d h2d __aligned(ARCH_DMA_MINALIGN);
|
||||
struct sata_fis_h2d *cfis = &h2d;
|
||||
u8 port = probe_ent->hard_port_no;
|
||||
u64 block;
|
||||
|
||||
if (sata_dev_desc[dev].lba48 != 1) {
|
||||
printf("execute FPDMA command on non-LBA48 hard disk\n\r");
|
||||
return -1;
|
||||
}
|
||||
|
||||
block = (u64)start;
|
||||
|
||||
memset(cfis, 0, sizeof(struct sata_fis_h2d));
|
||||
|
||||
cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D;
|
||||
cfis->pm_port_c = 0x80; /* is command */
|
||||
|
||||
cfis->command = (is_write) ? ATA_CMD_FPDMA_WRITE
|
||||
: ATA_CMD_FPDMA_READ;
|
||||
|
||||
cfis->lba_high_exp = (block >> 40) & 0xff;
|
||||
cfis->lba_mid_exp = (block >> 32) & 0xff;
|
||||
cfis->lba_low_exp = (block >> 24) & 0xff;
|
||||
cfis->lba_high = (block >> 16) & 0xff;
|
||||
cfis->lba_mid = (block >> 8) & 0xff;
|
||||
cfis->lba_low = block & 0xff;
|
||||
|
||||
cfis->device = ATA_LBA;
|
||||
cfis->features_exp = (blkcnt >> 8) & 0xff;
|
||||
cfis->features = blkcnt & 0xff;
|
||||
|
||||
/* Use the latest queue */
|
||||
ahci_exec_ata_cmd(probe_ent, port, cfis,
|
||||
buffer, ATA_SECT_SIZE * blkcnt, is_write);
|
||||
|
||||
return blkcnt;
|
||||
}
|
||||
|
||||
static void dwc_ahsata_flush_cache_ext(int dev)
|
||||
{
|
||||
struct ahci_uc_priv *probe_ent =
|
||||
|
Loading…
Reference in New Issue
Block a user