From patchwork Mon Feb 20 20:25:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 6838 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3237423E48 for ; Mon, 20 Feb 2012 20:26:00 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id C7D95A184C9 for ; Mon, 20 Feb 2012 20:25:59 +0000 (UTC) Received: by iabz7 with SMTP id z7so11141228iab.11 for ; Mon, 20 Feb 2012 12:25:59 -0800 (PST) Received: from mr.google.com ([10.50.135.37]) by 10.50.135.37 with SMTP id pp5mr15233084igb.26.1329769559339 (num_hops = 1); Mon, 20 Feb 2012 12:25:59 -0800 (PST) Received: by 10.50.135.37 with SMTP id pp5mr12323665igb.26.1329769559278; Mon, 20 Feb 2012 12:25:59 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.11.10 with SMTP id r10csp58223ibr; Mon, 20 Feb 2012 12:25:58 -0800 (PST) Received: by 10.14.125.3 with SMTP id y3mr9265504eeh.9.1329769557469; Mon, 20 Feb 2012 12:25:57 -0800 (PST) Received: from eu1sys200aog117.obsmtp.com (eu1sys200aog117.obsmtp.com. [207.126.144.143]) by mx.google.com with SMTP id z53si14264248eef.21.2012.02.20.12.25.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Feb 2012 12:25:57 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.143 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.143; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.143 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob117.postini.com ([207.126.147.11]) with SMTP ID DSNKT0KsTpjizU653Om3/8b0l03Tf89+SAkf@postini.com; Mon, 20 Feb 2012 20:25:57 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 96ED545; Mon, 20 Feb 2012 20:25:20 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id BEEB957; Mon, 20 Feb 2012 19:04:36 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id E8F85A8074; Mon, 20 Feb 2012 21:25:21 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 20 Feb 2012 21:25:29 +0100 From: Linus Walleij To: Cc: Linus Walleij Subject: [PATCH v2] mach-u300: do away with MMC config files Date: Mon, 20 Feb 2012 21:25:23 +0100 Message-ID: <1329769523-8819-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.8 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnfKmgSbVYJX5O4eOqdGbC4ZtduGeVBZ8j/2WixJlZhUMO3mxt8JCzsd6W+jrZBixqsYJBR From: Linus Walleij All the special stuff (like registering input device and so on) for the U300 MMC is now done away with. We don't need these special MMC setup kludges, merge this into core.c and be done with it. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on top of Russells AMBA cleanups, will submit this through Russell's patch tracker to minimize conflicts. --- arch/arm/mach-u300/Makefile | 1 - arch/arm/mach-u300/core.c | 38 +++++++++++++++++-------------- arch/arm/mach-u300/mmc.c | 52 ------------------------------------------- arch/arm/mach-u300/mmc.h | 18 --------------- 4 files changed, 21 insertions(+), 88 deletions(-) delete mode 100644 arch/arm/mach-u300/mmc.c delete mode 100644 arch/arm/mach-u300/mmc.h diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 2855381..fd3a5c3 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile @@ -8,7 +8,6 @@ obj-n := obj- := obj-$(CONFIG_ARCH_U300) += u300.o -obj-$(CONFIG_MMC) += mmc.o obj-$(CONFIG_SPI_PL022) += spi.o obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o obj-$(CONFIG_I2C_STU300) += i2c.o diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index d66bc97..02f5ac6 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -43,9 +44,9 @@ #include #include "clock.h" -#include "mmc.h" #include "spi.h" #include "i2c.h" +#include "u300-gpio.h" /* * Static I/O mappings that are needed for booting the U300 platforms. The @@ -116,11 +117,6 @@ static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE, /* AHB device at 0x4000 offset */ static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL); - -/* - * Everything within this next ifdef deals with external devices connected to - * the APP SPI bus. - */ /* Fast device at 0x6000 offset */ static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, { IRQ_U300_SPI }, NULL); @@ -128,8 +124,26 @@ static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE, /* Fast device at 0x1000 offset */ #define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 } +static struct mmci_platform_data mmcsd_platform_data = { + /* + * Do not set ocr_mask or voltage translation function, + * we have a regulator we can control instead. + */ + .f_max = 24000000, + .gpio_wp = -1, + .gpio_cd = U300_GPIO_PIN_MMC_CD, + .cd_invert = true, + .capabilities = MMC_CAP_MMC_HIGHSPEED | + MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, +#ifdef CONFIG_COH901318 + .dma_filter = coh901318_filter_id, + .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX, + /* Don't specify a TX channel, this RX channel is bidirectional */ +#endif +}; + static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE, - U300_MMCSD_IRQS, NULL); + U300_MMCSD_IRQS, &mmcsd_platform_data); /* * The order of device declaration may be important, since some devices @@ -1826,16 +1840,6 @@ void __init u300_init_devices(void) writew(val, U300_SYSCON_VBASE + U300_SYSCON_SMCR); } -static int core_module_init(void) -{ - /* - * This needs to be initialized later: it needs the input framework - * to be initialized first. - */ - return mmc_init(&mmcsd_device); -} -module_init(core_module_init); - /* Forward declare this function from the watchdog */ void coh901327_watchdog_reset(void); diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c deleted file mode 100644 index 05abd6a..0000000 --- a/arch/arm/mach-u300/mmc.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * arch/arm/mach-u300/mmc.c - * - * - * Copyright (C) 2009 ST-Ericsson SA - * License terms: GNU General Public License (GPL) version 2 - * - * Author: Linus Walleij - * Author: Johan Lundin - * Author: Jonas Aaberg - */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "u300-gpio.h" -#include "mmc.h" - -static struct mmci_platform_data mmc0_plat_data = { - /* - * Do not set ocr_mask or voltage translation function, - * we have a regulator we can control instead. - */ - /* Nominally 2.85V on our platform */ - .f_max = 24000000, - .gpio_wp = -1, - .gpio_cd = U300_GPIO_PIN_MMC_CD, - .cd_invert = true, - .capabilities = MMC_CAP_MMC_HIGHSPEED | - MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, -#ifdef CONFIG_COH901318 - .dma_filter = coh901318_filter_id, - .dma_rx_param = (void *) U300_DMA_MMCSD_RX_TX, - /* Don't specify a TX channel, this RX channel is bidirectional */ -#endif -}; - -int __devinit mmc_init(struct amba_device *adev) -{ - struct device *mmcsd_device = &adev->dev; - int ret = 0; - - mmcsd_device->platform_data = &mmc0_plat_data; - - return ret; -} diff --git a/arch/arm/mach-u300/mmc.h b/arch/arm/mach-u300/mmc.h deleted file mode 100644 index 92b8512..0000000 --- a/arch/arm/mach-u300/mmc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * arch/arm/mach-u300/mmc.h - * - * - * Copyright (C) 2009 ST-Ericsson AB - * License terms: GNU General Public License (GPL) version 2 - * - * Author: Jonas Aaberg - */ -#ifndef MMC_H -#define MMC_H - -#include - -int __devinit mmc_init(struct amba_device *adev); - -#endif