summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-05-09 22:13:41 -0400
committerIan Moffett <ian@osmora.org>2025-05-09 22:13:41 -0400
commit310af38f1324c57ef5a072b27c91110cd4ec4a3a (patch)
tree9508479ab8ec7fd6ccdc5e869e17cfdabff414c3
parent260316209d0c3b781d1ae483372958434da70689 (diff)
kernel: ahci: Detect staggered spin up
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/dev/ic/ahci.c1
-rw-r--r--sys/include/dev/ic/ahciregs.h1
-rw-r--r--sys/include/dev/ic/ahcivar.h2
3 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 4500a29..3142193 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -317,6 +317,7 @@ ahci_hba_init(struct ahci_hba *hba)
hba->nslots = AHCI_CAP_NCS(cap);
hba->ems = AHCI_CAP_EMS(cap);
hba->sal = AHCI_CAP_SAL(cap);
+ hba->sss = AHCI_CAP_SSS(cap);
/*
* The HBA provides backwards compatibility with
diff --git a/sys/include/dev/ic/ahciregs.h b/sys/include/dev/ic/ahciregs.h
index 2f2fa84..f73e587 100644
--- a/sys/include/dev/ic/ahciregs.h
+++ b/sys/include/dev/ic/ahciregs.h
@@ -126,6 +126,7 @@ struct hba_memspace {
#define AHCI_CAP_NCS(CAP) ((CAP >> 8) & 0x1F) /* Number of command slots */
#define AHCI_CAP_EMS(CAP) ((CAP >> 6) & 1) /* Enclosure management support */
#define AHCI_CAP_SAL(CAP) ((CAP >> 25) & 1) /* Supports activity LED */
+#define AHCI_CAP_SSS(CAP) ((CAP >> 27) & 1) /* Supports staggered spin up */
/*
* Device detection (DET) and Interface power
diff --git a/sys/include/dev/ic/ahcivar.h b/sys/include/dev/ic/ahcivar.h
index 4b6cf12..dc4e492 100644
--- a/sys/include/dev/ic/ahcivar.h
+++ b/sys/include/dev/ic/ahcivar.h
@@ -45,6 +45,7 @@ struct ahci_cmd_hdr;
* @nslots: Number of command slots
* @ems: Enclosure management support
* @sal: Supports activity LED
+ * @sss: Supports staggered spin up
*/
struct ahci_hba {
struct hba_memspace *io;
@@ -53,6 +54,7 @@ struct ahci_hba {
uint32_t nslots;
uint8_t ems : 1;
uint8_t sal : 1;
+ uint8_t sss : 1;
};
/*