All of lore.kernel.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6.1/7] ARM: ux500: Enable Device Tree support mmci for Snowball
Date: Mon, 16 Apr 2012 10:25:46 +0100	[thread overview]
Message-ID: <4F8BE59A.6060106@linaro.org> (raw)
In-Reply-To: <CACRpkdYyP=V=aXtDuo_W4oDxH0UkQKq1x1HKG_z=zWHoWng6JQ@mail.gmail.com>

From: Lee Jones <lee.jones@linaro.org>
Date: Mon, 16 Apr 2012 10:11:03 +0100
Subject: [PATCH 6.1/7] ARM: ux500: Enable Device Tree support mmci for Snowball

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         |   21 ++++++++++++++++++---
 arch/arm/mach-ux500/board-mop500-sdi.c |    4 ++--
 arch/arm/mach-ux500/board-mop500.c     |    3 ++-
 arch/arm/mach-ux500/board-mop500.h     |    4 ++++
 4 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 0cec47b..fb2a037 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -87,13 +87,28 @@
 			};
 		};
 
+		// External Micro SD slot
 		sdi at 80126000 {
-			status = "enabled";
-			cd-gpios = <&gpio6 26>;
+			arm,primecell-periphid = <0x10480180>;
+			max-frequency = <50000000>;
+			bus-width = <8>;
+			mmc-cap-mmc-highspeed;
+
+			#gpio-cells = <1>;
+			cd-gpios  = <&gpio6 26>; // 218
+			cd-inverted;
+
+			status = "okay";
 		};
 
+		// On-board eMMC
 		sdi at 80114000 {
-			status = "enabled";
+			arm,primecell-periphid = <0x10480180>;
+		        max-frequency = <50000000>;
+			bus-width = <8>;
+			mmc-cap-mmc-highspeed;
+
+			status = "okay";
 		};
 
 		uart at 80120000 {
diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 920251c..18ff781 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -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 |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 5064140..d68a73c 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -752,6 +752,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),
@@ -801,7 +803,6 @@ static void __init u8500_init_machine(void)
 		platform_add_devices(snowball_platform_devs,
 				ARRAY_SIZE(snowball_platform_devs));
 
-		snowball_sdi_init(parent);
 	} else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
 		/*
 		 * The HREFv60 board removed a GPIO expander and routed
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index fdcfa87..384baf7 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -7,6 +7,8 @@
 #ifndef __BOARD_MOP500_H
 #define __BOARD_MOP500_H
 
+#include <linux/amba/mmci.h>
+
 /* Snowball specific GPIO assignments, this board has no GPIO expander */
 #define SNOWBALL_ACCEL_INT1_GPIO	163
 #define SNOWBALL_ACCEL_INT2_GPIO	164
@@ -74,6 +76,8 @@
 #define SNOWBALL_EN_3V3_ETH_GPIO	MOP500_AB8500_PIN_GPIO(26)	/* GPIO26 */
 
 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);
-- 
1.7.9.1

  parent reply	other threads:[~2012-04-16  9:25 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 14:05 [PATCH 0/7 v2] Next round of DT enablement for ux500/Snowball Lee Jones
2012-04-13 14:05 ` [PATCH 1/7] ARM: ux500: Rename the DT compatible entry for i2c devices on Snowball Lee Jones
2012-04-16  8:34   ` Linus Walleij
2012-04-13 14:05 ` [PATCH 2/7] ARM: ux500: Shorten Snowball's DT compatible gpio entry Lee Jones
2012-04-16  8:36   ` Linus Walleij
2012-04-16  9:00     ` Lee Jones
2012-04-13 14:05 ` [PATCH 3/7] drivers/gpio: gpio-nomadik: Apply Device Tree bindings Lee Jones
2012-04-16  8:40   ` Linus Walleij
2012-05-17 21:33   ` Grant Likely
2012-05-18  7:37     ` Lee Jones
2012-04-13 14:05 ` [PATCH 4/7] drivers/gpio: gpio-nomadik: Provide documentation for " Lee Jones
2012-04-13 14:59   ` Lee Jones
2012-04-16  8:43     ` Linus Walleij
2012-04-13 14:05 ` [PATCH 5/7] ARM: ux500: Rename gpio_keys in the Device Tree file Lee Jones
2012-04-13 14:05 ` [PATCH 6/7] MMC: mmci: Enable Device Tree support for ux500 variants Lee Jones
2012-04-13 14:42   ` Pawel Moll
2012-04-13 14:51     ` Arnd Bergmann
2012-04-13 14:54       ` Lee Jones
2012-04-13 15:05         ` Pawel Moll
2012-04-13 15:16           ` Lee Jones
2012-04-13 15:27             ` Pawel Moll
2012-04-16  8:48   ` Linus Walleij
2012-04-16  9:06     ` Lee Jones
2012-04-16  9:18       ` Linus Walleij
2012-04-16  9:25     ` Lee Jones [this message]
2012-04-16  9:26     ` [PATCH 6.2/7] MMC: mmci: Enable Device Tree support for ux500 Lee Jones
2012-04-25 18:57       ` Russell King - ARM Linux
2012-04-30  8:25         ` Lee Jones
2012-05-03 15:03         ` Lee Jones
2012-05-03 15:12           ` Russell King - ARM Linux
2012-05-03 15:18             ` Lee Jones
2012-05-03 15:30             ` Lee Jones
2012-05-03 16:30               ` Russell King - ARM Linux
2012-05-03 16:38                 ` Lee Jones
2012-05-03 16:45                   ` Russell King - ARM Linux
2012-05-03 16:59                     ` Lee Jones
2012-05-03 17:13                       ` Mark Brown
2012-05-03 21:21                         ` Lee Jones
2012-05-03 17:09                     ` Chris Ball
2012-05-04 13:18                       ` Lee Jones
2012-05-04 13:26                         ` Chris Ball
2012-05-04 13:39                           ` Lee Jones
2012-05-07 22:00                             ` Paul Gortmaker
2012-05-07 22:00                               ` Paul Gortmaker
2012-05-08 11:19                               ` Lee Jones
2012-05-08 11:19                                 ` Lee Jones
2012-05-08 12:18                                 ` Chris Ball
2012-05-08 12:18                                   ` Chris Ball
2012-05-08 12:59                                   ` Lee Jones
2012-05-08 12:59                                     ` Lee Jones
2012-05-08 14:38                                     ` Chris Ball
2012-05-08 14:38                                       ` Chris Ball
2012-05-08 23:58                                     ` Paul Gortmaker
2012-05-08 23:58                                       ` Paul Gortmaker
2012-05-09  0:29                                       ` Chris Ball
2012-05-09  0:29                                         ` Chris Ball
2012-05-09  0:52                                         ` Paul Gortmaker
2012-05-09  0:52                                           ` Paul Gortmaker
     [not found]                           ` <4FA3DEEF.2010206@linaro.org>
2012-05-04 14:08                             ` Chris Ball
2012-06-04 10:14       ` Russell King - ARM Linux
2012-06-05 10:47         ` Lee Jones
2012-06-05 10:52           ` Russell King - ARM Linux
2012-06-05 12:59             ` Linus Walleij
2012-06-06  8:09               ` Lee Jones
2012-06-11 10:03               ` Lee Jones
2012-06-11 10:34                 ` Linus Walleij
2012-04-13 14:05 ` [PATCH 7/7] MMC: mmci: Add required documentation for Device Tree bindings Lee Jones
2012-04-18 14:31   ` Pawel Moll
2012-04-18 15:01     ` Pawel Moll
2012-04-18 15:12     ` Lee Jones
2012-04-18 15:20       ` Chris Ball
2012-04-18 15:25         ` Lee Jones
2012-04-18 15:20   ` [PATCH 7/7 v2] " Lee Jones
2012-05-17 21:23   ` [PATCH 7/7] " Grant Likely
2012-04-13 14:21 ` [PATCH 0/7 v2] Next round of DT enablement for ux500/Snowball Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F8BE59A.6060106@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.