From patchwork Fri Mar 13 18:04:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 11834 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2DI3OoP005766 for ; Fri, 13 Mar 2009 18:04:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbZCMSEN (ORCPT ); Fri, 13 Mar 2009 14:04:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753000AbZCMSEN (ORCPT ); Fri, 13 Mar 2009 14:04:13 -0400 Received: from mho-01-bos.mailhop.org ([63.208.196.178]:62409 "EHLO mho-01-bos.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbZCMSEM (ORCPT ); Fri, 13 Mar 2009 14:04:12 -0400 Received: from c-69-181-40-92.hsd1.ca.comcast.net ([69.181.40.92] helo=[127.0.0.1]) by mho-01-bos.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1LiBju-0004Fm-4y; Fri, 13 Mar 2009 18:04:10 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 69.181.40.92 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18PiEU7B/ueWEa/IwfUW4Yy Subject: [PATCH 4/4] Hook up twl4030 regulators to the relevant RX51 MMC slots. To: linux-omap@vger.kernel.org From: Tony Lindgren Cc: David Brownell , Lauri Leukkunen Date: Fri, 13 Mar 2009 11:04:13 -0700 Message-ID: <20090313180412.1548.87222.stgit@localhost> In-Reply-To: <20090313180123.1548.1188.stgit@localhost> References: <20090313180123.1548.1188.stgit@localhost> User-Agent: StGit/0.14.3.343.g0584 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: David Brownell Signed-off-by: David Brownell Acked-by: Lauri Leukkunen --- arch/arm/mach-omap2/board-rx51-flash.c | 23 ------------ arch/arm/mach-omap2/board-rx51-peripherals.c | 48 +++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 25 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/board-rx51-flash.c b/arch/arm/mach-omap2/board-rx51-flash.c index 39b0659..fe9329d 100644 --- a/arch/arm/mach-omap2/board-rx51-flash.c +++ b/arch/arm/mach-omap2/board-rx51-flash.c @@ -10,34 +10,11 @@ #include #include -#include - -#include "mmc-twl4030.h" extern void __init n800_flash_init(void); -static struct twl4030_hsmmc_info mmc[] __initdata = { - { - .name = "external", - .mmc = 1, - .wires = 4, - .cover_only = true, - .gpio_cd = 160, - .gpio_wp = -EINVAL, - }, - { - .name = "internal", - .mmc = 2, - .wires = 8, - .gpio_cd = -EINVAL, - .gpio_wp = -EINVAL, - }, - {} /* Terminator */ -}; - void __init rx51_flash_init(void) { n800_flash_init(); - twl4030_mmc_init(mmc); } diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 88f9f43..b86e94d 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -28,7 +28,10 @@ #include #include -#define SMC91X_CS 1 +#include "mmc-twl4030.h" + + +#define SMC91X_CS 1 #define SMC91X_GPIO_IRQ 54 #define SMC91X_GPIO_RESET 164 #define SMC91X_GPIO_PWRDWN 86 @@ -247,6 +250,37 @@ static struct twl4030_madc_platform_data rx51_madc_data = { .irq_line = 1, }; +static struct twl4030_hsmmc_info mmc[] = { + { + .name = "external", + .mmc = 1, + .wires = 4, + .cover_only = true, + .gpio_cd = 160, + .gpio_wp = -EINVAL, + }, + { + .name = "internal", + .mmc = 2, + .wires = 8, + .gpio_cd = -EINVAL, + .gpio_wp = -EINVAL, + }, + {} /* Terminator */ +}; + +static struct regulator_consumer_supply rx51_vmmc1_supply = { + .supply = "vmmc", +}; + +static struct regulator_consumer_supply rx51_vmmc2_supply = { + .supply = "vmmc", +}; + +static struct regulator_consumer_supply rx51_vsim_supply = { + .supply = "vmmc_aux", +}; + static struct regulator_init_data rx51_vaux1 = { .constraints = { .name = "V28", @@ -308,6 +342,8 @@ static struct regulator_init_data rx51_vmmc1 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = 1, + .consumer_supplies = &rx51_vmmc1_supply, }; static struct regulator_init_data rx51_vmmc2 = { @@ -322,6 +358,8 @@ static struct regulator_init_data rx51_vmmc2 = { | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = 1, + .consumer_supplies = &rx51_vmmc2_supply, }; static struct regulator_init_data rx51_vsim = { @@ -335,6 +373,8 @@ static struct regulator_init_data rx51_vsim = { .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, + .num_consumer_supplies = 1, + .consumer_supplies = &rx51_vsim_supply, }; static struct regulator_init_data rx51_vdac = { @@ -357,7 +397,11 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) gpio_request(gpio + 7, "speaker_en"); gpio_direction_output(gpio + 7, 1); - /* FIXME connect power supplies to devices; register MMC */ + /* set up MMC adapters, linking their regulators to them */ + twl4030_mmc_init(mmc); + rx51_vmmc1_supply.dev = mmc[0].dev; + rx51_vmmc2_supply.dev = mmc[1].dev; + rx51_vsim_supply.dev = mmc[1].dev; return 0; }