Skip to contentSkip to conversation

AT91: atmel-mci: Platform configuration to the the atmel-mci driver

PATCH In review [email protected] 1 participant 1 message Sep 23, 2009

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

PATCH 87/232 AT91: atmel-mci: Platform configuration to the the atmel-mci driver

From: Rob Emanuele <[email protected]>

Created a modified version of the at91sam9g20 evaluation kit platform (board-sam9g20ek-2slot-mmc.c) and device support to make use of the updated atmel-mci driver.

As the use of two slots modify GPIO pin allocation, we create another board file.

This requires getting the most updated arch/arm/tools/mach-types from
http://www.arm.linux.org.uk/developer/machines/download.php to have the machine type for the at91sam9g20ek-2slot-mmc board.

[[email protected]: printk, slot_count modification in at91sam9260_devices.c file]
[[email protected]: coding-style fixes]
Cc Haavard Skinnemoen <[email protected]>
Cc Andrew Victor <[email protected]>
Cc Russell King <[email protected]>

---

 arch/arm/mach-at91/Kconfig                     |    7 
 arch/arm/mach-at91/Makefile                    |    1 
 arch/arm/mach-at91/at91sam9260_devices.c       |   96 +++++
 arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c |  277 +++++++++++++++
 arch/arm/mach-at91/include/mach/board.h        |    5 
 5 files changed, 386 insertions(+)
arch/arm/mach-at91/Kconfig renamed from arch/arm/mach-at91/Kconfig~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver +7 -0
diff -puN arch/arm/mach-at91/Kconfig~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver arch/arm/mach-at91/Kconfig
@@ -289,6 +289,13 @@ config MACH_NEOCORE926
 	help
 	  Select this if you are using the Adeneo Neocore 926 board.
 
+config MACH_AT91SAM9G20EK_2MMC
+	bool "Atmel AT91SAM9G20-EK Evaluation Kit modified for 2 MMC Slots"
+	depends on ARCH_AT91SAM9G20
+	help
+	  Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
+	  Rev A or B modified for 2 MMC Slots.
+
 endif
 
 # ----------------------------------------------------------
arch/arm/mach-at91/Makefile renamed from arch/arm/mach-at91/Makefile~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver +1 -0
diff -puN arch/arm/mach-at91/Makefile~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver arch/arm/mach-at91/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK)	+= board
 
 # AT91SAM9G20 board-specific support
 obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o
+obj-$(CONFIG_MACH_AT91SAM9G20EK_2MMC) += board-sam9g20ek-2slot-mmc.o
 obj-$(CONFIG_MACH_CPU9G20)	+= board-cpu9krea.o
 
 # AT91SAM9G45 board-specific support
arch/arm/mach-at91/at91sam9260_devices.c renamed from arch/arm/mach-at91/at91sam9260_devices.c~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver +96 -0

102 lines not on this page · raw message

arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c new file +277 -0

277 lines not on this page · raw message

arch/arm/mach-at91/include/mach/board.h renamed from arch/arm/mach-at91/include/mach/board.h~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver +5 -0
diff -puN arch/arm/mach-at91/include/mach/board.h~at91-atmel-mci-platform-configuration-to-the-the-atmel-mci-driver arch/arm/mach-at91/include/mach/board.h
@@ -37,6 +37,7 @@
 #include <linux/leds.h>
 #include <linux/spi/spi.h>
 #include <linux/usb/atmel_usba_udc.h>
+#include <linux/atmel-mci.h>
 #include <sound/atmel-ac97c.h>
 
  /* USB Device */
@@ -64,6 +65,7 @@ struct at91_cf_data {
 extern void __init at91_add_device_cf(struct at91_cf_data *data);
 
  /* MMC / SD */
+  /* at91_mci platform config */
 struct at91_mmc_data {
 	u8		det_pin;	/* card detect IRQ */
 	unsigned	slot_b:1;	/* uses Slot B */
@@ -73,6 +75,9 @@ struct at91_mmc_data {
 };
 extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data);
 
+  /* atmel-mci platform config */
+extern void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data);
+
  /* Ethernet (EMAC & MACB) */
 struct at91_eth_data {
 	u32		phy_mask;

_