diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-02-22 10:53:30 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-02-22 15:35:41 -0500 |
commit | 039ece38da45f5e6a94be3aa7611cf3634bc2461 (patch) | |
tree | c496379b086ca1c4251b1fd914ecafb68eb22063 /drivers/ata/sata_highbank.c | |
parent | b2a52b6a0a03000d07edb359b4059d4d871a7602 (diff) |
libahci: Allow drivers to override start_engine
Allwinner A10 and A20 ARM SoCs have an AHCI sata controller which needs a
special register to be poked before starting the DMA engine.
This register gets reset on an ahci_stop_engine call, so there is no other
place then ahci_start_engine where this poking can be done.
This commit allows drivers to override ahci_start_engine behavior for use by
the Allwinner AHCI driver (and potentially other drivers in the future).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/sata_highbank.c')
-rw-r--r-- | drivers/ata/sata_highbank.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index 5a68b7b8f491..d4df0bf9a55a 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c | |||
@@ -402,6 +402,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class, | |||
402 | static const unsigned long timing[] = { 5, 100, 500}; | 402 | static const unsigned long timing[] = { 5, 100, 500}; |
403 | struct ata_port *ap = link->ap; | 403 | struct ata_port *ap = link->ap; |
404 | struct ahci_port_priv *pp = ap->private_data; | 404 | struct ahci_port_priv *pp = ap->private_data; |
405 | struct ahci_host_priv *hpriv = ap->host->private_data; | ||
405 | u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; | 406 | u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; |
406 | struct ata_taskfile tf; | 407 | struct ata_taskfile tf; |
407 | bool online; | 408 | bool online; |
@@ -430,7 +431,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class, | |||
430 | break; | 431 | break; |
431 | } while (!online && retry--); | 432 | } while (!online && retry--); |
432 | 433 | ||
433 | ahci_start_engine(ap); | 434 | hpriv->start_engine(ap); |
434 | 435 | ||
435 | if (online) | 436 | if (online) |
436 | *class = ahci_dev_classify(ap); | 437 | *class = ahci_dev_classify(ap); |