From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Roy Zang <tie-fei.zang@freescale.com>
Cc: linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
akpm@linux-foundation.org, Xu lei <B33228@freescale.com>,
Kumar Gala <galak@kernel.crashing.org>
Subject: Re: [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit
Date: Fri, 9 Sep 2011 18:07:01 +0400 [thread overview]
Message-ID: <20110909140701.GA9258@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1315569946-21386-1-git-send-email-tie-fei.zang@freescale.com>
On Fri, Sep 09, 2011 at 08:05:46PM +0800, Roy Zang wrote:
> From: Xu lei <B33228@freescale.com>
>
> Freescale eSDHC registers only support 32-bit accesses,
> this patch ensures that all Freescale eSDHC register accesses
> are 32-bit.
>
> Signed-off-by: Xu lei <B33228@freescale.com>
> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
The patch looks OK.
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
[...]
> +static u8 esdhc_readb(struct sdhci_host *host, int reg)
> +{
> + int base = reg & ~0x3;
> + int shift = (reg & 0x3) * 8;
> + u8 ret = (in_be32(host->ioaddr + base) >> shift) & 0xff;
> return ret;
> }
Though, I wonder if we could change sdhci_be32bs_read{b,w}, instead
of making this local to eSDHC.
The thing is: sdhci_be32bs_writeb() is using clrsetbits_be32,
so the write variant already uses 32-bit accessors, so nothing should
break if we switch sdhci_be32bs_readb() to in_be32().
But maybe it's safer if we do this in a separate patch, so that it
could be easily reverted without impacting eSDHC if something actually
breaks.
You decide. :-)
Thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
WARNING: multiple messages have this Message-ID (diff)
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Roy Zang <tie-fei.zang@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org,
linux-mmc@vger.kernel.org, Xu lei <B33228@freescale.com>
Subject: Re: [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit
Date: Fri, 9 Sep 2011 18:07:01 +0400 [thread overview]
Message-ID: <20110909140701.GA9258@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1315569946-21386-1-git-send-email-tie-fei.zang@freescale.com>
On Fri, Sep 09, 2011 at 08:05:46PM +0800, Roy Zang wrote:
> From: Xu lei <B33228@freescale.com>
>
> Freescale eSDHC registers only support 32-bit accesses,
> this patch ensures that all Freescale eSDHC register accesses
> are 32-bit.
>
> Signed-off-by: Xu lei <B33228@freescale.com>
> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
The patch looks OK.
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
[...]
> +static u8 esdhc_readb(struct sdhci_host *host, int reg)
> +{
> + int base = reg & ~0x3;
> + int shift = (reg & 0x3) * 8;
> + u8 ret = (in_be32(host->ioaddr + base) >> shift) & 0xff;
> return ret;
> }
Though, I wonder if we could change sdhci_be32bs_read{b,w}, instead
of making this local to eSDHC.
The thing is: sdhci_be32bs_writeb() is using clrsetbits_be32,
so the write variant already uses 32-bit accessors, so nothing should
break if we switch sdhci_be32bs_readb() to in_be32().
But maybe it's safer if we do this in a separate patch, so that it
could be easily reverted without impacting eSDHC if something actually
breaks.
You decide. :-)
Thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
next prev parent reply other threads:[~2011-09-09 14:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 12:05 [PATCH] eSDHC: Access Freescale eSDHC registers by 32-bit Roy Zang
2011-09-09 12:05 ` Roy Zang
2011-09-09 11:40 ` Wolfram Sang
2011-09-09 11:40 ` Wolfram Sang
2011-09-09 12:16 ` Zang Roy-R61911
2011-09-09 12:16 ` Zang Roy-R61911
2011-09-09 12:23 ` Zang Roy-R61911
2011-09-09 12:23 ` Zang Roy-R61911
2011-09-09 12:33 ` Wolfram Sang
2011-09-09 12:33 ` Wolfram Sang
2011-09-09 12:48 ` Zang Roy-R61911
2011-09-09 12:48 ` Zang Roy-R61911
2011-09-09 13:08 ` Wolfram Sang
2011-09-09 13:08 ` Wolfram Sang
2011-09-13 4:10 ` Zang Roy-R61911
2011-09-13 4:10 ` Zang Roy-R61911
2011-09-09 14:07 ` Anton Vorontsov [this message]
2011-09-09 14:07 ` Anton Vorontsov
2011-09-09 16:00 ` Zang Roy-R61911
2011-09-09 16:00 ` Zang Roy-R61911
2011-09-21 17:53 ` Chris Ball
2011-09-21 17:53 ` Chris Ball
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=20110909140701.GA9258@oksana.dev.rtsoft.ru \
--to=cbouatmailru@gmail.com \
--cc=B33228@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=galak@kernel.crashing.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tie-fei.zang@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.