From patchwork Wed Oct 31 11:22:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1678551 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EDDFCDF264 for ; Wed, 31 Oct 2012 11:24:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422747Ab2JaLX6 (ORCPT ); Wed, 31 Oct 2012 07:23:58 -0400 Received: from mail-ye0-f174.google.com ([209.85.213.174]:56548 "EHLO mail-ye0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965465Ab2JaLXH (ORCPT ); Wed, 31 Oct 2012 07:23:07 -0400 Received: by mail-ye0-f174.google.com with SMTP id m12so234421yen.19 for ; Wed, 31 Oct 2012 04:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=GVyXf+nnNNNmd7tM7v+1hCBY5zhHDiBmAOdluO25ea4=; b=U4iXHZWWrsbdkSesFOghcbV65V14eINJpXoMKT7lin83oKwplcCfH37Jih/tWwFTff b8Mut+6x1XoQ1+Tz2268v6mRAUWV+3DmtYkReQSaPwAeqYuEXdxIEOweVDwGUGeVULDL vmi70H+jkOCIk3AUzlAl3uDesTGwD4BxYDN2wQZK35ZFeJadDqCcb+GKA9L7MNQWeOSq sfVmbC4EqarBiKVkSGcItKWcSqSqz2npCtQzPdM2lvt0of/tR05oVIaDPaJoxE1JXHp8 xCnh+RdASm1P/9+7BC700rqLJAdHw4pv9K3A4m/9L8HIeHzrw4beWpFXeUcFEcibSQek TUGg== Received: by 10.101.11.20 with SMTP id o20mr7833349ani.41.1351682586272; Wed, 31 Oct 2012 04:23:06 -0700 (PDT) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([201.82.136.205]) by mx.google.com with ESMTPS id m26sm3337126yhc.17.2012.10.31.04.23.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Oct 2012 04:23:05 -0700 (PDT) From: Fabio Estevam To: cjb@laptop.org Cc: shawn.guo@linaro.org, marex@denx.de, linux-mmc@vger.kernel.org, Fabio Estevam Subject: [PATCH v2] mmc: mxs-mmc: Remove platform data Date: Wed, 31 Oct 2012 09:22:58 -0200 Message-Id: <1351682578-12922-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Fabio Estevam All MXS users have been converted to device tree and the board files have been removed. No need to keep platform data in the driver. Also move bus_width declaration in the beggining of mxs_mmc_probe() to avoid: 'warning: ISO C90 forbids mixed declarations and code'. Signed-off-by: Fabio Estevam ---- Changes since v1: - Also remove mxs_mmc_platform_data and linux/mmc/mxs-mmc.h, which was used only to include mxs_mmc_platform_data definition. drivers/mmc/host/mxs-mmc.c | 31 ++++++++++--------------------- include/linux/mmc/mxs-mmc.h | 19 ------------------- 2 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 include/linux/mmc/mxs-mmc.h diff --git a/include/linux/mmc/mxs-mmc.h b/include/linux/mmc/mxs-mmc.h deleted file mode 100644 index 7c2ad3a..0000000 Acked-by: Shawn Guo Acked-by: Marek Vasut diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 80d1e6d..206fe49 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #define DRIVER_NAME "mxs-mmc" @@ -593,13 +592,13 @@ static int mxs_mmc_probe(struct platform_device *pdev) struct mxs_mmc_host *host; struct mmc_host *mmc; struct resource *iores, *dmares; - struct mxs_mmc_platform_data *pdata; struct pinctrl *pinctrl; int ret = 0, irq_err, irq_dma; dma_cap_mask_t mask; struct regulator *reg_vmmc; enum of_gpio_flags flags; struct mxs_ssp *ssp; + u32 bus_width = 0; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); @@ -682,25 +681,15 @@ static int mxs_mmc_probe(struct platform_device *pdev) mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL; - pdata = mmc_dev(host->mmc)->platform_data; - if (!pdata) { - u32 bus_width = 0; - of_property_read_u32(np, "bus-width", &bus_width); - if (bus_width == 4) - mmc->caps |= MMC_CAP_4_BIT_DATA; - else if (bus_width == 8) - mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; - host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, - &flags); - if (flags & OF_GPIO_ACTIVE_LOW) - host->wp_inverted = 1; - } else { - if (pdata->flags & SLOTF_8_BIT_CAPABLE) - mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; - if (pdata->flags & SLOTF_4_BIT_CAPABLE) - mmc->caps |= MMC_CAP_4_BIT_DATA; - host->wp_gpio = pdata->wp_gpio; - } + of_property_read_u32(np, "bus-width", &bus_width); + if (bus_width == 4) + mmc->caps |= MMC_CAP_4_BIT_DATA; + else if (bus_width == 8) + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; + host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags); + + if (flags & OF_GPIO_ACTIVE_LOW) + host->wp_inverted = 1; mmc->f_min = 400000; mmc->f_max = 288000000;