* linux-next: mtd tree build failure
@ 2008-10-20 5:35 Stephen Rothwell
2008-10-20 7:24 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2008-10-20 5:35 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-next, Mike Rapoport, Russell King
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
Hi David,
Today's linux-next build (x86_64 allmodconfig) failed like this:
drivers/mtd/nand/gpio.c: In function 'gpio_nand_writebuf':
drivers/mtd/nand/gpio.c:90: error: implicit declaration of function 'writesb'
drivers/mtd/nand/gpio.c: In function 'gpio_nand_readbuf':
drivers/mtd/nand/gpio.c:97: error: implicit declaration of function 'readsb'
drivers/mtd/nand/gpio.c: In function 'gpio_nand_writebuf16':
drivers/mtd/nand/gpio.c:123: error: implicit declaration of function 'writesw'
drivers/mtd/nand/gpio.c: In function 'gpio_nand_readbuf16':
drivers/mtd/nand/gpio.c:138: error: implicit declaration of function 'readsw'
Caused by commit aaf7ea20000436df3cbb397ccb734ad1e2e5164d ("[MTD] [NAND]
GPIO NAND flash driver"). I assume this needs to depend on some
architecture/platform so I reverted it for now.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: mtd tree build failure
2008-10-20 5:35 linux-next: mtd tree build failure Stephen Rothwell
@ 2008-10-20 7:24 ` David Woodhouse
2008-10-20 8:33 ` Mike Rapoport
0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2008-10-20 7:24 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, Mike Rapoport, Russell King
On Mon, 2008-10-20 at 16:35 +1100, Stephen Rothwell wrote:
> Caused by commit aaf7ea20000436df3cbb397ccb734ad1e2e5164d ("[MTD]
> [NAND] GPIO NAND flash driver"). I assume this needs to depend on
> some architecture/platform so I reverted it for now.
Hm, indeed. I thought it _did_ depend on ARM -- did I apply the wrong
version of the patch?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: mtd tree build failure
2008-10-20 7:24 ` David Woodhouse
@ 2008-10-20 8:33 ` Mike Rapoport
2008-10-20 8:48 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2008-10-20 8:33 UTC (permalink / raw)
To: David Woodhouse; +Cc: Stephen Rothwell, linux-next, Russell King
David Woodhouse wrote:
> On Mon, 2008-10-20 at 16:35 +1100, Stephen Rothwell wrote:
>> Caused by commit aaf7ea20000436df3cbb397ccb734ad1e2e5164d ("[MTD]
>> [NAND] GPIO NAND flash driver"). I assume this needs to depend on
>> some architecture/platform so I reverted it for now.
>
> Hm, indeed. I thought it _did_ depend on ARM -- did I apply the wrong
> version of the patch?
>
You applied the correct version of the patch. It did depend on ARM at the
beginning, but after discussion it was decided to make it generic so that other
architecture would be able to use it. I just haven't thought that readsw/writesw
might be not available on all architectures.
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: mtd tree build failure
2008-10-20 8:33 ` Mike Rapoport
@ 2008-10-20 8:48 ` David Woodhouse
2008-11-16 7:39 ` [PATCH] MTD: NAND: make gpio_nand use io{read,write}{8,16}_rep (was: Re: linux-next: mtd tree build failure) Mike Rapoport
0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2008-10-20 8:48 UTC (permalink / raw)
To: Mike Rapoport; +Cc: Stephen Rothwell, linux-next, Russell King
On Mon, 2008-10-20 at 10:33 +0200, Mike Rapoport wrote:
> You applied the correct version of the patch. It did depend on ARM at the
> beginning, but after discussion it was decided to make it generic so that other
> architecture would be able to use it. I just haven't thought that readsw/writesw
> might be not available on all architectures.
I've made it depend on ARM again for now. For 2.6.29, let's look at
making use ioread8_rep().
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] MTD: NAND: make gpio_nand use io{read,write}{8,16}_rep (was: Re: linux-next: mtd tree build failure)
2008-10-20 8:48 ` David Woodhouse
@ 2008-11-16 7:39 ` Mike Rapoport
0 siblings, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2008-11-16 7:39 UTC (permalink / raw)
To: David Woodhouse; +Cc: Stephen Rothwell, linux-next, Russell King
David Woodhouse wrote:
> On Mon, 2008-10-20 at 10:33 +0200, Mike Rapoport wrote:
>> You applied the correct version of the patch. It did depend on ARM at the
>> beginning, but after discussion it was decided to make it generic so that other
>> architecture would be able to use it. I just haven't thought that readsw/writesw
>> might be not available on all architectures.
>
> I've made it depend on ARM again for now. For 2.6.29, let's look at
> making use ioread8_rep().
The below patch makes GPIO NAND use io{read,write}{8,16}_rep to allow
architectures other than ARM use the driver.
I've build-tested it for x86_64 with allmodconfig and for powerpc with
ep8248e_defconfig and manually enabled GPIO NAND driver.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
drivers/mtd/nand/Kconfig | 2 +-
drivers/mtd/nand/gpio.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 1c2e945..b9eed99 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -58,7 +58,7 @@ config MTD_NAND_H1900
config MTD_NAND_GPIO
tristate "GPIO NAND Flash driver"
- depends on GENERIC_GPIO && ARM
+ depends on GENERIC_GPIO
help
This enables a GPIO based NAND flash driver.
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
index 8f902e7..c9f26fa 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/gpio.c
@@ -87,14 +87,14 @@ static void gpio_nand_writebuf(struct mtd_info *mtd, const
u_char *buf, int len)
{
struct nand_chip *this = mtd->priv;
- writesb(this->IO_ADDR_W, buf, len);
+ iowrite8_rep(this->IO_ADDR_W, buf, len);
}
static void gpio_nand_readbuf(struct mtd_info *mtd, u_char *buf, int len)
{
struct nand_chip *this = mtd->priv;
- readsb(this->IO_ADDR_R, buf, len);
+ ioread8_rep(this->IO_ADDR_R, buf, len);
}
static int gpio_nand_verifybuf(struct mtd_info *mtd, const u_char *buf, int len)
@@ -104,7 +104,7 @@ static int gpio_nand_verifybuf(struct mtd_info *mtd, const
u_char *buf, int len)
int i, err = 0;
for (i = 0; i < len; i++) {
- read = readb(this->IO_ADDR_R);
+ read = ioread8(this->IO_ADDR_R);
if (read != p[i]) {
pr_debug("%s: err at %d (read %04x vs %04x)\n",
__func__, i, read, p[i]);
@@ -120,13 +120,13 @@ static void gpio_nand_writebuf16(struct mtd_info *mtd,
const u_char *buf,
struct nand_chip *this = mtd->priv;
if (IS_ALIGNED((unsigned long)buf, 2)) {
- writesw(this->IO_ADDR_W, buf, len>>1);
+ iowrite16_rep(this->IO_ADDR_W, buf, len>>1);
} else {
int i;
unsigned short *ptr = (unsigned short *)buf;
for (i = 0; i < len; i += 2, ptr++)
- writew(*ptr, this->IO_ADDR_W);
+ iowrite16(*ptr, this->IO_ADDR_W);
}
}
@@ -135,13 +135,13 @@ static void gpio_nand_readbuf16(struct mtd_info *mtd,
u_char *buf, int len)
struct nand_chip *this = mtd->priv;
if (IS_ALIGNED((unsigned long)buf, 2)) {
- readsw(this->IO_ADDR_R, buf, len>>1);
+ ioread16_rep(this->IO_ADDR_R, buf, len>>1);
} else {
int i;
unsigned short *ptr = (unsigned short *)buf;
for (i = 0; i < len; i += 2, ptr++)
- *ptr = readw(this->IO_ADDR_R);
+ *ptr = ioread16(this->IO_ADDR_R);
}
}
@@ -154,7 +154,7 @@ static int gpio_nand_verifybuf16(struct mtd_info *mtd, const
u_char *buf,
len >>= 1;
for (i = 0; i < len; i++) {
- read = readw(this->IO_ADDR_R);
+ read = ioread16(this->IO_ADDR_R);
if (read != p[i]) {
pr_debug("%s: err at %d (read %04x vs %04x)\n",
__func__, i, read, p[i]);
--
1.5.6.4
--
Sincerely yours,
Mike.
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-16 7:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-20 5:35 linux-next: mtd tree build failure Stephen Rothwell
2008-10-20 7:24 ` David Woodhouse
2008-10-20 8:33 ` Mike Rapoport
2008-10-20 8:48 ` David Woodhouse
2008-11-16 7:39 ` [PATCH] MTD: NAND: make gpio_nand use io{read,write}{8,16}_rep (was: Re: linux-next: mtd tree build failure) Mike Rapoport
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).