From patchwork Tue May 4 16:01:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kishore kadiyala X-Patchwork-Id: 96817 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o44G1bKU014056 for ; Tue, 4 May 2010 16:01:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759996Ab0EDQBg (ORCPT ); Tue, 4 May 2010 12:01:36 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:53329 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759980Ab0EDQBf (ORCPT ); Tue, 4 May 2010 12:01:35 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o44G1Q2r022358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 May 2010 11:01:26 -0500 Received: from dbdmail.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o44G1JNK018330; Tue, 4 May 2010 11:01:20 -0500 (CDT) Received: from 10.24.255.17 (SquirrelMail authenticated user x0099945); by dbdmail.itg.ti.com with HTTP; Tue, 4 May 2010 21:31:23 +0530 (IST) Message-ID: <35156.10.24.255.17.1272988883.squirrel@dbdmail.itg.ti.com> Date: Tue, 4 May 2010 21:31:23 +0530 (IST) Subject: [PATCH v2 1/5] OMAP4-HSMMC: Adding HSMMC support for OMAP4430 Board file From: "kishore kadiyala" To: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org Cc: tony@atomide.com, madhu.cr@ti.com, jarkko.lavinen@nokia.com, rmk@arm.linux.org.uk, paul@pwsan.com User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 04 May 2010 16:01:39 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index ffe600a..65d8d11 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -140,7 +140,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 f1b9708..c4e61d5 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -33,6 +33,7 @@ #include #include #include +#include "hsmmc.h" #define ETHERNET_KS8851_IRQ 34 #define ETHERNET_KS8851_POWER_ENABLE 48 @@ -93,16 +94,27 @@ static struct omap_musb_board_data musb_board_data = { .power = 100, }; -static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { +static struct omap2_hsmmc_info mmc[] = { { - .supply = "vmmc", + .mmc = 1, + .wires = 8, + /* "mmc0_cd" is not a gpio interrupt + * but is a phoenix interrupt + */ + .gpio_cd = TWL6030_IRQ_BASE + MMCDETECT_INTR_OFFSET, + .gpio_wp = -EINVAL, }, { - .supply = "vmmc", - }, - { - .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", }, @@ -111,6 +123,18 @@ static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { }, }; +static int __init sdp4430_mmc_init(void) +{ + omap2_hsmmc_init(mmc); + + /* link regulators to MMC adapters ... we "know" the + * regulators will be set up only *after* we return. + */ + sdp4430_vmmc_supply[0].dev = mmc[0].dev; + sdp4430_vmmc_supply[1].dev = mmc[1].dev; + return 0; +} + static struct regulator_init_data sdp4430_vaux1 = { .constraints = { .min_uV = 1000000, @@ -162,7 +186,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, }; @@ -281,6 +305,7 @@ static void __init omap_4430sdp_init(void) omap4_i2c_init(); platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); omap_serial_init(); + sdp4430_mmc_init(); /* 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 */