]> git.sur5r.net Git - u-boot/commitdiff
ahci: flush dcache before issuing command
authorTang Yuantian <Yuantian.Tang@nxp.com>
Thu, 14 Apr 2016 08:21:00 +0000 (16:21 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 18 Apr 2016 21:11:48 +0000 (17:11 -0400)
Ensure data the following sata command used is flushed out of dcache
and written to physical memory or timeout error may happen.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
drivers/block/ahci.c

index d29642be77339e6a2da694aebe4739ed9c07ef7c..e3e783a74cfdb35d48e499a41c1270a0dba70ba2 100644 (file)
@@ -1061,6 +1061,7 @@ static int ata_io_flush(u8 port)
 
        memcpy((unsigned char *)pp->cmd_tbl, fis, 20);
        ahci_fill_cmd_slot(pp, cmd_fis_len);
+       ahci_dcache_flush_sata_cmd(pp);
        writel_with_flush(1, port_mmio + PORT_CMD_ISSUE);
 
        if (waiting_for_cmd_completed(port_mmio + PORT_CMD_ISSUE,