/* (C) 1999 Machine Vision Holdings, Inc. */
/* (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> */
-/* $Id: docprobe.c,v 1.44 2005/01/05 12:40:36 dwmw2 Exp $ */
+/* $Id: docprobe.c,v 1.43 2004/11/16 18:29:01 dwmw2 Exp $ */
static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;
-module_param(doc_config_location, ulong, 0);
+MODULE_PARM(doc_config_location, "l");
MODULE_PARM_DESC(doc_config_location, "Physical memory address at which to probe for DiskOnChip");
static unsigned long __initdata doc_locations[] = {
/* doccheck: Probe a given memory window to see if there's a DiskOnChip present */
-static inline int __init doccheck(void __iomem *potential, unsigned long physadr)
+static inline int __init doccheck(unsigned long potential, unsigned long physadr)
{
- void __iomem *window=potential;
+ unsigned long window=potential;
unsigned char tmp, tmpb, tmpc, ChipID;
#ifndef DOC_PASSIVE_PROBE
unsigned char tmp2;
static void __init DoC_Probe(unsigned long physadr)
{
- void __iomem *docptr;
+ unsigned long docptr;
struct DiskOnChip *this;
struct mtd_info *mtd;
int ChipID;
char *im_modname = NULL;
void (*initroutine)(struct mtd_info *) = NULL;
- docptr = ioremap(physadr, DOC_IOREMAP_LEN);
+ docptr = (unsigned long)ioremap(physadr, DOC_IOREMAP_LEN);
if (!docptr)
return;
if (ChipID == DOC_ChipID_Doc2kTSOP) {
/* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */
printk(KERN_NOTICE "Refusing to drive DiskOnChip 2000 TSOP until Bad Block Table is correctly supported by INFTL\n");
- iounmap(docptr);
+ iounmap((void *)docptr);
return;
}
docfound = 1;
if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
- iounmap(docptr);
+ iounmap((void *)docptr);
return;
}
memset((char *)this, 0, sizeof(struct DiskOnChip));
mtd->priv = this;
- this->virtadr = docptr;
+ this->virtadr = (void __iomem *)docptr;
this->physadr = physadr;
this->ChipID = ChipID;
sprintf(namebuf, "with ChipID %2.2X", ChipID);
printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr);
kfree(mtd);
}
- iounmap(docptr);
+ iounmap((void *)docptr);
}