From patchwork Tue Apr 13 09:34:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "stanley.miao" X-Patchwork-Id: 92149 X-Patchwork-Delegate: tony@atomide.com 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 o3D9Q4DM020391 for ; Tue, 13 Apr 2010 09:26:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170Ab0DMJ0D (ORCPT ); Tue, 13 Apr 2010 05:26:03 -0400 Received: from mail.windriver.com ([147.11.1.11]:51516 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374Ab0DMJ0B (ORCPT ); Tue, 13 Apr 2010 05:26:01 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id o3D9Pvaf010458; Tue, 13 Apr 2010 02:25:57 -0700 (PDT) Received: from ala-mail06.corp.ad.wrs.com ([147.11.57.147]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 13 Apr 2010 02:25:57 -0700 Received: from localhost.localdomain ([128.224.163.169]) by ala-mail06.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 13 Apr 2010 02:25:55 -0700 From: "Stanley.Miao" To: linux-omap@vger.kernel.org Cc: tony@atomide.com, madhu.cr@ti.com Subject: [PATCH 11/11] AM3517: Add mmc platform data for am3517evm Date: Tue, 13 Apr 2010 17:34:30 +0800 Message-Id: <1271151270-13038-3-git-send-email-stanley.miao@windriver.com> X-Mailer: git-send-email 1.5.6.3 In-Reply-To: <1271151118-12999-1-git-send-email-stanley.miao@windriver.com> References: <1271151118-12999-1-git-send-email-stanley.miao@windriver.com> X-OriginalArrivalTime: 13 Apr 2010 09:25:56.0450 (UTC) FILETIME=[522F9420:01CADAEB] 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, 13 Apr 2010 09:26:04 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 4b9fc57..e94afdd 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -142,7 +142,8 @@ obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o -obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o +obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ + hsmmc.o # Platform specific device init code obj-y += usb-musb.o diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 6a82ac3..8054994 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,9 @@ #include #include #include +#include +#include "hsmmc.h" #include "mux.h" #define LCD_PANEL_PWR 176 @@ -440,6 +443,8 @@ static int __init am3517_evm_i2c_init(void) static int lcd_enabled; static int dvi_enabled; +#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \ + defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) static void __init am3517_evm_display_init(void) { int r; @@ -501,6 +506,20 @@ static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev) gpio_set_value(LCD_PANEL_PWR, 0); lcd_enabled = 0; } +#else +static inline void __init am3517_evm_display_init(void) +{ +} + +static inline int am3517_evm_panel_enable_lcd(struct omap_dss_device *dssdev) +{ + return 0; +} + +static inline void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev) +{ +} +#endif static struct omap_dss_device am3517_evm_lcd_device = { .type = OMAP_DISPLAY_TYPE_DPI, @@ -613,6 +632,30 @@ static struct omap_board_mux board_mux[] __initdata = { #define board_mux NULL #endif +static struct omap2_hsmmc_info mmc[] = { + { + .mmc = 1, + .wires = 4, + .gpio_cd = 127, + .gpio_wp = 126, + .ocr_mask = MMC_VDD_165_195 | + MMC_VDD_26_27 | MMC_VDD_27_28 | + MMC_VDD_29_30 | + MMC_VDD_30_31 | MMC_VDD_31_32, + }, +#if !defined(CONFIG_PANEL_SHARP_LQ043T1DG01) && \ + !defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE) + { + .mmc = 2, + .wires = 4, + .gpio_cd = 175, + .gpio_wp = 176, + .ocr_mask = MMC_VDD_165_195, + }, +#endif + {} /* Terminator */ +}; + static void __init am3517_evm_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); @@ -636,6 +679,8 @@ static void __init am3517_evm_init(void) i2c_register_board_info(1, am3517evm_i2c1_boardinfo, ARRAY_SIZE(am3517evm_i2c1_boardinfo)); + /* MMC init function */ + omap2_hsmmc_init(mmc); } static void __init am3517_evm_map_io(void)