Skip to contentSkip to conversation

at91sam9m10g45ek: add mci0 support

PATCH Superseded Hubert Feurstein 2 participants 4 messages Jun 10, 2011 – Jun 15, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91sam9m10g45ek: add mci0 support

and enable fat support

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
 arch/arm/boards/at91sam9m10g45ek/init.c     |    8 ++++++++
 arch/arm/configs/at91sam9m10g45ek_defconfig |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/boards/at91sam9m10g45ek/init.c +8 -0
index 77d51b7..4f79e42 100644
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <net.h>
+#include <mci.h>
 #include <init.h>
 #include <environment.h>
 #include <asm/armlinux.h>
@@ -110,11 +111,18 @@ static struct at91_ether_platform_data macb_pdata = {
 	.phy_addr = 0,
 };
 
+static struct atmel_mci_platform_data mci0_pdata = {
+	.bus_width	= 4,
+	.host_caps	= MMC_MODE_HS,
+	.detect_pin	= AT91_PIN_PD10,
+};
+
 static int at91sam9m10g45ek_devices_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
 	ek_add_device_nand();
 	at91_add_device_eth(&macb_pdata);
+	at91_add_device_mci(0, &mci0_pdata);
 
 	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
arch/arm/configs/at91sam9m10g45ek_defconfig +5 -0
index e1c6cef..deca884 100644
@@ -53,3 +53,8 @@ CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_UBI=y
+CONFIG_MCI=y
+CONFIG_MCI_WRITE=y
+CONFIG_MCI_ATMEL=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y

--
1.7.1

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw
Quoted 27 lines · Hubert Feurstein

and enable fat support

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
 arch/arm/boards/at91sam9m10g45ek/init.c     |    8 ++++++++
 arch/arm/configs/at91sam9m10g45ek_defconfig |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/boards/at91sam9m10g45ek/init.c +3 -0
index 77d51b7..4f79e42 100644
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <net.h>
+#include <mci.h>
 #include <init.h>
 #include <environment.h>
 #include <asm/armlinux.h>
@@ -110,11 +111,18 @@ static struct at91_ether_platform_data macb_pdata = {
 	.phy_addr = 0,
 };
 
+static struct atmel_mci_platform_data mci0_pdata = {
+	.bus_width	= 4,

arch/arm/boards/at91sam9m10g45ek/init.c static struct at91_ether_platform_data macb_pdata = { · line 125

Quoted 10 lines
arch/arm/boards/at91sam9m10g45ek/init.c +5 -0
+	.host_caps	= MMC_MODE_HS,
+	.detect_pin	= AT91_PIN_PD10,
+};
+
 static int at91sam9m10g45ek_devices_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
 	ek_add_device_nand();
 	at91_add_device_eth(&macb_pdata);
+	at91_add_device_mci(0, &mci0_pdata);

please do the same as I did on 9263ek

only add the device if the driver is enable

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw

PATCH v2 1/1 at91sam9m10g45ek: add mci0 support

enable fat support

Cc Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
---
 arch/arm/boards/at91sam9m10g45ek/init.c     |   17 +++++++++++++++++
 arch/arm/configs/at91sam9m10g45ek_defconfig |    5 +++++
 2 files changed, 22 insertions(+), 0 deletions(-)
arch/arm/boards/at91sam9m10g45ek/init.c +17 -0
index 77d51b7..dcd2fe6 100644
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <net.h>
+#include <mci.h>
 #include <init.h>
 #include <environment.h>
 #include <asm/armlinux.h>
@@ -110,11 +111,27 @@ static struct at91_ether_platform_data macb_pdata = {
 	.phy_addr = 0,
 };
 
+#if defined(CONFIG_MCI_ATMEL)
+static struct atmel_mci_platform_data ek_mci_data = {
+	.bus_width	= 4,
+	.host_caps	= MMC_MODE_HS,
+	.detect_pin	= AT91_PIN_PD10,
+};
+
+static void ek_add_device_mci(void)
+{
+	at91_add_device_mci(0, &ek_mci_data);
+}
+#else
+static void ek_add_device_mci(void) {}
+#endif
+
 static int at91sam9m10g45ek_devices_init(void)
 {
 	at91_add_device_sdram(128 * 1024 * 1024);
 	ek_add_device_nand();
 	at91_add_device_eth(&macb_pdata);
+	ek_add_device_mci();
 
 	devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
arch/arm/configs/at91sam9m10g45ek_defconfig +5 -0
index e1c6cef..deca884 100644
@@ -53,3 +53,8 @@ CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_NAND=y
 CONFIG_UBI=y
+CONFIG_MCI=y
+CONFIG_MCI_WRITE=y
+CONFIG_MCI_ATMEL=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
Signature · 7 lines
1.7.4.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox