* mmc: sdhci.h compile error
@ 2010-04-21 11:43 zhangfei gao
2010-04-25 22:28 ` Matt Fleming
0 siblings, 1 reply; 10+ messages in thread
From: zhangfei gao @ 2010-04-21 11:43 UTC (permalink / raw)
To: linux-mmc; +Cc: zhangfei.gao
Hi,
I have one compile issue about sdhci.h.
There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS,
and include header file #include "sdhci.h"
error: macro "writel" passed 3 arguments, but takes just 2
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS
static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
{
if (unlikely(host->ops->writel))
host->ops->writel(host, val, reg);
else
writel(val, host->ioaddr + reg);
}
~~
#endif
The writel is treated as macro and it is already defined in ARM.
The workaround is modify the name of ops writel.
Is there anybody also see such issue, and my platform is ARM.
Thanks
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: mmc: sdhci.h compile error 2010-04-21 11:43 mmc: sdhci.h compile error zhangfei gao @ 2010-04-25 22:28 ` Matt Fleming 2010-04-26 7:46 ` zhangfei gao 2010-04-26 10:17 ` Anton Vorontsov 0 siblings, 2 replies; 10+ messages in thread From: Matt Fleming @ 2010-04-25 22:28 UTC (permalink / raw) Cc: zhangfei.gao, linux-mmc, Anton Vorontsov, Andrew Morton On Wed, 21 Apr 2010 19:43:32 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > > There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS, > and include header file #include "sdhci.h" > error: macro "writel" passed 3 arguments, but takes just 2 > Interesting... It was Anton Vorontsov that added this code; presumably the code has never been compiled for an ARM board (or any other architecture that #define's their I/O accessors in asm/io.h). > The writel is treated as macro and it is already defined in ARM. > The workaround is modify the name of ops writel. > It would be better if all architectures declared their I/O accessors as static inline, but I'm not volunteering to touch all those headers ;-) Renaming the SDHCI ops is definitely the easiest option. Anton, do you have a problem with the attached patch to rename the SDHCI accessor functions? > Is there anybody also see such issue, and my platform is ARM. I'm curious to know why you need to set MMC_SDHCI_IO_ACCESSORS. Does your board have weird I/O memory access requirements? This option is pretty specialized. -- >From d9c3a1666ea7597c21a68e44f3b5a2de0a6932b6 Mon Sep 17 00:00:00 2001 Message-Id: <d9c3a1666ea7597c21a68e44f3b5a2de0a6932b6.1272234369.git.matt@console-pimps.org> From: Matt Fleming <matt@console-pimps.org> Date: Sun, 25 Apr 2010 23:14:34 +0100 Subject: [PATCH] sdhci: Rename SDHCI I/O accessor functions Unfortunately some architectures #define their read{b,w,l} and write{b,w,l} I/O accessors which makes the SDHCI I/O accessor functions of the same names subject to preprocessing. This leads to the following compiler error, In file included from drivers/mmc/host/sdhci.c:26: drivers/mmc/host/sdhci.h:318:35: error: macro "writel" passed 3 arguments, but takes just 2 Rename the SDHCI I/O functions so that CONFIG_MMC_SDHCI_IO_ACCESSORS can be enabled for architectures that implement their read{b,w,l} and write{b,w,l} functions with macros. Signed-off-by: Matt Fleming <matt@console-pimps.org> --- drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++------ drivers/mmc/host/sdhci-of-hlwd.c | 12 ++++++------ drivers/mmc/host/sdhci.h | 36 ++++++++++++++++++------------------ 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index d5b11a1..c8623de 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -129,12 +129,12 @@ struct sdhci_of_data sdhci_esdhc = { SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET | SDHCI_QUIRK_NO_CARD_NO_RESET, .ops = { - .readl = sdhci_be32bs_readl, - .readw = esdhc_readw, - .readb = sdhci_be32bs_readb, - .writel = sdhci_be32bs_writel, - .writew = esdhc_writew, - .writeb = esdhc_writeb, + .read_l = sdhci_be32bs_readl, + .read_w = esdhc_readw, + .read_b = sdhci_be32bs_readb, + .write_l = sdhci_be32bs_writel, + .write_w = esdhc_writew, + .write_b = esdhc_writeb, .set_clock = esdhc_set_clock, .enable_dma = esdhc_enable_dma, .get_max_clock = esdhc_get_max_clock, diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 35117f3..68ddb75 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -55,11 +55,11 @@ struct sdhci_of_data sdhci_hlwd = { .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_32BIT_DMA_SIZE, .ops = { - .readl = sdhci_be32bs_readl, - .readw = sdhci_be32bs_readw, - .readb = sdhci_be32bs_readb, - .writel = sdhci_hlwd_writel, - .writew = sdhci_hlwd_writew, - .writeb = sdhci_hlwd_writeb, + .read_l = sdhci_be32bs_readl, + .read_w = sdhci_be32bs_readw, + .read_b = sdhci_be32bs_readb, + .write_l = sdhci_hlwd_writel, + .write_w = sdhci_hlwd_writew, + .write_b = sdhci_hlwd_writeb, }, }; diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 842f46f..68de5cf 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -294,12 +294,12 @@ struct sdhci_host { struct sdhci_ops { #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS - u32 (*readl)(struct sdhci_host *host, int reg); - u16 (*readw)(struct sdhci_host *host, int reg); - u8 (*readb)(struct sdhci_host *host, int reg); - void (*writel)(struct sdhci_host *host, u32 val, int reg); - void (*writew)(struct sdhci_host *host, u16 val, int reg); - void (*writeb)(struct sdhci_host *host, u8 val, int reg); + u32 (*read_l)(struct sdhci_host *host, int reg); + u16 (*read_w)(struct sdhci_host *host, int reg); + u8 (*read_b)(struct sdhci_host *host, int reg); + void (*write_l)(struct sdhci_host *host, u32 val, int reg); + void (*write_w)(struct sdhci_host *host, u16 val, int reg); + void (*write_b)(struct sdhci_host *host, u8 val, int reg); #endif void (*set_clock)(struct sdhci_host *host, unsigned int clock); @@ -314,48 +314,48 @@ struct sdhci_ops { static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg) { - if (unlikely(host->ops->writel)) - host->ops->writel(host, val, reg); + if (unlikely(host->ops->write_l)) + host->ops->write_l(host, val, reg); else writel(val, host->ioaddr + reg); } static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg) { - if (unlikely(host->ops->writew)) - host->ops->writew(host, val, reg); + if (unlikely(host->ops->write_w)) + host->ops->write_w(host, val, reg); else writew(val, host->ioaddr + reg); } static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg) { - if (unlikely(host->ops->writeb)) - host->ops->writeb(host, val, reg); + if (unlikely(host->ops->write_b)) + host->ops->write_b(host, val, reg); else writeb(val, host->ioaddr + reg); } static inline u32 sdhci_readl(struct sdhci_host *host, int reg) { - if (unlikely(host->ops->readl)) - return host->ops->readl(host, reg); + if (unlikely(host->ops->read_l)) + return host->ops->read_l(host, reg); else return readl(host->ioaddr + reg); } static inline u16 sdhci_readw(struct sdhci_host *host, int reg) { - if (unlikely(host->ops->readw)) - return host->ops->readw(host, reg); + if (unlikely(host->ops->read_w)) + return host->ops->read_w(host, reg); else return readw(host->ioaddr + reg); } static inline u8 sdhci_readb(struct sdhci_host *host, int reg) { - if (unlikely(host->ops->readb)) - return host->ops->readb(host, reg); + if (unlikely(host->ops->read_b)) + return host->ops->read_b(host, reg); else return readb(host->ioaddr + reg); } -- 1.6.4.rc0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-25 22:28 ` Matt Fleming @ 2010-04-26 7:46 ` zhangfei gao 2010-04-26 11:18 ` Matt Fleming 2010-04-26 10:17 ` Anton Vorontsov 1 sibling, 1 reply; 10+ messages in thread From: zhangfei gao @ 2010-04-26 7:46 UTC (permalink / raw) To: Matt Fleming; +Cc: linux-mmc, Anton Vorontsov, Andrew Morton Hi, Matt We also rename the function name to pass compile. Besides, here is typo error drivers/mmc/host/sdhci.h, though it is not a big deal. Thanks From 1fbcb05dbab2e5e5de72060f0481a279fa3eda18 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao <zgao6@marvell.com> Date: Thu, 22 Apr 2010 11:25:17 +0800 Subject: [PATCH] mmc: SDHCI_INT_DATA_MASK typo error Signed-off-by: Zhangfei Gao <zgao6@marvell.com> --- drivers/mmc/host/sdhci.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 842f46f..9ba4268 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -127,7 +127,7 @@ #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ - SDHCI_INT_DATA_END_BIT | SDHCI_ADMA_ERROR) + SDHCI_INT_DATA_END_BIT | SDHCI_INT_ADMA_ERROR) #define SDHCI_INT_ALL_MASK ((unsigned int)-1) #define SDHCI_ACMD12_ERR 0x3C -- 1.6.0.4 On Mon, Apr 26, 2010 at 6:28 AM, Matt Fleming <matt@console-pimps.org> wrote: > On Wed, 21 Apr 2010 19:43:32 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: >> >> There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS, >> and include header file #include "sdhci.h" >> error: macro "writel" passed 3 arguments, but takes just 2 >> > > Interesting... > > It was Anton Vorontsov that added this code; presumably the code has > never been compiled for an ARM board (or any other architecture that > #define's their I/O accessors in asm/io.h). > >> The writel is treated as macro and it is already defined in ARM. >> The workaround is modify the name of ops writel. >> > > It would be better if all architectures declared their I/O accessors as > static inline, but I'm not volunteering to touch all those headers ;-) > Renaming the SDHCI ops is definitely the easiest option. Anton, do you > have a problem with the attached patch to rename the SDHCI accessor > functions? > >> Is there anybody also see such issue, and my platform is ARM. > > I'm curious to know why you need to set MMC_SDHCI_IO_ACCESSORS. Does > your board have weird I/O memory access requirements? This option is > pretty specialized. > The reason is HOST_VERSION is bits [08:15] of offset 0xFE, so we have to shifp >> 16 for SDHCI_HOST_VERSION > -- > > From d9c3a1666ea7597c21a68e44f3b5a2de0a6932b6 Mon Sep 17 00:00:00 2001 > Message-Id: <d9c3a1666ea7597c21a68e44f3b5a2de0a6932b6.1272234369.git.matt@console-pimps.org> > From: Matt Fleming <matt@console-pimps.org> > Date: Sun, 25 Apr 2010 23:14:34 +0100 > Subject: [PATCH] sdhci: Rename SDHCI I/O accessor functions > > Unfortunately some architectures #define their read{b,w,l} and > write{b,w,l} I/O accessors which makes the SDHCI I/O accessor functions > of the same names subject to preprocessing. This leads to the following > compiler error, > > In file included from drivers/mmc/host/sdhci.c:26: > drivers/mmc/host/sdhci.h:318:35: error: macro "writel" passed 3 arguments, but takes just 2 > > Rename the SDHCI I/O functions so that CONFIG_MMC_SDHCI_IO_ACCESSORS can > be enabled for architectures that implement their read{b,w,l} and > write{b,w,l} functions with macros. > > Signed-off-by: Matt Fleming <matt@console-pimps.org> > --- > drivers/mmc/host/sdhci-of-esdhc.c | 12 ++++++------ > drivers/mmc/host/sdhci-of-hlwd.c | 12 ++++++------ > drivers/mmc/host/sdhci.h | 36 ++++++++++++++++++------------------ > 3 files changed, 30 insertions(+), 30 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c > index d5b11a1..c8623de 100644 > --- a/drivers/mmc/host/sdhci-of-esdhc.c > +++ b/drivers/mmc/host/sdhci-of-esdhc.c > @@ -129,12 +129,12 @@ struct sdhci_of_data sdhci_esdhc = { > SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET | > SDHCI_QUIRK_NO_CARD_NO_RESET, > .ops = { > - .readl = sdhci_be32bs_readl, > - .readw = esdhc_readw, > - .readb = sdhci_be32bs_readb, > - .writel = sdhci_be32bs_writel, > - .writew = esdhc_writew, > - .writeb = esdhc_writeb, > + .read_l = sdhci_be32bs_readl, > + .read_w = esdhc_readw, > + .read_b = sdhci_be32bs_readb, > + .write_l = sdhci_be32bs_writel, > + .write_w = esdhc_writew, > + .write_b = esdhc_writeb, > .set_clock = esdhc_set_clock, > .enable_dma = esdhc_enable_dma, > .get_max_clock = esdhc_get_max_clock, > diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c > index 35117f3..68ddb75 100644 > --- a/drivers/mmc/host/sdhci-of-hlwd.c > +++ b/drivers/mmc/host/sdhci-of-hlwd.c > @@ -55,11 +55,11 @@ struct sdhci_of_data sdhci_hlwd = { > .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | > SDHCI_QUIRK_32BIT_DMA_SIZE, > .ops = { > - .readl = sdhci_be32bs_readl, > - .readw = sdhci_be32bs_readw, > - .readb = sdhci_be32bs_readb, > - .writel = sdhci_hlwd_writel, > - .writew = sdhci_hlwd_writew, > - .writeb = sdhci_hlwd_writeb, > + .read_l = sdhci_be32bs_readl, > + .read_w = sdhci_be32bs_readw, > + .read_b = sdhci_be32bs_readb, > + .write_l = sdhci_hlwd_writel, > + .write_w = sdhci_hlwd_writew, > + .write_b = sdhci_hlwd_writeb, > }, > }; > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h > index 842f46f..68de5cf 100644 > --- a/drivers/mmc/host/sdhci.h > +++ b/drivers/mmc/host/sdhci.h > @@ -294,12 +294,12 @@ struct sdhci_host { > > struct sdhci_ops { > #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS > - u32 (*readl)(struct sdhci_host *host, int reg); > - u16 (*readw)(struct sdhci_host *host, int reg); > - u8 (*readb)(struct sdhci_host *host, int reg); > - void (*writel)(struct sdhci_host *host, u32 val, int reg); > - void (*writew)(struct sdhci_host *host, u16 val, int reg); > - void (*writeb)(struct sdhci_host *host, u8 val, int reg); > + u32 (*read_l)(struct sdhci_host *host, int reg); > + u16 (*read_w)(struct sdhci_host *host, int reg); > + u8 (*read_b)(struct sdhci_host *host, int reg); > + void (*write_l)(struct sdhci_host *host, u32 val, int reg); > + void (*write_w)(struct sdhci_host *host, u16 val, int reg); > + void (*write_b)(struct sdhci_host *host, u8 val, int reg); > #endif > > void (*set_clock)(struct sdhci_host *host, unsigned int clock); > @@ -314,48 +314,48 @@ struct sdhci_ops { > > static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg) > { > - if (unlikely(host->ops->writel)) > - host->ops->writel(host, val, reg); > + if (unlikely(host->ops->write_l)) > + host->ops->write_l(host, val, reg); > else > writel(val, host->ioaddr + reg); > } > > static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg) > { > - if (unlikely(host->ops->writew)) > - host->ops->writew(host, val, reg); > + if (unlikely(host->ops->write_w)) > + host->ops->write_w(host, val, reg); > else > writew(val, host->ioaddr + reg); > } > > static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg) > { > - if (unlikely(host->ops->writeb)) > - host->ops->writeb(host, val, reg); > + if (unlikely(host->ops->write_b)) > + host->ops->write_b(host, val, reg); > else > writeb(val, host->ioaddr + reg); > } > > static inline u32 sdhci_readl(struct sdhci_host *host, int reg) > { > - if (unlikely(host->ops->readl)) > - return host->ops->readl(host, reg); > + if (unlikely(host->ops->read_l)) > + return host->ops->read_l(host, reg); > else > return readl(host->ioaddr + reg); > } > > static inline u16 sdhci_readw(struct sdhci_host *host, int reg) > { > - if (unlikely(host->ops->readw)) > - return host->ops->readw(host, reg); > + if (unlikely(host->ops->read_w)) > + return host->ops->read_w(host, reg); > else > return readw(host->ioaddr + reg); > } > > static inline u8 sdhci_readb(struct sdhci_host *host, int reg) > { > - if (unlikely(host->ops->readb)) > - return host->ops->readb(host, reg); > + if (unlikely(host->ops->read_b)) > + return host->ops->read_b(host, reg); > else > return readb(host->ioaddr + reg); > } > -- > 1.6.4.rc0 > > ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-26 7:46 ` zhangfei gao @ 2010-04-26 11:18 ` Matt Fleming 2010-04-27 3:45 ` zhangfei gao 0 siblings, 1 reply; 10+ messages in thread From: Matt Fleming @ 2010-04-26 11:18 UTC (permalink / raw) To: zhangfei gao; +Cc: linux-mmc, Anton Vorontsov, Andrew Morton On Mon, 26 Apr 2010 15:46:31 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > Hi, Matt > > We also rename the function name to pass compile. > Besides, here is typo error drivers/mmc/host/sdhci.h, though it is not > a big deal. Good catch! How did you notice that? Did you see a failure at runtime or did you spot it by reading the code? If you were seeing a bug at runtime then this patch should also be sent to stable@kernel.org. I don't have any hardware to test this patch but the change looks like it makes sense. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-26 11:18 ` Matt Fleming @ 2010-04-27 3:45 ` zhangfei gao 2010-04-27 5:53 ` Matt Fleming 0 siblings, 1 reply; 10+ messages in thread From: zhangfei gao @ 2010-04-27 3:45 UTC (permalink / raw) To: Matt Fleming; +Cc: linux-mmc, Anton Vorontsov, Andrew Morton Hi, Matt On Mon, Apr 26, 2010 at 7:18 PM, Matt Fleming <matt@console-pimps.org> wrote: > On Mon, 26 Apr 2010 15:46:31 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: >> Hi, Matt >> >> We also rename the function name to pass compile. >> Besides, here is typo error drivers/mmc/host/sdhci.h, though it is not >> a big deal. > > Good catch! How did you notice that? Did you see a failure at runtime or > did you spot it by reading the code? If you were seeing a bug at runtime > then this patch should also be sent to stable@kernel.org. > Fortunately, the typo does not impact the stability. We found the typo when debugging our silicon issue, however, nothing impove after the fix :) > I don't have any hardware to test this patch but the change looks like > it makes sense. > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-27 3:45 ` zhangfei gao @ 2010-04-27 5:53 ` Matt Fleming 2010-04-27 6:54 ` zhangfei gao 0 siblings, 1 reply; 10+ messages in thread From: Matt Fleming @ 2010-04-27 5:53 UTC (permalink / raw) To: zhangfei gao; +Cc: linux-mmc, Anton Vorontsov, Andrew Morton On Tue, 27 Apr 2010 11:45:28 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > > Fortunately, the typo does not impact the stability. > We found the typo when debugging our silicon issue, however, nothing > impove after the fix :) OK, thanks. In that case it probably doesn't need to go to -stable. You can add Reviewed-by: Matt Fleming <matt@console-pimps.org> to your patch. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-27 5:53 ` Matt Fleming @ 2010-04-27 6:54 ` zhangfei gao 0 siblings, 0 replies; 10+ messages in thread From: zhangfei gao @ 2010-04-27 6:54 UTC (permalink / raw) To: Matt Fleming; +Cc: linux-mmc, Anton Vorontsov, Andrew Morton [-- Attachment #1: Type: text/plain, Size: 1462 bytes --] Hi, Matt On Tue, Apr 27, 2010 at 1:53 PM, Matt Fleming <matt@console-pimps.org> wrote: > On Tue, 27 Apr 2010 11:45:28 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: >> >> Fortunately, the typo does not impact the stability. >> We found the typo when debugging our silicon issue, however, nothing >> impove after the fix :) > > OK, thanks. In that case it probably doesn't need to go to -stable. You > can add Reviewed-by: Matt Fleming <matt@console-pimps.org> to your > patch. > Thanks for the review, patch is updated. >From 1fbcb05dbab2e5e5de72060f0481a279fa3eda18 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao <zgao6@marvell.com> Date: Thu, 22 Apr 2010 11:25:17 +0800 Subject: [PATCH] mmc: SDHCI_INT_DATA_MASK typo error Signed-off-by: Zhangfei Gao <zgao6@marvell.com> Reviewed-by: Matt Fleming <matt@console-pimps.org> --- drivers/mmc/host/sdhci.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 842f46f..9ba4268 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -127,7 +127,7 @@ #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ - SDHCI_INT_DATA_END_BIT | SDHCI_ADMA_ERROR) + SDHCI_INT_DATA_END_BIT | SDHCI_INT_ADMA_ERROR) #define SDHCI_INT_ALL_MASK ((unsigned int)-1) #define SDHCI_ACMD12_ERR 0x3C -- 1.6.0.4 [-- Attachment #2: 0001-mmc-SDHCI_INT_DATA_MASK-typo-error.patch --] [-- Type: application/octet-stream, Size: 935 bytes --] From 1fbcb05dbab2e5e5de72060f0481a279fa3eda18 Mon Sep 17 00:00:00 2001 From: Zhangfei Gao <zgao6@marvell.com> Date: Thu, 22 Apr 2010 11:25:17 +0800 Subject: [PATCH] mmc: SDHCI_INT_DATA_MASK typo error Signed-off-by: Zhangfei Gao <zgao6@marvell.com> Reviewed-by: Matt Fleming <matt@console-pimps.org> --- drivers/mmc/host/sdhci.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 842f46f..9ba4268 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -127,7 +127,7 @@ #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ - SDHCI_INT_DATA_END_BIT | SDHCI_ADMA_ERROR) + SDHCI_INT_DATA_END_BIT | SDHCI_INT_ADMA_ERROR) #define SDHCI_INT_ALL_MASK ((unsigned int)-1) #define SDHCI_ACMD12_ERR 0x3C -- 1.6.0.4 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-25 22:28 ` Matt Fleming 2010-04-26 7:46 ` zhangfei gao @ 2010-04-26 10:17 ` Anton Vorontsov 2010-04-29 22:28 ` Andrew Morton 1 sibling, 1 reply; 10+ messages in thread From: Anton Vorontsov @ 2010-04-26 10:17 UTC (permalink / raw) To: Matt Fleming; +Cc: zhangfei gao, linux-mmc, Andrew Morton On Sun, Apr 25, 2010 at 11:28:17PM +0100, Matt Fleming wrote: > On Wed, 21 Apr 2010 19:43:32 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > > > > There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS, > > and include header file #include "sdhci.h" > > error: macro "writel" passed 3 arguments, but takes just 2 > > > > Interesting... > > It was Anton Vorontsov that added this code; presumably the code has > never been compiled for an ARM board (or any other architecture that > #define's their I/O accessors in asm/io.h). Yep, there wasn't any need for these accessors on other platforms. > It would be better if all architectures declared their I/O accessors as > static inline, but I'm not volunteering to touch all those headers ;-) > Renaming the SDHCI ops is definitely the easiest option. Anton, do you > have a problem with the attached patch to rename the SDHCI accessor > functions? Looks OK. Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> (for -next, I presume) Thanks! -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-26 10:17 ` Anton Vorontsov @ 2010-04-29 22:28 ` Andrew Morton 2010-04-30 5:30 ` Anton Vorontsov 0 siblings, 1 reply; 10+ messages in thread From: Andrew Morton @ 2010-04-29 22:28 UTC (permalink / raw) To: Anton Vorontsov; +Cc: Matt Fleming, zhangfei gao, linux-mmc On Mon, 26 Apr 2010 14:17:04 +0400 Anton Vorontsov <cbouatmailru@gmail.com> wrote: > On Sun, Apr 25, 2010 at 11:28:17PM +0100, Matt Fleming wrote: > > On Wed, 21 Apr 2010 19:43:32 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > > > > > > There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS, > > > and include header file #include "sdhci.h" > > > error: macro "writel" passed 3 arguments, but takes just 2 > > > > > > > Interesting... > > > > It was Anton Vorontsov that added this code; presumably the code has > > never been compiled for an ARM board (or any other architecture that > > #define's their I/O accessors in asm/io.h). > > Yep, there wasn't any need for these accessors on other platforms. > > > It would be better if all architectures declared their I/O accessors as > > static inline, but I'm not volunteering to touch all those headers ;-) > > Renaming the SDHCI ops is definitely the easiest option. Anton, do you > > have a problem with the attached patch to rename the SDHCI accessor > > functions? > > Looks OK. > > Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> > (for -next, I presume) Why not for 2.6.34? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mmc: sdhci.h compile error 2010-04-29 22:28 ` Andrew Morton @ 2010-04-30 5:30 ` Anton Vorontsov 0 siblings, 0 replies; 10+ messages in thread From: Anton Vorontsov @ 2010-04-30 5:30 UTC (permalink / raw) To: Andrew Morton; +Cc: Matt Fleming, zhangfei gao, linux-mmc On Thu, Apr 29, 2010 at 03:28:56PM -0700, Andrew Morton wrote: > On Mon, 26 Apr 2010 14:17:04 +0400 > Anton Vorontsov <cbouatmailru@gmail.com> wrote: > > > On Sun, Apr 25, 2010 at 11:28:17PM +0100, Matt Fleming wrote: > > > On Wed, 21 Apr 2010 19:43:32 +0800, zhangfei gao <zhangfei.gao@gmail.com> wrote: > > > > > > > > There is compile error when we enable CONFIG_MMC_SDHCI_IO_ACCESSORS, > > > > and include header file #include "sdhci.h" > > > > error: macro "writel" passed 3 arguments, but takes just 2 > > > > > > > > > > Interesting... > > > > > > It was Anton Vorontsov that added this code; presumably the code has > > > never been compiled for an ARM board (or any other architecture that > > > #define's their I/O accessors in asm/io.h). > > > > Yep, there wasn't any need for these accessors on other platforms. > > > > > It would be better if all architectures declared their I/O accessors as > > > static inline, but I'm not volunteering to touch all those headers ;-) > > > Renaming the SDHCI ops is definitely the easiest option. Anton, do you > > > have a problem with the attached patch to rename the SDHCI accessor > > > functions? > > > > Looks OK. > > > > Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> > > (for -next, I presume) > > Why not for 2.6.34? Because in 2.6.34 there are only PowerPC-specific drivers select SDHCI_IO_ACCESORS, and for PowerPC there is no problem with {write,read}{l,w,b} names. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-04-30 17:08 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-04-21 11:43 mmc: sdhci.h compile error zhangfei gao 2010-04-25 22:28 ` Matt Fleming 2010-04-26 7:46 ` zhangfei gao 2010-04-26 11:18 ` Matt Fleming 2010-04-27 3:45 ` zhangfei gao 2010-04-27 5:53 ` Matt Fleming 2010-04-27 6:54 ` zhangfei gao 2010-04-26 10:17 ` Anton Vorontsov 2010-04-29 22:28 ` Andrew Morton 2010-04-30 5:30 ` Anton Vorontsov
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).