From patchwork Thu Jul 4 20:38:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2823928 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F5159F3C3 for ; Thu, 4 Jul 2013 20:39:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A147F20152 for ; Thu, 4 Jul 2013 20:39:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9132220153 for ; Thu, 4 Jul 2013 20:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756833Ab3GDUjE (ORCPT ); Thu, 4 Jul 2013 16:39:04 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:59329 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756759Ab3GDUjD (ORCPT ); Thu, 4 Jul 2013 16:39:03 -0400 Received: from axis700.grange (dslb-088-076-026-213.pools.arcor-ip.net [88.76.26.213]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LgL1E-1UOow22lro-00nx0F; Thu, 04 Jul 2013 22:38:59 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 9FF8840BB5; Thu, 4 Jul 2013 22:38:57 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1UuqIp-0005b5-0Q; Thu, 04 Jul 2013 22:38:55 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Simon Horman , Magnus Damm , Guennadi Liakhovetski Subject: [PATCH 2/6] ARM: shmobile: APE6EVM: add MMCIF support Date: Thu, 4 Jul 2013 22:38:50 +0200 Message-Id: <1372970334-21485-3-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1372970334-21485-1-git-send-email-g.liakhovetski@gmx.de> References: <1372970334-21485-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:0qDUyS1UyL+kGtQiuyo29AhLuBdcs88w7sRFcKxJDG4 Ew4uRh10oZngHFUcA5FTR9SbIh4sjzttlcSIWiq7+ipil8BU65 cVNiEHqTl6Ek5C5K/01Bdksszik6Xjqvq+mdL2ag3arGfol0Ai UjubR5IokWU2yG4xycXBj97z8k/4E4r+EQfqh+Wum5h0HOPiwA gBO6MI8Q6FVFgQ60O4OMeGYbFbjyd3PwnxHoS2U9pm+sI089CO GugPC35tYvDW6os4Qbqt8FYFpPbS4sBzUYKfBVUTqcIM6MSt8N HVzn+dvYMzKVEPZkaxkEvUpjFPyV/xWJasENF7cqiieDopQgVu estIH6iQwz1eeUUaCVdV0NqbvE1LpY5jXaZUV1GWs7J+aHgIcr TSKIkpHo1PpwQ== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add MMCIF support to the APE6EVM board in both PIO and DMA modes, depending on the DMAC driver availability. Signed-off-by: Guennadi Liakhovetski Acked-by: Magnus Damm --- arch/arm/mach-shmobile/board-ape6evm.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index af6dd39..05f8557 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include #include @@ -54,6 +56,24 @@ static const struct smsc911x_platform_config lan9220_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, }; +/* Fixed 3.3V regulator to be used by MMCIF */ +static struct regulator_consumer_supply fixed3v3_power_consumers[] = +{ + REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), +}; + +/* MMCIF */ +static struct sh_mmcif_plat_data mmcif0_pdata = { + .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, + .slave_id_tx = SHDMA_SLAVE_MMCIF0_TX, + .slave_id_rx = SHDMA_SLAVE_MMCIF0_RX, +}; + +static struct resource mmcif0_resources[] = { + DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), + DEFINE_RES_IRQ(gic_spi(169)), +}; + static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SCIFA0 console */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", @@ -61,6 +81,11 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SMSC */ PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4", "irqc_irq40", "irqc"), + /* MMCIF0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", + "mmc0_data8", "mmc0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", + "mmc0_ctrl", "mmc0"), }; static void __init ape6evm_add_standard_devices(void) @@ -93,6 +118,11 @@ static void __init ape6evm_add_standard_devices(void) platform_device_register_resndata(&platform_bus, "smsc911x", -1, lan9220_res, ARRAY_SIZE(lan9220_res), &lan9220_data, sizeof(lan9220_data)); + regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); + platform_device_register_resndata(&platform_bus, "sh_mmcif", 0, + mmcif0_resources, ARRAY_SIZE(mmcif0_resources), + &mmcif0_pdata, sizeof(mmcif0_pdata)); } static const char *ape6evm_boards_compat_dt[] __initdata = {