aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_sunxi.c
diff options
context:
space:
mode:
authorKefeng Wang <kefeng.wang@linaro.org>2014-05-14 02:13:41 -0400
committerTejun Heo <tj@kernel.org>2014-05-14 13:07:10 -0400
commitf9f36917903b57c571b1ddcfc6bc794ca4dd8232 (patch)
treecbabd67e07fd49de26f8ce42adba490eddaca77e /drivers/ata/ahci_sunxi.c
parent888d91a08fa8e2be4cb0eef1e5736ef68b8f77f0 (diff)
libahci_platform: add host_flags parameter in ahci_platform_init_host()
Add a dynamic host_flags argument to make ahci_platform_init_host more flexible, then remove the AHCI_HFLAGS(...) argument from some driver's ata_port_info, and pass that in as the new argument. Cc: Hans de Geode <hdegoede@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci_sunxi.c')
-rw-r--r--drivers/ata/ahci_sunxi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 42d3f64e74b3..02002f125bd4 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -157,8 +157,6 @@ static void ahci_sunxi_start_engine(struct ata_port *ap)
157} 157}
158 158
159static const struct ata_port_info ahci_sunxi_port_info = { 159static const struct ata_port_info ahci_sunxi_port_info = {
160 AHCI_HFLAGS(AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
161 AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ),
162 .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ, 160 .flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
163 .pio_mask = ATA_PIO4, 161 .pio_mask = ATA_PIO4,
164 .udma_mask = ATA_UDMA6, 162 .udma_mask = ATA_UDMA6,
@@ -169,6 +167,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
169{ 167{
170 struct device *dev = &pdev->dev; 168 struct device *dev = &pdev->dev;
171 struct ahci_host_priv *hpriv; 169 struct ahci_host_priv *hpriv;
170 unsigned long hflags;
172 int rc; 171 int rc;
173 172
174 hpriv = ahci_platform_get_resources(pdev); 173 hpriv = ahci_platform_get_resources(pdev);
@@ -185,7 +184,11 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
185 if (rc) 184 if (rc)
186 goto disable_resources; 185 goto disable_resources;
187 186
188 rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info, 0, 0); 187 hflags = AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
188 AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ;
189
190 rc = ahci_platform_init_host(pdev, hpriv, &ahci_sunxi_port_info,
191 hflags, 0, 0);
189 if (rc) 192 if (rc)
190 goto disable_resources; 193 goto disable_resources;
191 194