linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V6 3/4] mmc: sdhci-esdhc: make the writel/readl as the general APIs
Date: Thu, 17 Mar 2011 21:55:19 +0100	[thread overview]
Message-ID: <20110317205519.GA29231@pengutronix.de> (raw)
In-Reply-To: <1300343647-15735-3-git-send-email-Hong-Xing.Zhu@freescale.com>

Hi Richard,

On Thu, Mar 17, 2011 at 02:34:06PM +0800, Richard Zhu wrote:
> Add one flag to indicate the GPIO CD/WP is enabled or not
> on imx platforms, and reuse the writel/readl as the general
> APIs for imx SOCs.
> 
> Signed-off-by: Richard Zhu <Hong-Xing.Zhu@freescale.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |   43 ++++++++++++++++++++++++++++++------
>  drivers/mmc/host/sdhci-pltfm.h     |    2 +-
>  2 files changed, 37 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 3b52485..5768e06 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -16,6 +16,7 @@
>  #include <linux/err.h>
>  #include <linux/clk.h>
>  #include <linux/gpio.h>
> +#include <linux/slab.h>
>  #include <linux/mmc/host.h>
>  #include <linux/mmc/sdhci-pltfm.h>
>  #include <mach/hardware.h>
> @@ -24,6 +25,13 @@
>  #include "sdhci-pltfm.h"
>  #include "sdhci-esdhc.h"
>  
> +#define IMX_GPIO_CD_WP			(1 << 0)

Hmm, that sounds like a macro for a gpio-number. What about
ESDHC_FLAG_GPIO_FOR_CD_WP or something like that?

> +
> +struct pltfm_imx_data {
> +	int flags;
> +	u32 mod_val;

Maybe 'scratchpad' was not the best name, but 'mod_val' seems worse to me.

Those are minor things, but there is one thing which needs respinning IMHO:
While it looks functionally OK, I'll tell you (once again) that you cast too
much. Please be careful about that in the future!

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110317/322ddb87/attachment.sig>

  reply	other threads:[~2011-03-17 20:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17  6:34 [PATCH V6 1/4] mmc: sdhci-esdhc: remove SDHCI_QUIRK_NO_CARD_NO_RESET from ESDHC_DEFAULT_QUIRKS Richard Zhu
2011-03-17  6:34 ` [PATCH V6 2/4] mmc: add the abort CMDTYE bits definition Richard Zhu
2011-03-17  6:34 ` [PATCH V6 3/4] mmc: sdhci-esdhc: make the writel/readl as the general APIs Richard Zhu
2011-03-17 20:55   ` Wolfram Sang [this message]
2011-03-18  8:00     ` Zhu Richard-R65037
2011-03-17  6:34 ` [PATCH V6 4/4] mmc: sdhci-esdhc: enable esdhc on imx53 Richard Zhu
  -- strict thread matches above, loose matches on Subject: below --
2011-03-08  2:55 [PATCH V6 1/4] mmc: sdhci-esdhc: remove SDHCI_QUIRK_NO_CARD_NO_RESET from ESDHC_DEFAULT_QUIRKS Richard Zhu
2011-03-08  2:55 ` [PATCH V6 3/4] mmc: sdhci-esdhc: make the writel/readl as the general APIs Richard Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317205519.GA29231@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).