summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ata.h9
-rw-r--r--include/fat.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/include/ata.h b/include/ata.h
index 968b3c4..fa30ee8 100644
--- a/include/ata.h
+++ b/include/ata.h
@@ -37,10 +37,13 @@
* 8-bit (register) and 16-bit (data) accesses might use different
* address spaces. This is implemented by the following definitions.
*/
+#ifndef CFG_ATA_STRIDE
+#define CFG_ATA_STRIDE 1
+#endif
-#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+(x))
-#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +(x))
-#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +(x))
+#define ATA_IO_DATA(x) (CFG_ATA_DATA_OFFSET+((x) * CFG_ATA_STRIDE))
+#define ATA_IO_REG(x) (CFG_ATA_REG_OFFSET +((x) * CFG_ATA_STRIDE))
+#define ATA_IO_ALT(x) (CFG_ATA_ALT_OFFSET +((x) * CFG_ATA_STRIDE))
/*
* I/O Register Descriptions
diff --git a/include/fat.h b/include/fat.h
index 6f0f40f..3f9c5f3 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -89,7 +89,7 @@
#define FAT2CPU16 le16_to_cpu
#define FAT2CPU32 le32_to_cpu
#else
-#if 1
+#if __LITTLE_ENDIAN
#define FAT2CPU16(x) (x)
#define FAT2CPU32(x) (x)
#else