aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_platform.c2
-rw-r--r--drivers/ata/libata-acpi.c11
-rw-r--r--drivers/ata/libata-core.c4
-rw-r--r--drivers/ata/pata_arasan_cf.c8
-rw-r--r--drivers/ata/sata_highbank.c4
-rw-r--r--drivers/ata/sata_svw.c35
6 files changed, 57 insertions, 7 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b1ae48054dc5..b7078afddb74 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device *pdev)
238 return 0; 238 return 0;
239} 239}
240 240
241#ifdef CONFIG_PM 241#ifdef CONFIG_PM_SLEEP
242static int ahci_suspend(struct device *dev) 242static int ahci_suspend(struct device *dev)
243{ 243{
244 struct ahci_platform_data *pdata = dev_get_platdata(dev); 244 struct ahci_platform_data *pdata = dev_get_platdata(dev);
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index fd9ecf74e631..5b0ba3f20edc 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,
1105 struct acpi_device *acpi_dev; 1105 struct acpi_device *acpi_dev;
1106 struct acpi_device_power_state *states; 1106 struct acpi_device_power_state *states;
1107 1107
1108 if (ap->flags & ATA_FLAG_ACPI_SATA) 1108 if (ap->flags & ATA_FLAG_ACPI_SATA) {
1109 ata_dev = &ap->link.device[sdev->channel]; 1109 if (!sata_pmp_attached(ap))
1110 else 1110 ata_dev = &ap->link.device[sdev->id];
1111 else
1112 ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id];
1113 }
1114 else {
1111 ata_dev = &ap->link.device[sdev->id]; 1115 ata_dev = &ap->link.device[sdev->id];
1116 }
1112 1117
1113 *handle = ata_dev_acpi_handle(ata_dev); 1118 *handle = ata_dev_acpi_handle(ata_dev);
1114 1119
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3cc7096cfda7..f46fbd3bd3fb 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2942,6 +2942,10 @@ const struct ata_timing *ata_timing_find_mode(u8 xfer_mode)
2942 2942
2943 if (xfer_mode == t->mode) 2943 if (xfer_mode == t->mode)
2944 return t; 2944 return t;
2945
2946 WARN_ONCE(true, "%s: unable to find timing for xfer_mode 0x%x\n",
2947 __func__, xfer_mode);
2948
2945 return NULL; 2949 return NULL;
2946} 2950}
2947 2951
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201ebef3ca..371fd2c698b7 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
317 return ret; 317 return ret;
318 } 318 }
319 319
320 ret = clk_set_rate(acdev->clk, 166000000);
321 if (ret) {
322 dev_warn(acdev->host->dev, "clock set rate failed");
323 return ret;
324 }
325
320 spin_lock_irqsave(&acdev->host->lock, flags); 326 spin_lock_irqsave(&acdev->host->lock, flags);
321 /* configure CF interface clock */ 327 /* configure CF interface clock */
322 writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk : 328 writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
@@ -908,7 +914,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev)
908 return 0; 914 return 0;
909} 915}
910 916
911#ifdef CONFIG_PM 917#ifdef CONFIG_PM_SLEEP
912static int arasan_cf_suspend(struct device *dev) 918static int arasan_cf_suspend(struct device *dev)
913{ 919{
914 struct ata_host *host = dev_get_drvdata(dev); 920 struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 0d7c4c2cd26f..400bf1c3e982 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
260}; 260};
261MODULE_DEVICE_TABLE(of, ahci_of_match); 261MODULE_DEVICE_TABLE(of, ahci_of_match);
262 262
263static int __init ahci_highbank_probe(struct platform_device *pdev) 263static int __devinit ahci_highbank_probe(struct platform_device *pdev)
264{ 264{
265 struct device *dev = &pdev->dev; 265 struct device *dev = &pdev->dev;
266 struct ahci_host_priv *hpriv; 266 struct ahci_host_priv *hpriv;
@@ -378,7 +378,7 @@ static int __devexit ahci_highbank_remove(struct platform_device *pdev)
378 return 0; 378 return 0;
379} 379}
380 380
381#ifdef CONFIG_PM 381#ifdef CONFIG_PM_SLEEP
382static int ahci_highbank_suspend(struct device *dev) 382static int ahci_highbank_suspend(struct device *dev)
383{ 383{
384 struct ata_host *host = dev_get_drvdata(dev); 384 struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 44a4256533e1..08608de87e4e 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_link *link,
142 return 0; 142 return 0;
143} 143}
144 144
145static int k2_sata_softreset(struct ata_link *link,
146 unsigned int *class, unsigned long deadline)
147{
148 u8 dmactl;
149 void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
150
151 dmactl = readb(mmio + ATA_DMA_CMD);
152
153 /* Clear the start bit */
154 if (dmactl & ATA_DMA_START) {
155 dmactl &= ~ATA_DMA_START;
156 writeb(dmactl, mmio + ATA_DMA_CMD);
157 }
158
159 return ata_sff_softreset(link, class, deadline);
160}
161
162static int k2_sata_hardreset(struct ata_link *link,
163 unsigned int *class, unsigned long deadline)
164{
165 u8 dmactl;
166 void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
167
168 dmactl = readb(mmio + ATA_DMA_CMD);
169
170 /* Clear the start bit */
171 if (dmactl & ATA_DMA_START) {
172 dmactl &= ~ATA_DMA_START;
173 writeb(dmactl, mmio + ATA_DMA_CMD);
174 }
175
176 return sata_sff_hardreset(link, class, deadline);
177}
145 178
146static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) 179static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
147{ 180{
@@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata_sht = {
346 379
347static struct ata_port_operations k2_sata_ops = { 380static struct ata_port_operations k2_sata_ops = {
348 .inherits = &ata_bmdma_port_ops, 381 .inherits = &ata_bmdma_port_ops,
382 .softreset = k2_sata_softreset,
383 .hardreset = k2_sata_hardreset,
349 .sff_tf_load = k2_sata_tf_load, 384 .sff_tf_load = k2_sata_tf_load,
350 .sff_tf_read = k2_sata_tf_read, 385 .sff_tf_read = k2_sata_tf_read,
351 .sff_check_status = k2_stat_check_status, 386 .sff_check_status = k2_stat_check_status,