From patchwork Tue Mar 12 04:38:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Liu X-Patchwork-Id: 2252881 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E42C13FCF6 for ; Tue, 12 Mar 2013 04:38:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825Ab3CLEia (ORCPT ); Tue, 12 Mar 2013 00:38:30 -0400 Received: from mail-oa0-f49.google.com ([209.85.219.49]:53955 "EHLO mail-oa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343Ab3CLEi3 (ORCPT ); Tue, 12 Mar 2013 00:38:29 -0400 Received: by mail-oa0-f49.google.com with SMTP id j6so5399597oag.36 for ; Mon, 11 Mar 2013 21:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=w+c5Wzj59D7zaVynFZ1JjDFaNy7AYluDpyEDcpam69E=; b=UASmO3/ei0WJCZiEdEc4CapeW6CMk9iB5bJyFx6uOhECnNlbc4T3XE35qqzILimZwJ DRKMPRORAoGdMyjqt9+cQIe/EJxr6HpuJsjaokNFbHImgqqrx/cDqTyah3+Gz3d/0GRI UiWG2lyfSuqbwICWbcTtNwPax775HK+dyRnjkmfxEHVhPiZK+fzrLYS+qRwD2IEt0ZFV G4VxMuZ1bIJYuwYOHE+b+5UsRR5jjdK/2VgHmHR6UoqsVBpLHJ6sL/N6N+ddA4GlTZYD b7t9AZEAqaaji0VZO1w2pY1kSX8XwCdukELMC3zG0fpUXi8B7qH0HJ2Xcwqp/kMVLZwe UjPA== MIME-Version: 1.0 X-Received: by 10.60.169.212 with SMTP id ag20mr10723888oec.102.1363063109338; Mon, 11 Mar 2013 21:38:29 -0700 (PDT) Received: by 10.60.37.194 with HTTP; Mon, 11 Mar 2013 21:38:29 -0700 (PDT) Date: Tue, 12 Mar 2013 12:38:29 +0800 Message-ID: Subject: [PATCH 4/4] mmc: sdhci-pltfm: remove host specific dt property parse code From: Kevin Liu To: linux-mmc@vger.kernel.org, Chris Ball , Jerry Huang , Chunhe Lan , Stephen Warren , Guennadi Liakhovetski , Sujit Reddy Thumma , Jaehoon Chung , Aaron Lu , Ulf Hansson Cc: Wei WANG , Fabio Estevam , Adrian Hunter , Philip Rakity , Shawn Guo , Johan Rudholm , Girish K S , Haijun Zhang , Zhangfei Gao , Haojian Zhuang , Chao Xie , Kevin Liu Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Move Freescale eSDHC specific dt property parse code from sdhci_get_of_property to of_get_property in its driver. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci-of-esdhc.c | 19 +++++++++++++++++++ drivers/mmc/host/sdhci-pltfm.c | 8 -------- 2 files changed, 19 insertions(+), 8 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index f32526d..7df98b0 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -230,6 +230,24 @@ static void esdhc_of_platform_init(struct sdhci_host *host) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; } +static void esdhc_of_get_property(struct sdhci_host *host) { + struct device_node *np; + + if (!host->mmc->parent || !host->mmc->parent->of_node) + return; + + np = host->mmc->parent->of_node; + + if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc")) + host->quirks |= SDHCI_QUIRK_BROKEN_DMA; + + if (of_device_is_compatible(np, "fsl,p2020-esdhc") || + of_device_is_compatible(np, "fsl,p1010-esdhc") || + of_device_is_compatible(np, "fsl,mpc8536-esdhc")) + host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; } + static struct sdhci_ops sdhci_esdhc_ops = { .read_l = esdhc_readl, .read_w = esdhc_readw, @@ -247,6 +265,7 @@ static struct sdhci_ops sdhci_esdhc_ops = { .platform_resume = esdhc_of_resume, #endif .adma_workaround = esdhci_of_adma_workaround, + .get_of_property = esdhc_of_get_property, }; static struct sdhci_pltfm_data sdhci_esdhc_pdata = { diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 6bbbff7..c17a03c 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -91,14 +91,6 @@ void sdhci_get_of_property(struct platform_device *pdev) if (of_get_property(np, "no-1-8-v", NULL)) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; - if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc")) - host->quirks |= SDHCI_QUIRK_BROKEN_DMA; - - if (of_device_is_compatible(np, "fsl,p2020-esdhc") || - of_device_is_compatible(np, "fsl,p1010-esdhc") || - of_device_is_compatible(np, "fsl,mpc8536-esdhc")) - host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; - clk = of_get_property(np, "clock-frequency", &size); if (clk && size == sizeof(*clk) && *clk) pltfm_host->clock = be32_to_cpup(clk);