aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci.h')
-rw-r--r--drivers/ata/ahci.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 57eb1c212a4c..9be471200a07 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -35,6 +35,7 @@
35#ifndef _AHCI_H 35#ifndef _AHCI_H
36#define _AHCI_H 36#define _AHCI_H
37 37
38#include <linux/clk.h>
38#include <linux/libata.h> 39#include <linux/libata.h>
39 40
40/* Enclosure Management Control */ 41/* Enclosure Management Control */
@@ -115,6 +116,9 @@ enum {
115 HOST_CAP2_BOH = (1 << 0), /* BIOS/OS handoff supported */ 116 HOST_CAP2_BOH = (1 << 0), /* BIOS/OS handoff supported */
116 HOST_CAP2_NVMHCI = (1 << 1), /* NVMHCI supported */ 117 HOST_CAP2_NVMHCI = (1 << 1), /* NVMHCI supported */
117 HOST_CAP2_APST = (1 << 2), /* Automatic partial to slumber */ 118 HOST_CAP2_APST = (1 << 2), /* Automatic partial to slumber */
119 HOST_CAP2_SDS = (1 << 3), /* Support device sleep */
120 HOST_CAP2_SADM = (1 << 4), /* Support aggressive DevSlp */
121 HOST_CAP2_DESO = (1 << 5), /* DevSlp from slumber only */
118 122
119 /* registers for each SATA port */ 123 /* registers for each SATA port */
120 PORT_LST_ADDR = 0x00, /* command list DMA addr */ 124 PORT_LST_ADDR = 0x00, /* command list DMA addr */
@@ -133,6 +137,7 @@ enum {
133 PORT_SCR_ACT = 0x34, /* SATA phy register: SActive */ 137 PORT_SCR_ACT = 0x34, /* SATA phy register: SActive */
134 PORT_SCR_NTF = 0x3c, /* SATA phy register: SNotification */ 138 PORT_SCR_NTF = 0x3c, /* SATA phy register: SNotification */
135 PORT_FBS = 0x40, /* FIS-based Switching */ 139 PORT_FBS = 0x40, /* FIS-based Switching */
140 PORT_DEVSLP = 0x44, /* device sleep */
136 141
137 /* PORT_IRQ_{STAT,MASK} bits */ 142 /* PORT_IRQ_{STAT,MASK} bits */
138 PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */ 143 PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */
@@ -186,6 +191,7 @@ enum {
186 PORT_CMD_ICC_PARTIAL = (0x2 << 28), /* Put i/f in partial state */ 191 PORT_CMD_ICC_PARTIAL = (0x2 << 28), /* Put i/f in partial state */
187 PORT_CMD_ICC_SLUMBER = (0x6 << 28), /* Put i/f in slumber state */ 192 PORT_CMD_ICC_SLUMBER = (0x6 << 28), /* Put i/f in slumber state */
188 193
194 /* PORT_FBS bits */
189 PORT_FBS_DWE_OFFSET = 16, /* FBS device with error offset */ 195 PORT_FBS_DWE_OFFSET = 16, /* FBS device with error offset */
190 PORT_FBS_ADO_OFFSET = 12, /* FBS active dev optimization offset */ 196 PORT_FBS_ADO_OFFSET = 12, /* FBS active dev optimization offset */
191 PORT_FBS_DEV_OFFSET = 8, /* FBS device to issue offset */ 197 PORT_FBS_DEV_OFFSET = 8, /* FBS device to issue offset */
@@ -194,6 +200,15 @@ enum {
194 PORT_FBS_DEC = (1 << 1), /* FBS device error clear */ 200 PORT_FBS_DEC = (1 << 1), /* FBS device error clear */
195 PORT_FBS_EN = (1 << 0), /* Enable FBS */ 201 PORT_FBS_EN = (1 << 0), /* Enable FBS */
196 202
203 /* PORT_DEVSLP bits */
204 PORT_DEVSLP_DM_OFFSET = 25, /* DITO multiplier offset */
205 PORT_DEVSLP_DM_MASK = (0xf << 25), /* DITO multiplier mask */
206 PORT_DEVSLP_DITO_OFFSET = 15, /* DITO offset */
207 PORT_DEVSLP_MDAT_OFFSET = 10, /* Minimum assertion time */
208 PORT_DEVSLP_DETO_OFFSET = 2, /* DevSlp exit timeout */
209 PORT_DEVSLP_DSP = (1 << 1), /* DevSlp present */
210 PORT_DEVSLP_ADSE = (1 << 0), /* Aggressive DevSlp enable */
211
197 /* hpriv->flags bits */ 212 /* hpriv->flags bits */
198 213
199#define AHCI_HFLAGS(flags) .private_data = (void *)(flags) 214#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
@@ -302,6 +317,7 @@ struct ahci_host_priv {
302 u32 em_loc; /* enclosure management location */ 317 u32 em_loc; /* enclosure management location */
303 u32 em_buf_sz; /* EM buffer size in byte */ 318 u32 em_buf_sz; /* EM buffer size in byte */
304 u32 em_msg_type; /* EM message type */ 319 u32 em_msg_type; /* EM message type */
320 struct clk *clk; /* Only for platforms supporting clk */
305}; 321};
306 322
307extern int ahci_ignore_sss; 323extern int ahci_ignore_sss;