aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>2017-08-21 07:17:19 -0400
committerTejun Heo <tj@kernel.org>2017-10-23 10:09:26 -0400
commitff0d63778ca0c2cec9ce33d69b69fe5f8567169b (patch)
tree961ac5b96e03fdd8f8774350246562bab4e5bd75
parente8fc8b858cd85de20350bfc72df18306129305b8 (diff)
ata: ceva: Disable Device Sleep capability
Since CEVA controller does not support Device Sleep capability, we need to clear that feature by clearing the DEVSLP bit in word78 of IDENTIFY DEVICE data. This patch does the same. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ata/ahci_ceva.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index aa32c8a0f083..b63fab2507fa 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -81,8 +81,26 @@ struct ceva_ahci_priv {
81 int flags; 81 int flags;
82}; 82};
83 83
84static unsigned int ceva_ahci_read_id(struct ata_device *dev,
85 struct ata_taskfile *tf, u16 *id)
86{
87 u32 err_mask;
88
89 err_mask = ata_do_dev_read_id(dev, tf, id);
90 if (err_mask)
91 return err_mask;
92 /*
93 * Since CEVA controller does not support device sleep feature, we
94 * need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data.
95 */
96 id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
97
98 return 0;
99}
100
84static struct ata_port_operations ahci_ceva_ops = { 101static struct ata_port_operations ahci_ceva_ops = {
85 .inherits = &ahci_platform_ops, 102 .inherits = &ahci_platform_ops,
103 .read_id = ceva_ahci_read_id,
86}; 104};
87 105
88static const struct ata_port_info ahci_ceva_port_info = { 106static const struct ata_port_info ahci_ceva_port_info = {