Skip to content

Commit 8204536

Browse files
hexagonal-sundedekind
authored andcommitted
mtd: nand/gpio: use io{read,write}*_rep accessors
The {read,write}s{b,w,l} operations are not defined by all architectures and are being removed from the asm-generic/io.h interface. This patch replaces the usage of these string functions in the mtd gpio accessors with io{read,write}{8,16,32}_rep calls instead. Signed-off-by: Matthew Leach <matthew@mattleach.net> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 031da73 commit 8204536

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/mtd/nand/gpio.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ static void gpio_nand_writebuf(struct mtd_info *mtd, const u_char *buf, int len)
9090
{
9191
struct nand_chip *this = mtd->priv;
9292

93-
writesb(this->IO_ADDR_W, buf, len);
93+
iowrite8_rep(this->IO_ADDR_W, buf, len);
9494
}
9595

9696
static void gpio_nand_readbuf(struct mtd_info *mtd, u_char *buf, int len)
9797
{
9898
struct nand_chip *this = mtd->priv;
9999

100-
readsb(this->IO_ADDR_R, buf, len);
100+
ioread8_rep(this->IO_ADDR_R, buf, len);
101101
}
102102

103103
static void gpio_nand_writebuf16(struct mtd_info *mtd, const u_char *buf,
@@ -106,7 +106,7 @@ static void gpio_nand_writebuf16(struct mtd_info *mtd, const u_char *buf,
106106
struct nand_chip *this = mtd->priv;
107107

108108
if (IS_ALIGNED((unsigned long)buf, 2)) {
109-
writesw(this->IO_ADDR_W, buf, len>>1);
109+
iowrite16_rep(this->IO_ADDR_W, buf, len>>1);
110110
} else {
111111
int i;
112112
unsigned short *ptr = (unsigned short *)buf;
@@ -121,7 +121,7 @@ static void gpio_nand_readbuf16(struct mtd_info *mtd, u_char *buf, int len)
121121
struct nand_chip *this = mtd->priv;
122122

123123
if (IS_ALIGNED((unsigned long)buf, 2)) {
124-
readsw(this->IO_ADDR_R, buf, len>>1);
124+
ioread16_rep(this->IO_ADDR_R, buf, len>>1);
125125
} else {
126126
int i;
127127
unsigned short *ptr = (unsigned short *)buf;

0 commit comments

Comments
 (0)