refactor: send the command with retry and error detection
[lunaix-os.git] / lunaix-os / includes / hal / ahci / hba.h
index 92a2b5a382518417f423a3f8ecce38416d318dd7..8203ab5e6f902880961f7d3236fecfb99e394cb3 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __LUNAIX_HBA_H
 #define __LUNAIX_HBA_H
 
-#include <stdint.h>
+#include <lunaix/types.h>
 
 #define HBA_RCAP 0
 #define HBA_RGHC 1
@@ -47,6 +47,8 @@
 #define HBA_RPxSSTS_IF(x) (((x) >> 4) & 0xf)
 #define HBA_RPxSSTS_PHYSTATE(x) ((x)&0xf)
 
+#define hba_clear_reg(reg) (reg) = -1
+
 #define HBA_DEV_SIG_ATAPI 0xeb140101
 #define HBA_DEV_SIG_ATA 0x00000101