[PATCH v2 3/4] pm9g45: enable MCI0

Asen Chavdarov Dimov dimov at ronetix.at
Fri Mar 2 11:55:22 EST 2012


FIXME: part of or no data is written. File copy ends
with message: "atmel_mci at atmel_mci0: command/data timeout"

Signed-off-by: Asen Chavdarov Dimov <dimov at ronetix.at>
---
since v1:
	add_device_mci renamed to pm9g45_add_device_mci
---
 arch/arm/boards/pm9g45/init.c     |   16 ++++++++++++++++
 arch/arm/configs/pm9g45_defconfig |   34 +++++++++++++++++++++++++++++++---
 2 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 92d010f..79a0128 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -77,6 +77,21 @@ static void pm_add_device_nand(void)
 	at91_add_device_nand(&nand_pdata);
 }
 
+#if defined(CONFIG_MCI_ATMEL)
+static struct atmel_mci_platform_data __initdata mci_data = {
+	.bus_width	= 4,
+	.wp_pin		= 0,
+	.detect_pin	= AT91_PIN_PD6,
+};
+
+static void pm9g45_add_device_mci(void)
+{
+	at91_add_device_mci(0, &mci_data);
+}
+#else
+static void pm9g45_add_device_mci(void) {}
+#endif
+
 static struct at91_ether_platform_data macb_pdata = {
 	.flags = AT91SAM_ETHER_RMII,
 	.phy_addr = 0,
@@ -105,6 +120,7 @@ static int pm9g45_devices_init(void)
 {
 
 	pm_add_device_nand();
+	pm9g45_add_device_mci();
 	pm9g45_phy_init();
 	at91_add_device_eth(&macb_pdata);
 
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index f05d4de..5132ea4 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -69,6 +69,8 @@ CONFIG_HAS_MODULES=y
 CONFIG_CMD_MEMORY=y
 CONFIG_ENV_HANDLING=y
 CONFIG_GENERIC_GPIO=y
+CONFIG_BLOCK=y
+CONFIG_BLOCK_WRITE=y
 CONFIG_FILETYPE=y
 
 #
@@ -290,11 +292,35 @@ CONFIG_NAND_ATMEL=y
 # CONFIG_MTD_NAND_ECC_SMC is not set
 CONFIG_MTD_NAND_IDS=y
 CONFIG_UBI=y
-# CONFIG_DISK is not set
+CONFIG_DISK=y
+CONFIG_DISK_WRITE=y
+
+#
+# drive types
+#
+# CONFIG_DISK_ATA is not set
+
+#
+# interface types
+#
+# CONFIG_DISK_INTF_PLATFORM_IDE is not set
 # CONFIG_USB is not set
 # CONFIG_USB_GADGET is not set
 # CONFIG_VIDEO is not set
-# CONFIG_MCI is not set
+CONFIG_MCI=y
+
+#
+# --- Feature list ---
+#
+# CONFIG_MCI_STARTUP is not set
+CONFIG_MCI_INFO=y
+CONFIG_MCI_WRITE=y
+
+#
+# --- MCI host drivers ---
+#
+CONFIG_MCI_ATMEL=y
+# CONFIG_MCI_SPI is not set
 CONFIG_CLKDEV_LOOKUP=y
 
 #
@@ -319,7 +345,9 @@ CONFIG_EEPROM_AT25=y
 # CONFIG_FS_CRAMFS is not set
 CONFIG_FS_RAMFS=y
 CONFIG_FS_DEVFS=y
-# CONFIG_FS_FAT is not set
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
 CONFIG_PARTITION_NEED_MTD=y
 
 #
-- 
1.7.4.4




More information about the barebox mailing list