linux-2.4.6-pre8/drivers/mtd/nand/spia.c: undefined symbols

Adam J. Richter adam at yggdrasil.com
Tue Jul 3 11:53:00 EDT 2001


>David has fixed this and it is in the MTD CVS now.
[...]
>I have filled in the #define values and placed the new 'spia.c' into
>the MTD CVS. I added comments for how those various values should be
>defined. [...]

	Sounds good.  Thanks.

	By the way, here is a hand editted patch that allows those
parameters to be modified as module or kernel arguments.  I don't
know if it's worthwhile or not.  Feel free to apply or discard as
you see fit.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam at yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

--- linux-2.4.6-pre9/drivers/mtd/nand/spia.c	Tue Jul  3 07:02:32 2001
+++ linux/drivers/mtd/nand/spia.c	Tue Jul  3 08:28:38 2001
@@ -22,6 +22,23 @@
 #include <linux/mtd/partitions.h>
 #include <asm/io.h>
 
+/* Replace these with sensible values if you want defaults that will
+   work without extra kernel arguments. */
+static int spia_io_base = SPIA_IO_BASE;
+static int spia_fio_base = SPIA_FIO_BASE;
+static int spia_pedr = SPIA_PEDR;
+static int spia_peddr = SPIA_PEDDR;
+
+MODULE_PARM(spia_io_base, "i");
+MODULE_PARM(spia_fio_base, "i");
+MODULE_PARM(spia_pedr, "i");
+MODULE_PARM(spia_peddr, "i");
+
+__setup("spia_io_base=",spia_io_base);
+__setup("spia_fio_base=",spia_fio_base);
+__setup("spia_pedr=",spia_pedr);
+__setup("spia_peddr=",spia_peddr);
+
 /*
  * MTD structure for SPIA board
  */
@@ -77,11 +112,11 @@
 	 * Set GPIO Port E control register so that the pins are configured
 	 * to be outputs for controlling the NAND flash.
 	 */
-	(*(volatile unsigned char *) (IO_BASE + PEDDR)) = 0x07;
+	(*(volatile unsigned char *) (spia_io_base + spia_peddr)) = 0x07;
 
 	/* Set address of NAND IO lines */
-	this->IO_ADDR = FIO_BASE;
-	this->CTRL_ADDR = IO_BASE + PEDR;
+	this->IO_ADDR = spia_fio_base;
+	this->CTRL_ADDR = spia_io_base + spia_pedr;
 	this->CLE = 0x01;
 	this->ALE = 0x02;
 	this->NCE = 0x04;




More information about the linux-mtd mailing list