From patchwork Mon Sep 6 10:34:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 177972 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Mon, 06 Sep 2010 11:35:03 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1OsZ2V-00082E-1B for chris@printf.net; Mon, 06 Sep 2010 11:35:03 +0100 Received: by mail.laptop.org (Postfix) id 77E8A2417B; Mon, 6 Sep 2010 06:34:42 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id F275C24179 for ; Mon, 6 Sep 2010 06:34:40 -0400 (EDT) X-ASG-Debug-ID: 1283769297-0b74e5540002-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id RrqgEogspew05VGb for ; Mon, 06 Sep 2010 06:34:58 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753012Ab0IFKe5 (ORCPT ); Mon, 6 Sep 2010 06:34:57 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:51024 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788Ab0IFKe4 (ORCPT ); Mon, 6 Sep 2010 06:34:56 -0400 Received: from [2001:6f8:1178:2:221:70ff:fe71:1890] (helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1OsZ2N-0004ik-QF; Mon, 06 Sep 2010 12:34:55 +0200 From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Zhu Richard-R65037 , Wolfram Sang X-ASG-Orig-Subj: [RFC 1/3] sdhci-pltfm: Add structure for host-specific data Subject: [RFC 1/3] sdhci-pltfm: Add structure for host-specific data Date: Mon, 6 Sep 2010 12:34:23 +0200 Message-Id: <1283769265-14147-2-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1283769265-14147-1-git-send-email-w.sang@pengutronix.de> References: <1283769265-14147-1-git-send-email-w.sang@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:221:70ff:fe71:1890 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1283769298 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.40082 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index e045e3c..bf522a1 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -55,6 +55,7 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) struct sdhci_pltfm_data *pdata = pdev->dev.platform_data; const struct platform_device_id *platid = platform_get_device_id(pdev); struct sdhci_host *host; + struct sdhci_pltfm_host *pltfm_host; struct resource *iomem; int ret; @@ -72,15 +73,17 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) "experience problems.\n"); if (pdev->dev.parent) - host = sdhci_alloc_host(pdev->dev.parent, 0); + host = sdhci_alloc_host(pdev->dev.parent, sizeof(*pltfm_host)); else - host = sdhci_alloc_host(&pdev->dev, 0); + host = sdhci_alloc_host(&pdev->dev, sizeof(*pltfm_host)); if (IS_ERR(host)) { ret = PTR_ERR(host); goto err; } + pltfm_host = sdhci_priv(host); + host->hw_name = "platform"; if (pdata && pdata->ops) host->ops = pdata->ops; diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 900f329..c393289 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -13,6 +13,11 @@ #include +struct sdhci_pltfm_host { + struct clk *clk; + u32 scratchpad; /* to handle quirks across io-accessor calls */ +}; + extern struct sdhci_pltfm_data sdhci_cns3xxx_pdata; #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */