From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/13] omap4: Adding hsmmc support to board file
Date: Mon, 17 May 2010 19:43:02 -0700 [thread overview]
Message-ID: <20100518024302.21705.2273.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100518023707.21705.26205.stgit@baageli.muru.com>
From: kishore kadiyala <kishore.kadiyala@ti.com>
Adding support for MMC1 & MMC2 controllers of OMAP4430 SDP
to board file.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/Makefile | 3 +-
arch/arm/mach-omap2/board-4430sdp.c | 59 +++++++++++++++++++++++++++++++----
2 files changed, 54 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 203a414..a799453 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -137,7 +137,8 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
hsmmc.o
obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
hsmmc.o
-obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
+obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
+ hsmmc.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 921cde3..e4a5d66 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -33,6 +33,8 @@
#include <plat/control.h>
#include <plat/timer-gp.h>
#include <plat/usb.h>
+#include <plat/mmc.h>
+#include "hsmmc.h"
#define ETH_KS8851_IRQ 34
#define ETH_KS8851_POWER_ON 48
@@ -137,24 +139,66 @@ static struct omap_musb_board_data musb_board_data = {
.mode = MUSB_PERIPHERAL,
.power = 100,
};
-static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
- {
- .supply = "vmmc",
- },
+
+static struct omap2_hsmmc_info mmc[] = {
{
- .supply = "vmmc",
+ .mmc = 1,
+ .wires = 8,
+ .gpio_wp = -EINVAL,
},
{
- .supply = "vmmc",
+ .mmc = 2,
+ .wires = 8,
+ .gpio_cd = -EINVAL,
+ .gpio_wp = -EINVAL,
+ .nonremovable = true,
},
+ {} /* Terminator */
+};
+
+static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
{
.supply = "vmmc",
+ .dev_name = "mmci-omap-hs.0",
},
{
.supply = "vmmc",
+ .dev_name = "mmci-omap-hs.1",
},
};
+static int omap4_twl6030_hsmmc_late_init(struct device *dev)
+{
+ int ret = 0;
+ struct platform_device *pdev = container_of(dev,
+ struct platform_device, dev);
+ struct omap_mmc_platform_data *pdata = dev->platform_data;
+
+ /* Setting MMC1 Card detect Irq */
+ if (pdev->id == 0)
+ pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
+ MMCDETECT_INTR_OFFSET;
+ return ret;
+}
+
+static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
+{
+ struct omap_mmc_platform_data *pdata = dev->platform_data;
+
+ pdata->init = omap4_twl6030_hsmmc_late_init;
+}
+
+static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
+{
+ struct omap2_hsmmc_info *c;
+
+ omap2_hsmmc_init(controllers);
+ for (c = controllers; c->mmc; c++)
+ omap4_twl6030_hsmmc_set_late_init(c->dev);
+
+ return 0;
+}
+
static struct regulator_init_data sdp4430_vaux1 = {
.constraints = {
.min_uV = 1000000,
@@ -206,7 +250,7 @@ static struct regulator_init_data sdp4430_vmmc = {
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = 5,
+ .num_consumer_supplies = 2,
.consumer_supplies = sdp4430_vmmc_supply,
};
@@ -329,6 +373,7 @@ static void __init omap_4430sdp_init(void)
omap4_i2c_init();
platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
omap_serial_init();
+ omap4_twl6030_hsmmc_init(mmc);
/* OMAP4 SDP uses internal transceiver so register nop transceiver */
usb_nop_xceiv_register();
/* FIXME: allow multi-omap to boot until musb is updated for omap4 */
next prev parent reply other threads:[~2010-05-18 2:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 2:42 [PATCH 00/13] More omap platform init code for 2.6.35 merge window Tony Lindgren
2010-05-18 2:42 ` [PATCH 01/13] omap: Fix i2c platform init code for omap4 Tony Lindgren
2010-05-19 0:15 ` Tony Lindgren
2010-05-18 2:42 ` [PATCH 02/13] omap4: Add support for i2c init Tony Lindgren
2010-05-19 0:16 ` Tony Lindgren
2010-05-18 2:42 ` [PATCH 03/13] omap4: Add i2c board support on omap4430 sdp platform Tony Lindgren
2010-05-18 2:42 ` [PATCH 04/13] omap4: add i2c1 peripherals data Tony Lindgren
2010-05-18 2:42 ` [PATCH 05/13] omap4: Enable RTC and regulator support Tony Lindgren
2010-05-18 2:42 ` [PATCH 06/13] omap4: Adds Dummy Interface clock's for MMC controllers Tony Lindgren
2010-05-18 2:43 ` Tony Lindgren [this message]
2010-05-18 2:43 ` [PATCH 08/13] omap4: Adding PBIAS Configuration for MMC1 Controller Tony Lindgren
2010-05-18 2:43 ` [PATCH 09/13] omap4: Enable HSMMC support Tony Lindgren
2010-05-18 2:43 ` [PATCH 10/13] omap3: Add support for OMAP3Stalker boards Tony Lindgren
2010-05-18 2:43 ` [PATCH 11/13] omap3: Add OMAP3 Stalker board LK-S defconfig Tony Lindgren
2010-05-18 2:43 ` [PATCH 12/13] omap3: update omap3_defconfig Tony Lindgren
2010-05-18 2:43 ` [PATCH 13/13] omap3: Add stalker board to omap3_defconfig Tony Lindgren
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=20100518024302.21705.2273.stgit@baageli.muru.com \
--to=tony@atomide.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).