diff options
author | Ian Moffett <ian@osmora.org> | 2025-02-20 10:23:23 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-02-20 10:23:23 -0500 |
commit | fb48b27ede2c403f18495aa2d3784565f7b84f13 (patch) | |
tree | 45724fcadb693b073190c72f3f54a97159973424 /sys/include | |
parent | 8a94b1a37c7da5d87bd3e2164d3e4583a47df64f (diff) | |
parent | 6ba33d4705896501fb0b042c8986742fb4ed7ae7 (diff) |
Merge branch 'expt'
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/dev/ic/ahciregs.h | 24 | ||||
-rw-r--r-- | sys/include/dev/ic/ahcivar.h | 2 |
2 files changed, 14 insertions, 12 deletions
diff --git a/sys/include/dev/ic/ahciregs.h b/sys/include/dev/ic/ahciregs.h index 319e35f..4a4dc65 100644 --- a/sys/include/dev/ic/ahciregs.h +++ b/sys/include/dev/ic/ahciregs.h @@ -31,7 +31,7 @@ #define _IC_AHCIREGS_H_ #include <sys/types.h> -#include <sys/cdefs.h> +#include <sys/param.h> struct hba_port { volatile uint64_t clb; /* Command list base (1k-byte aligned) */ @@ -71,9 +71,9 @@ struct hba_memspace { }; /* Global host control bits */ -#define AHCI_GHC_AE __BIT(31) /* AHCI enable */ -#define AHCI_GHC_IE __BIT(1) /* Interrupt enable */ -#define AHCI_GHC_HR __BIT(0) /* HBA reset */ +#define AHCI_GHC_AE BIT(31) /* AHCI enable */ +#define AHCI_GHC_IE BIT(1) /* Interrupt enable */ +#define AHCI_GHC_HR BIT(0) /* HBA reset */ /* AHCI port signatures */ #define AHCI_SIG_ATA 0x00000101 @@ -97,24 +97,24 @@ struct hba_memspace { * Port command and status bits * See section 3.3.7 of the AHCI spec. */ -#define AHCI_PXCMD_ST __BIT(0) /* Start */ -#define AHCI_PXCMD_FRE __BIT(4) /* FIS Receive Enable */ -#define AHCI_PXCMD_FR __BIT(14) /* FIS Receive Running */ -#define AHCI_PXCMD_CR __BIT(15) /* Command List Running */ +#define AHCI_PXCMD_ST BIT(0) /* Start */ +#define AHCI_PXCMD_FRE BIT(4) /* FIS Receive Enable */ +#define AHCI_PXCMD_FR BIT(14) /* FIS Receive Running */ +#define AHCI_PXCMD_CR BIT(15) /* Command List Running */ /* * Interrupt status bits * See section 3.3.5 of the AHCI spec. */ -#define AHCI_PXIS_TFES __BIT(31) +#define AHCI_PXIS_TFES BIT(31) /* * Task file data bits * See section 3.3.8 of the AHCI spec. */ -#define AHCI_PXTFD_ERR __BIT(0) -#define AHCI_PXTFD_DRQ __BIT(3) -#define AHCI_PXTFD_BSY __BIT(7) +#define AHCI_PXTFD_ERR BIT(0) +#define AHCI_PXTFD_DRQ BIT(3) +#define AHCI_PXTFD_BSY BIT(7) /* * Capability bits diff --git a/sys/include/dev/ic/ahcivar.h b/sys/include/dev/ic/ahcivar.h index 1efea70..0d307cd 100644 --- a/sys/include/dev/ic/ahcivar.h +++ b/sys/include/dev/ic/ahcivar.h @@ -36,4 +36,6 @@ struct ahci_hba { struct hba_memspace *io; }; +#define AHCI_TIMEOUT 500 /* In ms */ + #endif /* !_IC_AHCIVAR_H_ */ |