From patchwork Tue Dec 4 17:58:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10712311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A03E013BF for ; Tue, 4 Dec 2018 17:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F1E02BF1B for ; Tue, 4 Dec 2018 17:58:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 800832BF4C; Tue, 4 Dec 2018 17:58:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2569E2BF1B for ; Tue, 4 Dec 2018 17:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726078AbeLDR6c (ORCPT ); Tue, 4 Dec 2018 12:58:32 -0500 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]:55568 "EHLO emh07.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeLDR6c (ORCPT ); Tue, 4 Dec 2018 12:58:32 -0500 Received: from localhost.localdomain (85-76-96-200-nat.elisa-mobile.fi [85.76.96.200]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id 5012CB0059; Tue, 4 Dec 2018 19:58:30 +0200 (EET) From: Aaro Koskinen To: Tony Lindgren , linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH] ARM: OMAP1: add MMC configuration for Palm Tungsten E Date: Tue, 4 Dec 2018 19:58:12 +0200 Message-Id: <20181204175812.2678-1-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add initial MMC configuration for Palm Tungsten E to allow using a proper rootfs on the device. This still assumes the bootloader enabling the MMC, and that the card is always present and writeable. Signed-off-by: Aaro Koskinen --- arch/arm/mach-omap1/board-palmte.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 2dc5deb19803..d4d8a32e57eb 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -43,6 +43,7 @@ #include #include +#include "mmc.h" #include "common.h" #define PALMTE_USBDETECT_GPIO 0 @@ -208,6 +209,33 @@ static void __init palmte_misc_gpio_setup(void) gpio_direction_input(PALMTE_USB_OR_DC_GPIO); } +#if IS_ENABLED(CONFIG_MMC_OMAP) + +static struct omap_mmc_platform_data _palmte_mmc_config = { + .nr_slots = 1, + .slots[0] = { + .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, + .name = "mmcblk", + }, +}; + +static struct omap_mmc_platform_data *palmte_mmc_config[OMAP15XX_NR_MMC] = { + [0] = &_palmte_mmc_config, +}; + +static void palmte_mmc_init(void) +{ + omap1_init_mmc(palmte_mmc_config, OMAP15XX_NR_MMC); +} + +#else /* CONFIG_MMC_OMAP */ + +static void palmte_mmc_init(void) +{ +} + +#endif /* CONFIG_MMC_OMAP */ + static void __init omap_palmte_init(void) { /* mux pins for uarts */ @@ -228,6 +256,7 @@ static void __init omap_palmte_init(void) omap_register_i2c_bus(1, 100, NULL, 0); omapfb_set_lcd_config(&palmte_lcd_config); + palmte_mmc_init(); } MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")