From patchwork Tue Oct 28 17:25:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 404305 X-Patchwork-Delegate: panto@antoniou-consulting.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B148214003E for ; Wed, 29 Oct 2014 04:26:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 46DFD4B841; Tue, 28 Oct 2014 18:26:07 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ACjuu5ewfgrF; Tue, 28 Oct 2014 18:26:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 849A84B83A; Tue, 28 Oct 2014 18:26:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A78EB4B83A for ; Tue, 28 Oct 2014 18:26:03 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gba9OAgGUgPz for ; Tue, 28 Oct 2014 18:26:03 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gagarine.paulk.fr (gagarine.paulk.fr [109.190.93.129]) by theia.denx.de (Postfix) with ESMTPS id 71CD04B839 for ; Tue, 28 Oct 2014 18:25:59 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 65534) id D6B4443CFE; Tue, 28 Oct 2014 18:25:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable version=3.3.2 Received: from armstrong.paulk.fr (armstrong.paulk.fr [82.233.88.171]) by gagarine.paulk.fr (Postfix) with ESMTPS id 2579943D00; Tue, 28 Oct 2014 18:25:53 +0100 (CET) Received: from aldrin.trisquel.info (aldrin [192.168.0.128]) by armstrong.paulk.fr (Postfix) with ESMTP id B1FDD37647; Tue, 28 Oct 2014 18:25:51 +0100 (CET) From: Paul Kocialkowski To: u-boot@lists.denx.de Date: Tue, 28 Oct 2014 18:25:44 +0100 Message-Id: <1414517144-2183-1-git-send-email-contact@paulk.fr> X-Mailer: git-send-email 1.7.9.5 Cc: Tom Rini Subject: [U-Boot] [PATCH] omap_hsmmc: Allow for board-specific MMC power init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Some devices may use non-standard combinations of regulators to power MMC: this allows these devices to provide a board-specific MMC power init function to set everything up in their own way. Signed-off-by: Paul Kocialkowski --- arch/arm/include/asm/omap_mmc.h | 4 +++- drivers/mmc/omap_hsmmc.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/omap_mmc.h b/arch/arm/include/asm/omap_mmc.h index 617e22f..b6a8325 100644 --- a/arch/arm/include/asm/omap_mmc.h +++ b/arch/arm/include/asm/omap_mmc.h @@ -164,5 +164,7 @@ struct hsmmc { int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, int wp_gpio); - +#ifdef CONFIG_OMAP_HSMMC_BOARD_POWER_INIT +void omap_hsmmc_board_power_init(void); +#endif #endif /* OMAP_MMC_H_ */ diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index ef2cbf9..ef4c5cf 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -136,7 +136,9 @@ static unsigned char mmc_board_init(struct mmc *mmc) pbias_lite &= ~(PBIASLITEPWRDNZ1 | PBIASLITEPWRDNZ0); writel(pbias_lite, &t2_base->pbias_lite); #endif -#if defined(CONFIG_TWL4030_POWER) +#if defined(CONFIG_OMAP_HSMMC_BOARD_POWER_INIT) + omap_hsmmc_board_power_init(); +#elif defined(CONFIG_TWL4030_POWER) twl4030_power_mmc_init(); mdelay(100); /* ramp-up delay from Linux code */ #endif