]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: ux500: Enable Device Tree support mmci for Snowball
authorLee Jones <lee.jones@linaro.org>
Tue, 29 May 2012 06:40:04 +0000 (14:40 +0800)
committerLee Jones <lee.jones@linaro.org>
Fri, 13 Jul 2012 07:55:43 +0000 (09:55 +0200)
Allow proper initialisation for MMC via the mmci driver
for the Snowball low-cost development board using DT. At
the moment we continue to use DMA setup from platform code.
Once the DMA generic DT bindings have been completed we
can then port the remainder over to DT.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
arch/arm/boot/dts/snowball.dts
arch/arm/mach-ux500/board-mop500-sdi.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h

index ec3c339751104c43594062c30a47f2601b02b731..68f66f3096a05b36bf4e6c6d93190b9e0a21afb9 100644 (file)
                        };
                };
 
+               // External Micro SD slot
                sdi@80126000 {
-                       status = "enabled";
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <50000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
                        vmmc-supply = <&ab8500_ldo_aux3_reg>;
+
+                       #gpio-cells = <1>;
                        cd-gpios  = <&gpio6 26 0x4>; // 218
+                       cd-inverted;
+
+                       status = "okay";
                };
 
+               // On-board eMMC
                sdi@80114000 {
-                       status = "enabled";
+                       arm,primecell-periphid = <0x10480180>;
+                       max-frequency = <50000000>;
+                       bus-width = <8>;
+                       mmc-cap-mmc-highspeed;
                        vmmc-supply = <&ab8500_ldo_aux2_reg>;
+
+                       status = "okay";
                };
 
                uart@80120000 {
index 920251cf834cd8859900417cd106d9af7e83a210..18ff781cfbe41a748e4765915292f62f7781540c 100644 (file)
@@ -80,7 +80,7 @@ static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
 };
 #endif
 
-static struct mmci_platform_data mop500_sdi0_data = {
+struct mmci_platform_data mop500_sdi0_data = {
        .ios_handler    = mop500_sdi0_ios_handler,
        .ocr_mask       = MMC_VDD_29_30,
        .f_max          = 50000000,
@@ -227,7 +227,7 @@ static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
 };
 #endif
 
-static struct mmci_platform_data mop500_sdi4_data = {
+struct mmci_platform_data mop500_sdi4_data = {
        .ocr_mask       = MMC_VDD_29_30,
        .f_max          = 50000000,
        .capabilities   = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
index 4fd93f5c49ec359f6889f054fe33cd076c7bf822..1bf179e91eab4daf5f83770c1112f1954ab9ff01 100644 (file)
@@ -776,6 +776,8 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
        /* Requires DMA bindings. */
        OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  &mop500_sdi0_data),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4",  &mop500_sdi4_data),
        /* Requires clock name bindings. */
        OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
        OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL),
@@ -851,7 +853,6 @@ static void __init u8500_init_machine(void)
                platform_add_devices(snowball_of_platform_devs,
                                ARRAY_SIZE(snowball_of_platform_devs));
 
-               snowball_sdi_init(parent);
        } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
                /*
                 * The HREFv60 board removed a GPIO expander and routed
index 2f87b25a908a31c74264ac0b7a29eb34f85f2c58..b5bfc1a78b1adb0313dd96ff301f7a10f8a842c3 100644 (file)
@@ -9,6 +9,7 @@
 
 /* For NOMADIK_NR_GPIO */
 #include <mach/irqs.h>
+#include <linux/amba/mmci.h>
 
 /* Snowball specific GPIO assignments, this board has no GPIO expander */
 #define SNOWBALL_ACCEL_INT1_GPIO       163
@@ -78,6 +79,8 @@
 
 struct device;
 struct i2c_board_info;
+extern struct mmci_platform_data mop500_sdi0_data;
+extern struct mmci_platform_data mop500_sdi4_data;
 
 extern void mop500_sdi_init(struct device *parent);
 extern void snowball_sdi_init(struct device *parent);