summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrafulla Wadaskar <prafulla@pe-lt078.(none)>2010-08-07 17:44:25 +0530
committerPrafulla Wadaskar <prafulla@marvell.com>2010-08-08 05:17:55 +0530
commit86cf2ae492db316e73512a1786d57ece9b3a7624 (patch)
tree5a57ccd8526fba995b6ab982ac99fb8a2eb701f1
parent5f30500316ae29eed93aafcc40dfc857a2452203 (diff)
downloadu-boot-imx-86cf2ae492db316e73512a1786d57ece9b3a7624.zip
u-boot-imx-86cf2ae492db316e73512a1786d57ece9b3a7624.tar.gz
u-boot-imx-86cf2ae492db316e73512a1786d57ece9b3a7624.tar.bz2
Kirkwood: openrd_base: Added SATA support
This patch enables mvsata driver and related filesystem support. The patch is tested for ide reset and ext2ls operation for a disk drive connected on SATA port0. This patch depends upon the patche-series http://lists.denx.de/pipermail/u-boot/2010-August/074908.html Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
-rw-r--r--include/configs/openrd_base.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/configs/openrd_base.h b/include/configs/openrd_base.h
index 52fa73d..846dfcd 100644
--- a/include/configs/openrd_base.h
+++ b/include/configs/openrd_base.h
@@ -103,6 +103,7 @@
#define CONFIG_CMD_NAND
#define CONFIG_CMD_PING
#define CONFIG_CMD_USB
+#define CONFIG_CMD_IDE
/*
* NAND configuration
@@ -205,6 +206,36 @@
#endif /* CONFIG_CMD_USB */
/*
+ * IDe Support on SATA port0
+ */
+#ifdef CONFIG_CMD_IDE
+#define __io
+#define CONFIG_CMD_EXT2
+#define CONFIG_MVSATA_IDE
+#define CONFIG_IDE_PREINIT
+#define CONFIG_MVSATA_IDE_USE_PORT1
+/* Needs byte-swapping for ATA data register */
+#define CONFIG_IDE_SWAP_IO
+/* Data, registers and alternate blocks are at the same offset */
+#define CONFIG_SYS_ATA_DATA_OFFSET (0x0100)
+#define CONFIG_SYS_ATA_REG_OFFSET (0x0100)
+#define CONFIG_SYS_ATA_ALT_OFFSET (0x0100)
+/* Each 8-bit ATA register is aligned to a 4-bytes address */
+#define CONFIG_SYS_ATA_STRIDE 4
+/* Controller supports 48-bits LBA addressing */
+#define CONFIG_LBA48
+/* CONFIG_CMD_IDE requires some #defines for ATA registers */
+#define CONFIG_SYS_IDE_MAXBUS 2
+#define CONFIG_SYS_IDE_MAXDEVICE 2
+/* ATA registers base is at SATA controller base */
+#define CONFIG_SYS_ATA_BASE_ADDR KW_SATA_BASE
+/* ATA bus 0 is Kirkwood port 0 on openrd */
+#define CONFIG_SYS_ATA_IDE0_OFFSET KW_SATA_PORT0_OFFSET
+/* ATA bus 1 is Kirkwood port 1 on openrd */
+#define CONFIG_SYS_ATA_IDE1_OFFSET KW_SATA_PORT1_OFFSET
+#endif /* CONFIG_CMD_IDE */
+
+/*
* File system
*/
#define CONFIG_CMD_FAT