summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-02-22 16:53:30 +0100
committerTejun Heo <tj@kernel.org>2014-02-22 21:35:41 +0100
commit039ece38da45f5e6a94be3aa7611cf3634bc2461 (patch)
treec496379b086ca1c4251b1fd914ecafb68eb22063 /drivers/ata/ahci.h
parentata: libahci: replace obsolete simple_strtoul() with kstrtouint() (diff)
downloadlinux-039ece38da45f5e6a94be3aa7611cf3634bc2461.tar.xz
linux-039ece38da45f5e6a94be3aa7611cf3634bc2461.zip
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/ahci.h')
-rw-r--r--drivers/ata/ahci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 2289efdf8203..64d1a99de5e4 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -323,6 +323,12 @@ struct ahci_host_priv {
u32 em_msg_type; /* EM message type */
struct clk *clk; /* Only for platforms supporting clk */
void *plat_data; /* Other platform data */
+ /*
+ * Optional ahci_start_engine override, if not set this gets set to the
+ * default ahci_start_engine during ahci_save_initial_config, this can
+ * be overridden anytime before the host is activated.
+ */
+ void (*start_engine)(struct ata_port *ap);
};
extern int ahci_ignore_sss;