Commit bf42a88a authored by David Woodhouse's avatar David Woodhouse

MTD map/device driver cleanups -- remove bogus __iomem casts

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 08adca1b
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2000.c,v 1.62 2004/08/09 14:04:02 dwmw2 Exp $ * $Id: doc2000.c,v 1.63 2004/09/16 23:51:56 gleixner Exp $
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -89,7 +89,7 @@ static void DoC_Delay(struct DiskOnChip *doc, unsigned short cycles) ...@@ -89,7 +89,7 @@ static void DoC_Delay(struct DiskOnChip *doc, unsigned short cycles)
/* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */
static int _DoC_WaitReady(struct DiskOnChip *doc) static int _DoC_WaitReady(struct DiskOnChip *doc)
{ {
unsigned long docptr = doc->virtadr; void __iomem *docptr = doc->virtadr;
unsigned long timeo = jiffies + (HZ * 10); unsigned long timeo = jiffies + (HZ * 10);
DEBUG(MTD_DEBUG_LEVEL3, DEBUG(MTD_DEBUG_LEVEL3,
...@@ -114,7 +114,8 @@ static int _DoC_WaitReady(struct DiskOnChip *doc) ...@@ -114,7 +114,8 @@ static int _DoC_WaitReady(struct DiskOnChip *doc)
static inline int DoC_WaitReady(struct DiskOnChip *doc) static inline int DoC_WaitReady(struct DiskOnChip *doc)
{ {
unsigned long docptr = doc->virtadr; void __iomem *docptr = doc->virtadr;
/* This is inline, to optimise the common case, where it's ready instantly */ /* This is inline, to optimise the common case, where it's ready instantly */
int ret = 0; int ret = 0;
...@@ -140,7 +141,7 @@ static inline int DoC_WaitReady(struct DiskOnChip *doc) ...@@ -140,7 +141,7 @@ static inline int DoC_WaitReady(struct DiskOnChip *doc)
static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command, static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command,
unsigned char xtraflags) unsigned char xtraflags)
{ {
unsigned long docptr = doc->virtadr; void __iomem *docptr = doc->virtadr;
if (DoC_is_2000(doc)) if (DoC_is_2000(doc))
xtraflags |= CDSN_CTRL_FLASH_IO; xtraflags |= CDSN_CTRL_FLASH_IO;
...@@ -172,10 +173,8 @@ static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command, ...@@ -172,10 +173,8 @@ static inline int DoC_Command(struct DiskOnChip *doc, unsigned char command,
static int DoC_Address(struct DiskOnChip *doc, int numbytes, unsigned long ofs, static int DoC_Address(struct DiskOnChip *doc, int numbytes, unsigned long ofs,
unsigned char xtraflags1, unsigned char xtraflags2) unsigned char xtraflags1, unsigned char xtraflags2)
{ {
unsigned long docptr;
int i; int i;
void __iomem *docptr = doc->virtadr;
docptr = doc->virtadr;
if (DoC_is_2000(doc)) if (DoC_is_2000(doc))
xtraflags1 |= CDSN_CTRL_FLASH_IO; xtraflags1 |= CDSN_CTRL_FLASH_IO;
...@@ -240,11 +239,9 @@ static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len) ...@@ -240,11 +239,9 @@ static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len)
{ {
volatile int dummy; volatile int dummy;
int modulus = 0xffff; int modulus = 0xffff;
unsigned long docptr; void __iomem *docptr = doc->virtadr;
int i; int i;
docptr = doc->virtadr;
if (len <= 0) if (len <= 0)
return; return;
...@@ -271,11 +268,9 @@ static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len) ...@@ -271,11 +268,9 @@ static void DoC_ReadBuf(struct DiskOnChip *doc, u_char * buf, int len)
/* Write a buffer to DoC, taking care of Millennium odditys */ /* Write a buffer to DoC, taking care of Millennium odditys */
static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len) static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len)
{ {
unsigned long docptr; void __iomem *docptr = doc->virtadr;
int i; int i;
docptr = doc->virtadr;
if (len <= 0) if (len <= 0)
return; return;
...@@ -292,7 +287,7 @@ static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len) ...@@ -292,7 +287,7 @@ static void DoC_WriteBuf(struct DiskOnChip *doc, const u_char * buf, int len)
static inline int DoC_SelectChip(struct DiskOnChip *doc, int chip) static inline int DoC_SelectChip(struct DiskOnChip *doc, int chip)
{ {
unsigned long docptr = doc->virtadr; void __iomem *docptr = doc->virtadr;
/* Software requirement 11.4.4 before writing DeviceSelect */ /* Software requirement 11.4.4 before writing DeviceSelect */
/* Deassert the CE line to eliminate glitches on the FCE# outputs */ /* Deassert the CE line to eliminate glitches on the FCE# outputs */
...@@ -316,7 +311,7 @@ static inline int DoC_SelectChip(struct DiskOnChip *doc, int chip) ...@@ -316,7 +311,7 @@ static inline int DoC_SelectChip(struct DiskOnChip *doc, int chip)
static inline int DoC_SelectFloor(struct DiskOnChip *doc, int floor) static inline int DoC_SelectFloor(struct DiskOnChip *doc, int floor)
{ {
unsigned long docptr = doc->virtadr; void __iomem *docptr = doc->virtadr;
/* Select the floor (bank) of chips required */ /* Select the floor (bank) of chips required */
WriteDOC(floor, docptr, FloorSelect); WriteDOC(floor, docptr, FloorSelect);
...@@ -639,15 +634,13 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -639,15 +634,13 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel) size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
unsigned long docptr; void __iomem *docptr = this->virtadr;
struct Nand *mychip; struct Nand *mychip;
unsigned char syndrome[6]; unsigned char syndrome[6];
volatile char dummy; volatile char dummy;
int i, len256 = 0, ret=0; int i, len256 = 0, ret=0;
size_t left = len; size_t left = len;
docptr = this->virtadr;
/* Don't allow read past end of device */ /* Don't allow read past end of device */
if (from >= this->totlen) if (from >= this->totlen)
return -EINVAL; return -EINVAL;
...@@ -799,15 +792,13 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -799,15 +792,13 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */ int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */
unsigned long docptr; void __iomem *docptr = this->virtadr;
volatile char dummy; volatile char dummy;
int len256 = 0; int len256 = 0;
struct Nand *mychip; struct Nand *mychip;
size_t left = len; size_t left = len;
int status; int status;
docptr = this->virtadr;
/* Don't allow write past end of device */ /* Don't allow write past end of device */
if (to >= this->totlen) if (to >= this->totlen)
return -EINVAL; return -EINVAL;
...@@ -1044,13 +1035,10 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1044,13 +1035,10 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
int len256 = 0, ret; int len256 = 0, ret;
unsigned long docptr;
struct Nand *mychip; struct Nand *mychip;
down(&this->lock); down(&this->lock);
docptr = this->virtadr;
mychip = &this->chips[ofs >> this->chipshift]; mychip = &this->chips[ofs >> this->chipshift];
if (this->curfloor != mychip->floor) { if (this->curfloor != mychip->floor) {
...@@ -1105,7 +1093,7 @@ static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1105,7 +1093,7 @@ static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len,
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv;
int len256 = 0; int len256 = 0;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
volatile int dummy; volatile int dummy;
int status; int status;
...@@ -1222,7 +1210,7 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -1222,7 +1210,7 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
volatile int dummy; volatile int dummy;
unsigned long docptr; void __iomem *docptr = this->virtadr;
struct Nand *mychip; struct Nand *mychip;
int status; int status;
...@@ -1235,8 +1223,6 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -1235,8 +1223,6 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
instr->state = MTD_ERASING; instr->state = MTD_ERASING;
docptr = this->virtadr;
/* FIXME: Do this in the background. Use timers or schedule_task() */ /* FIXME: Do this in the background. Use timers or schedule_task() */
while(len) { while(len) {
mychip = &this->chips[ofs >> this->chipshift]; mychip = &this->chips[ofs >> this->chipshift];
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2001.c,v 1.44 2004/08/09 14:04:24 dwmw2 Exp $ * $Id: doc2001.c,v 1.45 2004/09/16 23:51:57 gleixner Exp $
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -52,7 +52,7 @@ static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); ...@@ -52,7 +52,7 @@ static int doc_erase (struct mtd_info *mtd, struct erase_info *instr);
static struct mtd_info *docmillist = NULL; static struct mtd_info *docmillist = NULL;
/* Perform the required delay cycles by reading from the NOP register */ /* Perform the required delay cycles by reading from the NOP register */
static void DoC_Delay(unsigned long docptr, unsigned short cycles) static void DoC_Delay(void __iomem * docptr, unsigned short cycles)
{ {
volatile char dummy; volatile char dummy;
int i; int i;
...@@ -62,7 +62,7 @@ static void DoC_Delay(unsigned long docptr, unsigned short cycles) ...@@ -62,7 +62,7 @@ static void DoC_Delay(unsigned long docptr, unsigned short cycles)
} }
/* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */
static int _DoC_WaitReady(unsigned long docptr) static int _DoC_WaitReady(void __iomem * docptr)
{ {
unsigned short c = 0xffff; unsigned short c = 0xffff;
...@@ -79,7 +79,7 @@ static int _DoC_WaitReady(unsigned long docptr) ...@@ -79,7 +79,7 @@ static int _DoC_WaitReady(unsigned long docptr)
return (c == 0); return (c == 0);
} }
static inline int DoC_WaitReady(unsigned long docptr) static inline int DoC_WaitReady(void __iomem * docptr)
{ {
/* This is inline, to optimise the common case, where it's ready instantly */ /* This is inline, to optimise the common case, where it's ready instantly */
int ret = 0; int ret = 0;
...@@ -103,7 +103,7 @@ static inline int DoC_WaitReady(unsigned long docptr) ...@@ -103,7 +103,7 @@ static inline int DoC_WaitReady(unsigned long docptr)
with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is
required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */ required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */
static inline void DoC_Command(unsigned long docptr, unsigned char command, static inline void DoC_Command(void __iomem * docptr, unsigned char command,
unsigned char xtraflags) unsigned char xtraflags)
{ {
/* Assert the CLE (Command Latch Enable) line to the flash chip */ /* Assert the CLE (Command Latch Enable) line to the flash chip */
...@@ -123,7 +123,7 @@ static inline void DoC_Command(unsigned long docptr, unsigned char command, ...@@ -123,7 +123,7 @@ static inline void DoC_Command(unsigned long docptr, unsigned char command,
with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is with the internal pipeline. Each of 4 delay cycles (read from the NOP register) is
required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */ required after writing to CDSN Control register, see Software Requirement 11.4 item 3. */
static inline void DoC_Address(unsigned long docptr, int numbytes, unsigned long ofs, static inline void DoC_Address(void __iomem * docptr, int numbytes, unsigned long ofs,
unsigned char xtraflags1, unsigned char xtraflags2) unsigned char xtraflags1, unsigned char xtraflags2)
{ {
/* Assert the ALE (Address Latch Enable) line to the flash chip */ /* Assert the ALE (Address Latch Enable) line to the flash chip */
...@@ -161,7 +161,7 @@ static inline void DoC_Address(unsigned long docptr, int numbytes, unsigned long ...@@ -161,7 +161,7 @@ static inline void DoC_Address(unsigned long docptr, int numbytes, unsigned long
} }
/* DoC_SelectChip: Select a given flash chip within the current floor */ /* DoC_SelectChip: Select a given flash chip within the current floor */
static int DoC_SelectChip(unsigned long docptr, int chip) static int DoC_SelectChip(void __iomem * docptr, int chip)
{ {
/* Select the individual flash chip requested */ /* Select the individual flash chip requested */
WriteDOC(chip, docptr, CDSNDeviceSelect); WriteDOC(chip, docptr, CDSNDeviceSelect);
...@@ -172,7 +172,7 @@ static int DoC_SelectChip(unsigned long docptr, int chip) ...@@ -172,7 +172,7 @@ static int DoC_SelectChip(unsigned long docptr, int chip)
} }
/* DoC_SelectFloor: Select a given floor (bank of flash chips) */ /* DoC_SelectFloor: Select a given floor (bank of flash chips) */
static int DoC_SelectFloor(unsigned long docptr, int floor) static int DoC_SelectFloor(void __iomem * docptr, int floor)
{ {
/* Select the floor (bank) of chips required */ /* Select the floor (bank) of chips required */
WriteDOC(floor, docptr, FloorSelect); WriteDOC(floor, docptr, FloorSelect);
...@@ -417,7 +417,7 @@ static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, ...@@ -417,7 +417,7 @@ static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
volatile char dummy; volatile char dummy;
unsigned char syndrome[6]; unsigned char syndrome[6];
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
/* Don't allow read past end of device */ /* Don't allow read past end of device */
...@@ -543,7 +543,7 @@ static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, ...@@ -543,7 +543,7 @@ static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
int i,ret = 0; int i,ret = 0;
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[to >> (this->chipshift)]; struct Nand *mychip = &this->chips[to >> (this->chipshift)];
/* Don't allow write past end of device */ /* Don't allow write past end of device */
...@@ -678,7 +678,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -678,7 +678,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
#endif #endif
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
/* Find the chip which is to be used and select it */ /* Find the chip which is to be used and select it */
...@@ -730,7 +730,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -730,7 +730,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
volatile char dummy; volatile char dummy;
int ret = 0; int ret = 0;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
/* Find the chip which is to be used and select it */ /* Find the chip which is to be used and select it */
...@@ -799,7 +799,7 @@ int doc_erase (struct mtd_info *mtd, struct erase_info *instr) ...@@ -799,7 +799,7 @@ int doc_erase (struct mtd_info *mtd, struct erase_info *instr)
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
unsigned long docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
if (len != mtd->erasesize) if (len != mtd->erasesize)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2001plus.c,v 1.9 2004/08/09 13:19:44 dwmw2 Exp $ * $Id: doc2001plus.c,v 1.10 2004/09/16 23:51:57 gleixner Exp $
* *
* Released under GPL * Released under GPL
*/ */
...@@ -57,7 +57,7 @@ static struct mtd_info *docmilpluslist = NULL; ...@@ -57,7 +57,7 @@ static struct mtd_info *docmilpluslist = NULL;
/* Perform the required delay cycles by writing to the NOP register */ /* Perform the required delay cycles by writing to the NOP register */
static void DoC_Delay(unsigned long docptr, int cycles) static void DoC_Delay(void __iomem * docptr, int cycles)
{ {
int i; int i;
...@@ -68,7 +68,7 @@ static void DoC_Delay(unsigned long docptr, int cycles) ...@@ -68,7 +68,7 @@ static void DoC_Delay(unsigned long docptr, int cycles)
#define CDSN_CTRL_FR_B_MASK (CDSN_CTRL_FR_B0 | CDSN_CTRL_FR_B1) #define CDSN_CTRL_FR_B_MASK (CDSN_CTRL_FR_B0 | CDSN_CTRL_FR_B1)
/* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */
static int _DoC_WaitReady(unsigned long docptr) static int _DoC_WaitReady(void __iomem * docptr)
{ {
unsigned int c = 0xffff; unsigned int c = 0xffff;
...@@ -85,7 +85,7 @@ static int _DoC_WaitReady(unsigned long docptr) ...@@ -85,7 +85,7 @@ static int _DoC_WaitReady(unsigned long docptr)
return (c == 0); return (c == 0);
} }
static inline int DoC_WaitReady(unsigned long docptr) static inline int DoC_WaitReady(void __iomem * docptr)
{ {
/* This is inline, to optimise the common case, where it's ready instantly */ /* This is inline, to optimise the common case, where it's ready instantly */
int ret = 0; int ret = 0;
...@@ -106,7 +106,7 @@ static inline int DoC_WaitReady(unsigned long docptr) ...@@ -106,7 +106,7 @@ static inline int DoC_WaitReady(unsigned long docptr)
* can detect. M-systems suggest always check this on any block level * can detect. M-systems suggest always check this on any block level
* operation and setting to normal mode if in reset mode. * operation and setting to normal mode if in reset mode.
*/ */
static inline void DoC_CheckASIC(unsigned long docptr) static inline void DoC_CheckASIC(void __iomem * docptr)
{ {
/* Make sure the DoC is in normal mode */ /* Make sure the DoC is in normal mode */
if ((ReadDOC(docptr, Mplus_DOCControl) & DOC_MODE_NORMAL) == 0) { if ((ReadDOC(docptr, Mplus_DOCControl) & DOC_MODE_NORMAL) == 0) {
...@@ -118,7 +118,7 @@ static inline void DoC_CheckASIC(unsigned long docptr) ...@@ -118,7 +118,7 @@ static inline void DoC_CheckASIC(unsigned long docptr)
/* DoC_Command: Send a flash command to the flash chip through the Flash /* DoC_Command: Send a flash command to the flash chip through the Flash
* command register. Need 2 Write Pipeline Terminates to complete send. * command register. Need 2 Write Pipeline Terminates to complete send.
*/ */
static inline void DoC_Command(unsigned long docptr, unsigned char command, static inline void DoC_Command(void __iomem * docptr, unsigned char command,
unsigned char xtraflags) unsigned char xtraflags)
{ {
WriteDOC(command, docptr, Mplus_FlashCmd); WriteDOC(command, docptr, Mplus_FlashCmd);
...@@ -133,7 +133,7 @@ static inline void DoC_Address(struct DiskOnChip *doc, int numbytes, ...@@ -133,7 +133,7 @@ static inline void DoC_Address(struct DiskOnChip *doc, int numbytes,
unsigned long ofs, unsigned char xtraflags1, unsigned long ofs, unsigned char xtraflags1,
unsigned char xtraflags2) unsigned char xtraflags2)
{ {
unsigned long docptr = doc->virtadr; void __iomem * docptr = doc->virtadr;
/* Allow for possible Mill Plus internal flash interleaving */ /* Allow for possible Mill Plus internal flash interleaving */
ofs >>= doc->interleave; ofs >>= doc->interleave;
...@@ -163,14 +163,14 @@ static inline void DoC_Address(struct DiskOnChip *doc, int numbytes, ...@@ -163,14 +163,14 @@ static inline void DoC_Address(struct DiskOnChip *doc, int numbytes,
} }
/* DoC_SelectChip: Select a given flash chip within the current floor */ /* DoC_SelectChip: Select a given flash chip within the current floor */
static int DoC_SelectChip(unsigned long docptr, int chip) static int DoC_SelectChip(void __iomem * docptr, int chip)
{ {
/* No choice for flash chip on Millennium Plus */ /* No choice for flash chip on Millennium Plus */
return 0; return 0;
} }
/* DoC_SelectFloor: Select a given floor (bank of flash chips) */ /* DoC_SelectFloor: Select a given floor (bank of flash chips) */
static int DoC_SelectFloor(unsigned long docptr, int floor) static int DoC_SelectFloor(void __iomem * docptr, int floor)
{ {
WriteDOC((floor & 0x3), docptr, Mplus_DeviceSelect); WriteDOC((floor & 0x3), docptr, Mplus_DeviceSelect);
return 0; return 0;
...@@ -253,7 +253,7 @@ static unsigned int DoC_GetHdrOffset(struct mtd_info *mtd, loff_t *from) ...@@ -253,7 +253,7 @@ static unsigned int DoC_GetHdrOffset(struct mtd_info *mtd, loff_t *from)
return cmd; return cmd;
} }
static inline void MemReadDOC(unsigned long docptr, unsigned char *buf, int len) static inline void MemReadDOC(void __iomem * docptr, unsigned char *buf, int len)
{ {
#ifndef USE_MEMCPY #ifndef USE_MEMCPY
int i; int i;
...@@ -264,7 +264,7 @@ static inline void MemReadDOC(unsigned long docptr, unsigned char *buf, int len) ...@@ -264,7 +264,7 @@ static inline void MemReadDOC(unsigned long docptr, unsigned char *buf, int len)
#endif #endif
} }
static inline void MemWriteDOC(unsigned long docptr, unsigned char *buf, int len) static inline void MemWriteDOC(void __iomem * docptr, unsigned char *buf, int len)
{ {
#ifndef USE_MEMCPY #ifndef USE_MEMCPY
int i; int i;
...@@ -280,7 +280,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip) ...@@ -280,7 +280,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
{ {
int mfr, id, i, j; int mfr, id, i, j;
volatile char dummy; volatile char dummy;
unsigned long docptr = doc->virtadr; void __iomem * docptr = doc->virtadr;
/* Page in the required floor/chip */ /* Page in the required floor/chip */
DoC_SelectFloor(docptr, floor); DoC_SelectFloor(docptr, floor);
...@@ -371,7 +371,7 @@ static void DoC_ScanChips(struct DiskOnChip *this) ...@@ -371,7 +371,7 @@ static void DoC_ScanChips(struct DiskOnChip *this)
printk(KERN_NOTICE "Setting DiskOnChip Millennium Plus interleave to %s\n", printk(KERN_NOTICE "Setting DiskOnChip Millennium Plus interleave to %s\n",
this->interleave?"on (16-bit)":"off (8-bit)"); this->interleave?"on (16-bit)":"off (8-bit)");
conf ^= 4; conf ^= 4;
WriteDOC(this->virtadr, conf, Mplus_Configuration); WriteDOC(conf, this->virtadr, Mplus_Configuration);
} }
/* For each floor, find the number of valid chips it contains */ /* For each floor, find the number of valid chips it contains */
...@@ -531,7 +531,7 @@ static int doc_dumpblk(struct mtd_info *mtd, loff_t from) ...@@ -531,7 +531,7 @@ static int doc_dumpblk(struct mtd_info *mtd, loff_t from)
int i; int i;
loff_t fofs; loff_t fofs;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
unsigned char *bp, buf[1056]; unsigned char *bp, buf[1056];
char c[32]; char c[32];
...@@ -616,7 +616,7 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -616,7 +616,7 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
loff_t fofs; loff_t fofs;
unsigned char syndrome[6]; unsigned char syndrome[6];
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
/* Don't allow read past end of device */ /* Don't allow read past end of device */
...@@ -755,7 +755,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -755,7 +755,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
loff_t fto; loff_t fto;
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[to >> (this->chipshift)]; struct Nand *mychip = &this->chips[to >> (this->chipshift)];
/* Don't allow write past end of device */ /* Don't allow write past end of device */
...@@ -881,7 +881,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -881,7 +881,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
{ {
loff_t fofs, base; loff_t fofs, base;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
size_t i, size, got, want; size_t i, size, got, want;
...@@ -959,7 +959,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -959,7 +959,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
volatile char dummy; volatile char dummy;
loff_t fofs, base; loff_t fofs, base;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
size_t i, size, got, want; size_t i, size, got, want;
int ret = 0; int ret = 0;
...@@ -1061,7 +1061,7 @@ int doc_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -1061,7 +1061,7 @@ int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
unsigned long docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
DoC_CheckASIC(docptr); DoC_CheckASIC(docptr);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/* (C) 1999 Machine Vision Holdings, Inc. */ /* (C) 1999 Machine Vision Holdings, Inc. */
/* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */ /* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */
/* $Id: docprobe.c,v 1.41 2003/12/03 10:19:57 dwmw2 Exp $ */ /* $Id: docprobe.c,v 1.42 2004/09/16 23:51:57 gleixner Exp $ */
...@@ -270,7 +270,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -270,7 +270,7 @@ static void __init DoC_Probe(unsigned long physadr)
memset((char *)this, 0, sizeof(struct DiskOnChip)); memset((char *)this, 0, sizeof(struct DiskOnChip));
mtd->priv = this; mtd->priv = this;
this->virtadr = docptr; this->virtadr = (void __iomem *)docptr;
this->physadr = physadr; this->physadr = physadr;
this->ChipID = ChipID; this->ChipID = ChipID;
sprintf(namebuf, "with ChipID %2.2X", ChipID); sprintf(namebuf, "with ChipID %2.2X", ChipID);
......
/* /*
* $Id: arctic-mtd.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $ * $Id: arctic-mtd.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for * drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for
* IBM 405LP Arctic boards. * IBM 405LP Arctic boards.
...@@ -98,7 +98,7 @@ init_arctic_mtd(void) ...@@ -98,7 +98,7 @@ init_arctic_mtd(void)
{ {
printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
arctic_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE); arctic_mtd_map.virt = ioremap(PADDR, SIZE);
if (!arctic_mtd_map.virt) { if (!arctic_mtd_map.virt) {
printk("%s: failed to ioremap 0x%x\n", NAME, PADDR); printk("%s: failed to ioremap 0x%x\n", NAME, PADDR);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* NV-RAM memory access on autcpu12 * NV-RAM memory access on autcpu12
* (C) 2002 Thomas Gleixner (gleixner@autronix.de) * (C) 2002 Thomas Gleixner (gleixner@autronix.de)
* *
* $Id: autcpu12-nvram.c,v 1.7 2004/09/16 23:27:12 gleixner Exp $ * $Id: autcpu12-nvram.c,v 1.8 2004/11/04 13:24:14 gleixner Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -47,7 +47,7 @@ static int __init init_autcpu12_sram (void) ...@@ -47,7 +47,7 @@ static int __init init_autcpu12_sram (void)
{ {
int err, save0, save1; int err, save0, save1;
autcpu12_sram_map.virt = (void __iomem *)ioremap(0x12000000, SZ_128K); autcpu12_sram_map.virt = ioremap(0x12000000, SZ_128K);
if (!autcpu12_sram_map.virt) { if (!autcpu12_sram_map.virt) {
printk("Failed to ioremap autcpu12 NV-RAM space\n"); printk("Failed to ioremap autcpu12 NV-RAM space\n");
err = -EIO; err = -EIO;
......
/* /*
* $Id: beech-mtd.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $ * $Id: beech-mtd.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $
* *
* drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for * drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for
* IBM 405LP Beech boards. * IBM 405LP Beech boards.
...@@ -74,7 +74,7 @@ init_beech_mtd(void) ...@@ -74,7 +74,7 @@ init_beech_mtd(void)
{ {
printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR); printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
beech_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE); beech_mtd_map.virt = ioremap(PADDR, SIZE);
if (!beech_mtd_map.virt) { if (!beech_mtd_map.virt) {
printk("%s: failed to ioremap 0x%x\n", NAME, PADDR); printk("%s: failed to ioremap 0x%x\n", NAME, PADDR);
......
/* /*
* Flash on Cirrus CDB89712 * Flash on Cirrus CDB89712
* *
* $Id: cdb89712.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $ * $Id: cdb89712.c,v 1.10 2004/11/04 13:24:14 gleixner Exp $
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -44,7 +44,7 @@ static int __init init_cdb89712_flash (void) ...@@ -44,7 +44,7 @@ static int __init init_cdb89712_flash (void)
goto out; goto out;
} }
cdb89712_flash_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE); cdb89712_flash_map.virt = ioremap(FLASH_START, FLASH_SIZE);
if (!cdb89712_flash_map.virt) { if (!cdb89712_flash_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n"); printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n");
err = -EIO; err = -EIO;
...@@ -114,7 +114,7 @@ static int __init init_cdb89712_sram (void) ...@@ -114,7 +114,7 @@ static int __init init_cdb89712_sram (void)
goto out; goto out;
} }
cdb89712_sram_map.virt = (void __iomem *)ioremap(SRAM_START, SRAM_SIZE); cdb89712_sram_map.virt = ioremap(SRAM_START, SRAM_SIZE);
if (!cdb89712_sram_map.virt) { if (!cdb89712_sram_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n"); printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n");
err = -EIO; err = -EIO;
...@@ -182,7 +182,7 @@ static int __init init_cdb89712_bootrom (void) ...@@ -182,7 +182,7 @@ static int __init init_cdb89712_bootrom (void)
goto out; goto out;
} }
cdb89712_bootrom_map.virt = (void __iomem *)ioremap(BOOTROM_START, BOOTROM_SIZE); cdb89712_bootrom_map.virt = ioremap(BOOTROM_START, BOOTROM_SIZE);
if (!cdb89712_bootrom_map.virt) { if (!cdb89712_bootrom_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n"); printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n");
err = -EIO; err = -EIO;
......
/* /*
* Copyright 2001 Flaga hf. Medical Devices, Kri Davsson <kd@flaga.is> * Copyright 2001 Flaga hf. Medical Devices, Kri Davsson <kd@flaga.is>
* *
* $Id: cfi_flagadm.c,v 1.13 2004/09/16 23:27:12 gleixner Exp $ * $Id: cfi_flagadm.c,v 1.14 2004/11/04 13:24:14 gleixner Exp $
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
...@@ -96,7 +96,7 @@ int __init init_flagadm(void) ...@@ -96,7 +96,7 @@ int __init init_flagadm(void)
FLASH_SIZE, FLASH_PHYS_ADDR); FLASH_SIZE, FLASH_PHYS_ADDR);
flagadm_map.phys = FLASH_PHYS_ADDR; flagadm_map.phys = FLASH_PHYS_ADDR;
flagadm_map.virt = (void __iomem *s)ioremap(FLASH_PHYS_ADDR, flagadm_map.virt = ioremap(FLASH_PHYS_ADDR,
FLASH_SIZE); FLASH_SIZE);
if (!flagadm_map.virt) { if (!flagadm_map.virt) {
......
/* /*
* $Id: cstm_mips_ixx.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ * $Id: cstm_mips_ixx.c,v 1.12 2004/11/04 13:24:14 gleixner Exp $
* *
* Mapping of a custom board with both AMD CFI and JEDEC flash in partitions. * Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
* Config with both CFI and JEDEC device support. * Config with both CFI and JEDEC device support.
...@@ -170,7 +170,7 @@ int __init init_cstm_mips_ixx(void) ...@@ -170,7 +170,7 @@ int __init init_cstm_mips_ixx(void)
cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr; cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr;
cstm_mips_ixx_map[i].virt = (void __iomem *)ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size); cstm_mips_ixx_map[i].virt = ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size);
if (!cstm_mips_ixx_map[i].virt) { if (!cstm_mips_ixx_map[i].virt) {
printk(KERN_WARNING "Failed to ioremap\n"); printk(KERN_WARNING "Failed to ioremap\n");
return -EIO; return -EIO;
......
/* /*
* Flash memory access on Alchemy Db1550 board * Flash memory access on Alchemy Db1550 board
* *
* $Id: db1550-flash.c,v 1.6 2004/10/20 05:50:19 ppopov Exp $ * $Id: db1550-flash.c,v 1.7 2004/11/04 13:24:14 gleixner Exp $
* *
* (C) 2004 Embedded Edge, LLC, based on db1550-flash.c: * (C) 2004 Embedded Edge, LLC, based on db1550-flash.c:
* (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com> * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
...@@ -161,8 +161,7 @@ int __init db1550_mtd_init(void) ...@@ -161,8 +161,7 @@ int __init db1550_mtd_init(void)
*/ */
printk(KERN_NOTICE "Db1550 flash: probing %d-bit flash bus\n", printk(KERN_NOTICE "Db1550 flash: probing %d-bit flash bus\n",
db1550_map.bankwidth*8); db1550_map.bankwidth*8);
db1550_map.virt = db1550_map.virt = ioremap(window_addr, window_size);
(void __iomem *)ioremap(window_addr, window_size);
mymtd = do_map_probe("cfi_probe", &db1550_map); mymtd = do_map_probe("cfi_probe", &db1550_map);
if (!mymtd) return -ENXIO; if (!mymtd) return -ENXIO;
mymtd->owner = THIS_MODULE; mymtd->owner = THIS_MODULE;
......
/* /*
* Flash memory access on Alchemy Db1xxx boards * Flash memory access on Alchemy Db1xxx boards
* *
* $Id: db1x00-flash.c,v 1.5 2004/09/18 23:22:35 ppopov Exp $ * $Id: db1x00-flash.c,v 1.6 2004/11/04 13:24:14 gleixner Exp $
* *
* (C) 2003 Pete Popov <ppopov@embeddedalley.com> * (C) 2003 Pete Popov <ppopov@embeddedalley.com>
* *
...@@ -199,7 +199,7 @@ int __init db1x00_mtd_init(void) ...@@ -199,7 +199,7 @@ int __init db1x00_mtd_init(void)
*/ */
printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n", printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n",
db1xxx_mtd_map.bankwidth*8); db1xxx_mtd_map.bankwidth*8);
db1xxx_mtd_map.virt = (void __iomem *)ioremap(window_addr, window_size); db1xxx_mtd_map.virt = ioremap(window_addr, window_size);
db1xxx_mtd = do_map_probe("cfi_probe", &db1xxx_mtd_map); db1xxx_mtd = do_map_probe("cfi_probe", &db1xxx_mtd_map);
if (!db1xxx_mtd) return -ENXIO; if (!db1xxx_mtd) return -ENXIO;
db1xxx_mtd->owner = THIS_MODULE; db1xxx_mtd->owner = THIS_MODULE;
......
/* /*
* $Id: dbox2-flash.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $ * $Id: dbox2-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* D-Box 2 flash driver * D-Box 2 flash driver
*/ */
...@@ -75,7 +75,7 @@ struct map_info dbox2_flash_map = { ...@@ -75,7 +75,7 @@ struct map_info dbox2_flash_map = {
int __init init_dbox2_flash(void) int __init init_dbox2_flash(void)
{ {
printk(KERN_NOTICE "D-Box 2 flash driver (size->0x%X mem->0x%X)\n", WINDOW_SIZE, WINDOW_ADDR); printk(KERN_NOTICE "D-Box 2 flash driver (size->0x%X mem->0x%X)\n", WINDOW_SIZE, WINDOW_ADDR);
dbox2_flash_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); dbox2_flash_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!dbox2_flash_map.virt) { if (!dbox2_flash_map.virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* *
* $Id: dilnetpc.c,v 1.15 2004/10/21 08:31:32 dwmw2 Exp $ * $Id: dilnetpc.c,v 1.16 2004/11/04 13:24:14 gleixner Exp $
* *
* The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
* featuring the AMD Elan SC410 processor. There are two variants of this * featuring the AMD Elan SC410 processor. There are two variants of this
...@@ -403,7 +403,7 @@ static int __init init_dnpc(void) ...@@ -403,7 +403,7 @@ static int __init init_dnpc(void)
printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n", printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n",
is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys); is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
dnpc_map.virt = (void __iomem *)ioremap_nocache(dnpc_map.phys, dnpc_map.size); dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size);
dnpc_map_flash(dnpc_map.phys, dnpc_map.size); dnpc_map_flash(dnpc_map.phys, dnpc_map.size);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Flash map driver for the Dy4 SVME182 board * Flash map driver for the Dy4 SVME182 board
* *
* $Id: dmv182.c,v 1.4 2004/09/16 23:27:13 gleixner Exp $ * $Id: dmv182.c,v 1.5 2004/11/04 13:24:14 gleixner Exp $
* *
* Copyright 2003-2004, TimeSys Corporation * Copyright 2003-2004, TimeSys Corporation
* *
...@@ -103,8 +103,7 @@ static int __init init_svme182(void) ...@@ -103,8 +103,7 @@ static int __init init_svme182(void)
partitions = svme182_partitions; partitions = svme182_partitions;
svme182_map.virt = svme182_map.virt = ioremap(FLASH_BASE_ADDR, svme182_map.size);
(void __iomem *)ioremap(FLASH_BASE_ADDR, svme182_map.size);
if (svme182_map.virt == 0) { if (svme182_map.virt == 0) {
printk("Failed to ioremap FLASH memory area.\n"); printk("Failed to ioremap FLASH memory area.\n");
......
/* /*
* $Id: ebony.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ * $Id: ebony.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* Mapping for Ebony user flash * Mapping for Ebony user flash
* *
...@@ -93,8 +93,7 @@ int __init init_ebony(void) ...@@ -93,8 +93,7 @@ int __init init_ebony(void)
large_flash_base = EBONY_LARGE_FLASH_HIGH; large_flash_base = EBONY_LARGE_FLASH_HIGH;
ebony_small_map.phys = small_flash_base; ebony_small_map.phys = small_flash_base;
ebony_small_map.virt = ebony_small_map.virt = ioremap64(small_flash_base,
(void __iomem *)ioremap64(small_flash_base,
ebony_small_map.size); ebony_small_map.size);
if (!ebony_small_map.virt) { if (!ebony_small_map.virt) {
......
/* /*
* $Id: edb7312.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ * $Id: edb7312.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* Handle mapping of the NOR flash on Cogent EDB7312 boards * Handle mapping of the NOR flash on Cogent EDB7312 boards
* *
...@@ -82,8 +82,7 @@ int __init init_edb7312nor(void) ...@@ -82,8 +82,7 @@ int __init init_edb7312nor(void)
printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n", printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n",
WINDOW_SIZE, WINDOW_ADDR); WINDOW_SIZE, WINDOW_ADDR);
edb7312nor_map.virt = (void __iomem *) edb7312nor_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!edb7312nor_map.virt) { if (!edb7312nor_map.virt) {
printk(MSG_PREFIX "failed to ioremap\n"); printk(MSG_PREFIX "failed to ioremap\n");
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
$Id: elan-104nc.c,v 1.22 2004/09/16 23:27:13 gleixner Exp $ $Id: elan-104nc.c,v 1.23 2004/11/04 13:24:14 gleixner Exp $
The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16 The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16
mode. This drivers uses the CFI probe and Intel Extended Command Set drivers. mode. This drivers uses the CFI probe and Intel Extended Command Set drivers.
...@@ -190,7 +190,7 @@ int __init init_elan_104nc(void) ...@@ -190,7 +190,7 @@ int __init init_elan_104nc(void)
/* Urg! We use I/O port 0x22 without request_region()ing it, /* Urg! We use I/O port 0x22 without request_region()ing it,
because it's already allocated to the PIC. */ because it's already allocated to the PIC. */
iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH); iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) { if (!iomapadr) {
printk( KERN_ERR"%s: failed to ioremap memory region\n", printk( KERN_ERR"%s: failed to ioremap memory region\n",
elan_104nc_map.name ); elan_104nc_map.name );
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Copyright (C) 2001 Altera Corporation * Copyright (C) 2001 Altera Corporation
* Copyright (C) 2001 Red Hat, Inc. * Copyright (C) 2001 Red Hat, Inc.
* *
* $Id: epxa10db-flash.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ * $Id: epxa10db-flash.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -62,7 +62,7 @@ static int __init epxa_mtd_init(void) ...@@ -62,7 +62,7 @@ static int __init epxa_mtd_init(void)
printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START); printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START);
epxa_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE); epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE);
if (!epxa_map.virt) { if (!epxa_map.virt) {
printk("Failed to ioremap %s flash\n",BOARD_NAME); printk("Failed to ioremap %s flash\n",BOARD_NAME);
return -EIO; return -EIO;
......
/* fortunet.c memory map /* fortunet.c memory map
* *
* $Id: fortunet.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $ * $Id: fortunet.c,v 1.9 2004/11/04 13:24:14 gleixner Exp $
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -209,8 +209,8 @@ int __init init_fortunet(void) ...@@ -209,8 +209,8 @@ int __init init_fortunet(void)
map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical, map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical,
map_regions[ix].map_info.virt = map_regions[ix].map_info.virt =
(void __iomem *)ioremap_nocache( ioremap_nocache(
map_regions[ix].window_addr_physical, map_regions[ix].window_addr_physical,
map_regions[ix].map_info.size); map_regions[ix].map_info.size);
if(!map_regions[ix].map_info.virt) if(!map_regions[ix].map_info.virt)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Flash memory access on Hynix GMS30C7201/HMS30C7202 based * Flash memory access on Hynix GMS30C7201/HMS30C7202 based
* evaluation boards * evaluation boards
* *
* $Id: h720x-flash.c,v 1.10 2004/09/16 23:27:13 gleixner Exp $ * $Id: h720x-flash.c,v 1.11 2004/11/04 13:24:14 gleixner Exp $
* *
* (C) 2002 Jungjun Kim <jungjun.kim@hynix.com> * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com>
* 2003 Thomas Gleixner <tglx@linutronix.de> * 2003 Thomas Gleixner <tglx@linutronix.de>
...@@ -73,7 +73,7 @@ int __init h720x_mtd_init(void) ...@@ -73,7 +73,7 @@ int __init h720x_mtd_init(void)
char *part_type = NULL; char *part_type = NULL;
h720x_map.virt = (void __iomem *)ioremap(FLASH_PHYS, FLASH_SIZE); h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE);
if (!h720x_map.virt) { if (!h720x_map.virt) {
printk(KERN_ERR "H720x-MTD: ioremap failed\n"); printk(KERN_ERR "H720x-MTD: ioremap failed\n");
......
/* /*
* $Id: impa7.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $ * $Id: impa7.c,v 1.13 2004/11/04 13:24:14 gleixner Exp $
* *
* Handle mapping of the NOR flash on implementa A7 boards * Handle mapping of the NOR flash on implementa A7 boards
* *
...@@ -91,8 +91,7 @@ int __init init_impa7(void) ...@@ -91,8 +91,7 @@ int __init init_impa7(void)
pt[i].size, pt[i].addr); pt[i].size, pt[i].addr);
impa7_map[i].phys = pt[i].addr; impa7_map[i].phys = pt[i].addr;
impa7_map[i].virt = (void __iomem *) impa7_map[i].virt = ioremap(pt[i].addr, pt[i].size);
ioremap(pt[i].addr, pt[i].size);
if (!impa7_map[i].virt) { if (!impa7_map[i].virt) {
printk(MSG_PREFIX "failed to ioremap\n"); printk(MSG_PREFIX "failed to ioremap\n");
return -EIO; return -EIO;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com> * (C) 2002 Hewlett-Packard Company <jamey.hicks@hp.com>
* (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes * (C) 2003 Christian Pellegrin <chri@ascensit.com>, <chri@infis.univ.ts.it>: concatenation of multiple flashes
* *
* $Id: ipaq-flash.c,v 1.2 2004/09/16 23:27:13 gleixner Exp $ * $Id: ipaq-flash.c,v 1.3 2004/11/04 13:24:15 gleixner Exp $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -246,7 +246,7 @@ int __init ipaq_mtd_init(void) ...@@ -246,7 +246,7 @@ int __init ipaq_mtd_init(void)
ipaq_map[i].size = h3xxx_max_flash_size; ipaq_map[i].size = h3xxx_max_flash_size;
ipaq_map[i].set_vpp = h3xxx_set_vpp; ipaq_map[i].set_vpp = h3xxx_set_vpp;
ipaq_map[i].phys = cs_phys[i]; ipaq_map[i].phys = cs_phys[i];
ipaq_map[i].virt = (void __iomem *)__ioremap(cs_phys[i], 0x04000000, 0, 1); ipaq_map[i].virt = __ioremap(cs_phys[i], 0x04000000, 0, 1);
if (machine_is_h3100 () || machine_is_h1900()) if (machine_is_h3100 () || machine_is_h1900())
ipaq_map[i].bankwidth = 2; ipaq_map[i].bankwidth = 2;
} }
...@@ -443,7 +443,7 @@ static int __init h1900_special_case(void) ...@@ -443,7 +443,7 @@ static int __init h1900_special_case(void)
ipaq_map[0].size = 0x80000; ipaq_map[0].size = 0x80000;
ipaq_map[0].set_vpp = h3xxx_set_vpp; ipaq_map[0].set_vpp = h3xxx_set_vpp;
ipaq_map[0].phys = 0x0; ipaq_map[0].phys = 0x0;
ipaq_map[0].virt = (void __iomem *)__ioremap(0x0, 0x04000000, 0, 1); ipaq_map[0].virt = __ioremap(0x0, 0x04000000, 0, 1);
ipaq_map[0].bankwidth = 2; ipaq_map[0].bankwidth = 2;
printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt); printk(KERN_NOTICE "iPAQ flash: probing %d-bit flash bus, window=%lx with JEDEC.\n", ipaq_map[0].bankwidth*8, ipaq_map[0].virt);
......
/* /*
* $Id: iq80310.c,v 1.19 2004/09/16 23:27:13 gleixner Exp $ * $Id: iq80310.c,v 1.20 2004/11/04 13:24:15 gleixner Exp $
* *
* Mapping for the Intel XScale IQ80310 evaluation board * Mapping for the Intel XScale IQ80310 evaluation board
* *
...@@ -68,7 +68,7 @@ static int __init init_iq80310(void) ...@@ -68,7 +68,7 @@ static int __init init_iq80310(void)
int parsed_nr_parts = 0; int parsed_nr_parts = 0;
int ret; int ret;
iq80310_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); iq80310_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!iq80310_map.virt) { if (!iq80310_map.virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
return -EIO; return -EIO;
......
/* /*
* $Id: ixp2000.c,v 1.3 2004/09/16 23:27:13 gleixner Exp $ * $Id: ixp2000.c,v 1.4 2004/11/04 13:24:15 gleixner Exp $
* *
* drivers/mtd/maps/ixp2000.c * drivers/mtd/maps/ixp2000.c
* *
...@@ -208,9 +208,8 @@ static int ixp2000_flash_probe(struct device *_dev) ...@@ -208,9 +208,8 @@ static int ixp2000_flash_probe(struct device *_dev)
goto Error; goto Error;
} }
info->map.map_priv_1 = info->map.map_priv_1 = ioremap(dev->resource->start,
(void __iomem *) ioremap(dev->resource->start, dev->resource->end - dev->resource->start + 1);
dev->resource->end - dev->resource->start + 1);
if (!info->map.map_priv_1) { if (!info->map.map_priv_1) {
dev_err(_dev, "Failed to ioremap flash region\n"); dev_err(_dev, "Failed to ioremap flash region\n");
err = -EIO; err = -EIO;
......
/* /*
* $Id: ixp4xx.c,v 1.6 2004/09/17 00:25:06 gleixner Exp $ * $Id: ixp4xx.c,v 1.7 2004/11/04 13:24:15 gleixner Exp $
* *
* drivers/mtd/maps/ixp4xx.c * drivers/mtd/maps/ixp4xx.c
* *
...@@ -196,9 +196,8 @@ static int ixp4xx_flash_probe(struct device *_dev) ...@@ -196,9 +196,8 @@ static int ixp4xx_flash_probe(struct device *_dev)
goto Error; goto Error;
} }
info->map.map_priv_1 = info->map.map_priv_1 = ioremap(dev->resource->start,
(void __iomem *) ioremap(dev->resource->start, dev->resource->end - dev->resource->start + 1);
dev->resource->end - dev->resource->start + 1);
if (!info->map.map_priv_1) { if (!info->map.map_priv_1) {
printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n"); printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n");
err = -EIO; err = -EIO;
......
/* /*
* $Id: l440gx.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $ * $Id: l440gx.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $
* *
* BIOS Flash chip on Intel 440GX board. * BIOS Flash chip on Intel 440GX board.
* *
...@@ -73,7 +73,7 @@ static int __init init_l440gx(void) ...@@ -73,7 +73,7 @@ static int __init init_l440gx(void)
return -ENODEV; return -ENODEV;
} }
l440gx_map.virt = (void __iomem *)ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE); l440gx_map.virt = ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
if (!l440gx_map.virt) { if (!l440gx_map.virt) {
printk(KERN_WARNING "Failed to ioremap L440GX flash region\n"); printk(KERN_WARNING "Failed to ioremap L440GX flash region\n");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* modify it under the terms of the GNU General Public License version * modify it under the terms of the GNU General Public License version
* 2 as published by the Free Software Foundation. * 2 as published by the Free Software Foundation.
* *
* $Id: lasat.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $ * $Id: lasat.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $
* *
*/ */
...@@ -50,7 +50,7 @@ static int __init init_lasat(void) ...@@ -50,7 +50,7 @@ static int __init init_lasat(void)
ENABLE_VPP((&lasat_map)); ENABLE_VPP((&lasat_map));
lasat_map.phys = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER); lasat_map.phys = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER);
lasat_map.virt = (void __iomem *)ioremap_nocache( lasat_map.virt = ioremap_nocache(
lasat_map.phys, lasat_board_info.li_flash_size); lasat_map.phys, lasat_board_info.li_flash_size);
lasat_map.size = lasat_board_info.li_flash_size; lasat_map.size = lasat_board_info.li_flash_size;
......
/* /*
* $Id: lubbock-flash.c,v 1.18 2004/09/28 18:54:40 nico Exp $ * $Id: lubbock-flash.c,v 1.19 2004/11/04 13:24:15 gleixner Exp $
* *
* Map driver for the Lubbock developer platform. * Map driver for the Lubbock developer platform.
* *
...@@ -84,7 +84,7 @@ static int __init init_lubbock(void) ...@@ -84,7 +84,7 @@ static int __init init_lubbock(void)
lubbock_maps[flashboot].name = "Lubbock Boot ROM"; lubbock_maps[flashboot].name = "Lubbock Boot ROM";
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
lubbock_maps[i].virt = (void __iomem *)ioremap(lubbock_maps[i].phys, WINDOW_SIZE); lubbock_maps[i].virt = ioremap(lubbock_maps[i].phys, WINDOW_SIZE);
if (!lubbock_maps[i].virt) { if (!lubbock_maps[i].virt) {
printk(KERN_WARNING "Failed to ioremap %s\n", lubbock_maps[i].name); printk(KERN_WARNING "Failed to ioremap %s\n", lubbock_maps[i].name);
if (!ret) if (!ret)
......
/* /*
* $Id: mbx860.c,v 1.7 2004/09/16 23:27:13 gleixner Exp $ * $Id: mbx860.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
* *
* Handle mapping of the flash on MBX860 boards * Handle mapping of the flash on MBX860 boards
* *
...@@ -60,7 +60,7 @@ struct map_info mbx_map = { ...@@ -60,7 +60,7 @@ struct map_info mbx_map = {
int __init init_mbx(void) int __init init_mbx(void)
{ {
printk(KERN_NOTICE "Motorola MBX flash device: 0x%x at 0x%x\n", WINDOW_SIZE*4, WINDOW_ADDR); printk(KERN_NOTICE "Motorola MBX flash device: 0x%x at 0x%x\n", WINDOW_SIZE*4, WINDOW_ADDR);
mbx_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); mbx_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
if (!mbx_map.virt) { if (!mbx_map.virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com) * Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
* based on sc520cdp.c by Sysgo Real-Time Solutions GmbH * based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
* *
* $Id: netsc520.c,v 1.11 2004/09/16 23:27:13 gleixner Exp $ * $Id: netsc520.c,v 1.12 2004/11/04 13:24:15 gleixner Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -95,7 +95,7 @@ static struct mtd_info *mymtd; ...@@ -95,7 +95,7 @@ static struct mtd_info *mymtd;
static int __init init_netsc520(void) static int __init init_netsc520(void)
{ {
printk(KERN_NOTICE "NetSc520 flash device: 0x%lx at 0x%lx\n", netsc520_map.size, netsc520_map.phys); printk(KERN_NOTICE "NetSc520 flash device: 0x%lx at 0x%lx\n", netsc520_map.size, netsc520_map.phys);
netsc520_map.virt = (void __iomem *)ioremap_nocache(netsc520_map.phys, netsc520_map.size); netsc520_map.virt = ioremap_nocache(netsc520_map.phys, netsc520_map.size);
if (!netsc520_map.virt) { if (!netsc520_map.virt) {
printk("Failed to ioremap_nocache\n"); printk("Failed to ioremap_nocache\n");
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2001-2002, SnapGear (www.snapgear.com) * (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
* *
* $Id: nettel.c,v 1.7 2004/10/20 22:17:30 dwmw2 Exp $ * $Id: nettel.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
*/ */
/****************************************************************************/ /****************************************************************************/
...@@ -273,7 +273,7 @@ int __init nettel_init(void) ...@@ -273,7 +273,7 @@ int __init nettel_init(void)
__asm__ ("wbinvd"); __asm__ ("wbinvd");
nettel_amd_map.phys = amdaddr; nettel_amd_map.phys = amdaddr;
nettel_amd_map.virt = (void __iomem *) ioremap_nocache(amdaddr, maxsize); nettel_amd_map.virt = ioremap_nocache(amdaddr, maxsize);
if (!nettel_amd_map.virt) { if (!nettel_amd_map.virt) {
printk("SNAPGEAR: failed to ioremap() BOOTCS\n"); printk("SNAPGEAR: failed to ioremap() BOOTCS\n");
return(-EIO); return(-EIO);
......
/* /*
* $Id: ocelot.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $ * $Id: ocelot.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $
* *
* Flash on Momenco Ocelot * Flash on Momenco Ocelot
*/ */
...@@ -81,7 +81,7 @@ static int __init init_ocelot_maps(void) ...@@ -81,7 +81,7 @@ static int __init init_ocelot_maps(void)
iounmap(pld); iounmap(pld);
/* Now ioremap the NVRAM space */ /* Now ioremap the NVRAM space */
ocelot_nvram_map.virt = (void __iomem *)ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE); ocelot_nvram_map.virt = ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE);
if (!ocelot_nvram_map.virt) { if (!ocelot_nvram_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Ocelot NVRAM space\n"); printk(KERN_NOTICE "Failed to ioremap Ocelot NVRAM space\n");
return -EIO; return -EIO;
...@@ -101,7 +101,7 @@ static int __init init_ocelot_maps(void) ...@@ -101,7 +101,7 @@ static int __init init_ocelot_maps(void)
nvram_mtd->write = ocelot_ram_write; nvram_mtd->write = ocelot_ram_write;
/* Now map the flash space */ /* Now map the flash space */
ocelot_flash_map.virt = (void __iomem *)ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE); ocelot_flash_map.virt = ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE);
if (!ocelot_flash_map.virt) { if (!ocelot_flash_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Ocelot flash space\n"); printk(KERN_NOTICE "Failed to ioremap Ocelot flash space\n");
goto fail_2; goto fail_2;
......
...@@ -84,8 +84,7 @@ int __init init_ocotea(void) ...@@ -84,8 +84,7 @@ int __init init_ocotea(void)
} }
ocotea_small_map.phys = small_flash_base; ocotea_small_map.phys = small_flash_base;
ocotea_small_map.virt = ocotea_small_map.virt = ioremap64(small_flash_base,
(void __iomem *)ioremap64(small_flash_base,
ocotea_small_map.size); ocotea_small_map.size);
if (!ocotea_small_map.virt) { if (!ocotea_small_map.virt) {
...@@ -106,8 +105,7 @@ int __init init_ocotea(void) ...@@ -106,8 +105,7 @@ int __init init_ocotea(void)
} }
ocotea_large_map.phys = large_flash_base; ocotea_large_map.phys = large_flash_base;
ocotea_large_map.virt = ocotea_large_map.virt = ioremap64(large_flash_base,
(void __iomem *)ioremap64(large_flash_base,
ocotea_large_map.size); ocotea_large_map.size);
if (!ocotea_large_map.virt) { if (!ocotea_large_map.virt) {
......
/* /*
* Flash memory access on Alchemy Pb1550 board * Flash memory access on Alchemy Pb1550 board
* *
* $Id: pb1550-flash.c,v 1.5 2004/09/16 23:27:13 gleixner Exp $ * $Id: pb1550-flash.c,v 1.6 2004/11/04 13:24:15 gleixner Exp $
* *
* (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c: * (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c:
* (C) 2003 Pete Popov <ppopov@pacbell.net> * (C) 2003 Pete Popov <ppopov@pacbell.net>
...@@ -178,8 +178,7 @@ int __init pb1550_mtd_init(void) ...@@ -178,8 +178,7 @@ int __init pb1550_mtd_init(void)
*/ */
printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n", printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n",
pb1550_map.bankwidth*8); pb1550_map.bankwidth*8);
pb1550_map.virt = pb1550_map.virt = ioremap(window_addr, window_size);
(void __iomem *)ioremap(window_addr, window_size);
mymtd = do_map_probe("cfi_probe", &pb1550_map); mymtd = do_map_probe("cfi_probe", &pb1550_map);
if (!mymtd) return -ENXIO; if (!mymtd) return -ENXIO;
mymtd->owner = THIS_MODULE; mymtd->owner = THIS_MODULE;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* (C) 2001 Pete Popov <ppopov@mvista.com> * (C) 2001 Pete Popov <ppopov@mvista.com>
* *
* $Id: pb1xxx-flash.c,v 1.13 2004/09/26 07:33:01 ppopov Exp $ * $Id: pb1xxx-flash.c,v 1.14 2004/11/04 13:24:15 gleixner Exp $
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -149,7 +149,7 @@ int __init pb1xxx_mtd_init(void) ...@@ -149,7 +149,7 @@ int __init pb1xxx_mtd_init(void)
*/ */
printk(KERN_NOTICE "Pb1xxx flash: probing %d-bit flash bus\n", printk(KERN_NOTICE "Pb1xxx flash: probing %d-bit flash bus\n",
BUSWIDTH*8); BUSWIDTH*8);
pb1xxx_mtd_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE); pb1xxx_mtd_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
simple_map_init(&pb1xxx_mtd_map); simple_map_init(&pb1xxx_mtd_map);
......
/* /*
* $Id: physmap.c,v 1.35 2004/09/16 23:27:13 gleixner Exp $ * $Id: physmap.c,v 1.36 2004/11/04 13:24:15 gleixner Exp $
* *
* Normal mappings of chips in physical memory * Normal mappings of chips in physical memory
* *
...@@ -51,7 +51,7 @@ static int __init init_physmap(void) ...@@ -51,7 +51,7 @@ static int __init init_physmap(void)
const char **type; const char **type;
printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys); printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys);
physmap_map.virt = (void __iomem *)ioremap(physmap_map.phys, physmap_map.size); physmap_map.virt = ioremap(physmap_map.phys, physmap_map.size);
if (!physmap_map.virt) { if (!physmap_map.virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
......
/* /*
* $Id: redwood.c,v 1.9 2004/09/16 23:27:13 gleixner Exp $ * $Id: redwood.c,v 1.10 2004/11/04 13:24:15 gleixner Exp $
* *
* drivers/mtd/maps/redwood.c * drivers/mtd/maps/redwood.c
* *
...@@ -131,8 +131,7 @@ int __init init_redwood_flash(void) ...@@ -131,8 +131,7 @@ int __init init_redwood_flash(void)
printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n", printk(KERN_NOTICE "redwood: flash mapping: %x at %x\n",
WINDOW_SIZE, WINDOW_ADDR); WINDOW_SIZE, WINDOW_ADDR);
redwood_flash_map.virt = redwood_flash_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
(void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!redwood_flash_map.virt) { if (!redwood_flash_map.virt) {
printk("init_redwood_flash: failed to ioremap\n"); printk("init_redwood_flash: failed to ioremap\n");
......
/* /*
* $Id: rpxlite.c,v 1.21 2004/09/16 23:27:13 gleixner Exp $ * $Id: rpxlite.c,v 1.22 2004/11/04 13:24:15 gleixner Exp $
* *
* Handle mapping of the flash on the RPX Lite and CLLF boards * Handle mapping of the flash on the RPX Lite and CLLF boards
*/ */
...@@ -28,7 +28,7 @@ static struct map_info rpxlite_map = { ...@@ -28,7 +28,7 @@ static struct map_info rpxlite_map = {
int __init init_rpxlite(void) int __init init_rpxlite(void)
{ {
printk(KERN_NOTICE "RPX Lite or CLLF flash device: %x at %x\n", WINDOW_SIZE*4, WINDOW_ADDR); printk(KERN_NOTICE "RPX Lite or CLLF flash device: %x at %x\n", WINDOW_SIZE*4, WINDOW_ADDR);
rpxlite_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4); rpxlite_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
if (!rpxlite_map.virt) { if (!rpxlite_map.virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
$Id: sbc_gxx.c,v 1.30 2004/09/16 23:27:14 gleixner Exp $ $Id: sbc_gxx.c,v 1.31 2004/11/04 13:24:15 gleixner Exp $
The SBC-MediaGX / SBC-GXx has up to 16 MiB of The SBC-MediaGX / SBC-GXx has up to 16 MiB of
Intel StrataFlash (28F320/28F640) in x8 mode. Intel StrataFlash (28F320/28F640) in x8 mode.
...@@ -195,7 +195,7 @@ static void cleanup_sbc_gxx(void) ...@@ -195,7 +195,7 @@ static void cleanup_sbc_gxx(void)
int __init init_sbc_gxx(void) int __init init_sbc_gxx(void)
{ {
iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH); iomapadr = ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) { if (!iomapadr) {
printk( KERN_ERR"%s: failed to ioremap memory region\n", printk( KERN_ERR"%s: failed to ioremap memory region\n",
sbc_gxx_map.name ); sbc_gxx_map.name );
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
* *
* $Id: sc520cdp.c,v 1.17 2004/09/16 23:27:14 gleixner Exp $ * $Id: sc520cdp.c,v 1.18 2004/11/04 13:24:15 gleixner Exp $
* *
* *
* The SC520CDP is an evaluation board for the Elan SC520 processor available * The SC520CDP is an evaluation board for the Elan SC520 processor available
...@@ -241,7 +241,7 @@ static int __init init_sc520cdp(void) ...@@ -241,7 +241,7 @@ static int __init init_sc520cdp(void)
printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n", printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n",
sc520cdp_map[i].size, sc520cdp_map[i].phys); sc520cdp_map[i].size, sc520cdp_map[i].phys);
sc520cdp_map[i].virt = (void __iomem *)ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size); sc520cdp_map[i].virt = ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size);
if (!sc520cdp_map[i].virt) { if (!sc520cdp_map[i].virt) {
printk("Failed to ioremap_nocache\n"); printk("Failed to ioremap_nocache\n");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
$Id: scx200_docflash.c,v 1.7 2004/09/16 23:27:14 gleixner Exp $ $Id: scx200_docflash.c,v 1.8 2004/11/04 13:24:15 gleixner Exp $
National Semiconductor SCx200 flash mapped with DOCCS National Semiconductor SCx200 flash mapped with DOCCS
*/ */
...@@ -180,7 +180,7 @@ int __init init_scx200_docflash(void) ...@@ -180,7 +180,7 @@ int __init init_scx200_docflash(void)
simple_map_init(&scx200_docflash_map); simple_map_init(&scx200_docflash_map);
scx200_docflash_map.phys = docmem.start; scx200_docflash_map.phys = docmem.start;
scx200_docflash_map.virt = (void __iomem *)ioremap(docmem.start, scx200_docflash_map.size); scx200_docflash_map.virt = ioremap(docmem.start, scx200_docflash_map.size);
if (!scx200_docflash_map.virt) { if (!scx200_docflash_map.virt) {
printk(KERN_ERR NAME ": failed to ioremap the flash\n"); printk(KERN_ERR NAME ": failed to ioremap the flash\n");
release_resource(&docmem); release_resource(&docmem);
......
/* $Id: sun_uflash.c,v 1.10 2004/09/16 23:27:14 gleixner Exp $ /* $Id: sun_uflash.c,v 1.11 2004/11/04 13:24:15 gleixner Exp $
* *
* sun_uflash - Driver implementation for user-programmable flash * sun_uflash - Driver implementation for user-programmable flash
* present on many Sun Microsystems SME boardsets. * present on many Sun Microsystems SME boardsets.
...@@ -96,8 +96,7 @@ int uflash_devinit(struct linux_ebus_device* edev) ...@@ -96,8 +96,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
pdev->map.name = pdev->name; pdev->map.name = pdev->name;
} }
pdev->map.phys = edev->resource[0].start; pdev->map.phys = edev->resource[0].start;
pdev->map.virt = pdev->map.virt = ioremap_nocache(edev->resource[0].start, pdev->map.size);
(void __iomem *)ioremap_nocache(edev->resource[0].start, pdev->map.size);
if(0 == pdev->map.virt) { if(0 == pdev->map.virt) {
printk("%s: failed to map device\n", __FUNCTION__); printk("%s: failed to map device\n", __FUNCTION__);
kfree(pdev->name); kfree(pdev->name);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Handle mapping of the flash memory access routines * Handle mapping of the flash memory access routines
* on TQM8xxL based devices. * on TQM8xxL based devices.
* *
* $Id: tqm8xxl.c,v 1.11 2004/07/12 21:59:45 dwmw2 Exp $ * $Id: tqm8xxl.c,v 1.13 2004/10/20 22:21:53 dwmw2 Exp $
* *
* based on rpxlite.c * based on rpxlite.c
* *
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
* *
* $Id: uclinux.c,v 1.8 2004/09/16 23:27:14 gleixner Exp $ * $Id: uclinux.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $
*/ */
/****************************************************************************/ /****************************************************************************/
...@@ -69,8 +69,7 @@ int __init uclinux_mtd_init(void) ...@@ -69,8 +69,7 @@ int __init uclinux_mtd_init(void)
printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n", printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
(int) mapp->map_priv_2, (int) mapp->size); (int) mapp->map_priv_2, (int) mapp->size);
mapp->virt = (void __iomem *) mapp->virt = ioremap_nocache(mapp->phys, mapp->size);
ioremap_nocache(mapp->phys, mapp->size);
if (mapp->virt == 0) { if (mapp->virt == 0) {
printk("uclinux[mtd]: ioremap_nocache() failed\n"); printk("uclinux[mtd]: ioremap_nocache() failed\n");
......
/* /*
* $Id: wr_sbc82xx_flash.c,v 1.6 2004/09/16 23:27:14 gleixner Exp $ * $Id: wr_sbc82xx_flash.c,v 1.7 2004/11/04 13:24:15 gleixner Exp $
* *
* Map for flash chips on Wind River PowerQUICC II SBC82xx board. * Map for flash chips on Wind River PowerQUICC II SBC82xx board.
* *
...@@ -116,7 +116,7 @@ int __init init_sbc82xx_flash(void) ...@@ -116,7 +116,7 @@ int __init init_sbc82xx_flash(void)
} }
printk(" at %08lx)\n", sbc82xx_flash_map[i].phys); printk(" at %08lx)\n", sbc82xx_flash_map[i].phys);
sbc82xx_flash_map[i].virt = (void __iomem *)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size); sbc82xx_flash_map[i].virt = ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size);
if (!sbc82xx_flash_map[i].virt) { if (!sbc82xx_flash_map[i].virt) {
printk("Failed to ioremap\n"); printk("Failed to ioremap\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment