mtd/drivers/mtd/maps db1x00-flash.c,1.4,1.5

ppopov at infradead.org ppopov at infradead.org
Sat Sep 18 19:22:38 EDT 2004


Update of /home/cvs/mtd/drivers/mtd/maps
In directory phoenix.infradead.org:/tmp/cvs-serv25090/drivers/mtd/maps

Modified Files:
	db1x00-flash.c 
Log Message:
Removed .h dependencies so the driver works on 2.4 and 2.6.


Index: db1x00-flash.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/db1x00-flash.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- db1x00-flash.c	16 Sep 2004 23:27:12 -0000	1.4
+++ db1x00-flash.c	18 Sep 2004 23:22:35 -0000	1.5
@@ -3,7 +3,7 @@
  * 
  * $Id$
  *
- * (C) 2003 Pete Popov <ppopov at pacbell.net>
+ * (C) 2003 Pete Popov <ppopov at embeddedalley.com>
  * 
  */
 
@@ -18,8 +18,6 @@
 #include <linux/mtd/partitions.h>
 
 #include <asm/io.h>
-#include <asm/au1000.h>
-#include <asm/db1x00.h>
 
 #ifdef 	DEBUG_RW
 #define	DBG(x...)	printk(x)
@@ -27,11 +25,20 @@
 #define	DBG(x...)	
 #endif
 
+/* MTD CONFIG OPTIONS */
+#if defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
+#define DB1X00_BOTH_BANKS
+#elif defined(CONFIG_MTD_DB1X00_BOOT) && !defined(CONFIG_MTD_DB1X00_USER)
+#define DB1X00_BOOT_ONLY
+#elif !defined(CONFIG_MTD_DB1X00_BOOT) && defined(CONFIG_MTD_DB1X00_USER)
+#define DB1X00_USER_ONLY
+#endif
+
 static unsigned long window_addr;
 static unsigned long window_size;
 static unsigned long flash_size;
 
-static BCSR * const bcsr = (BCSR *)0xAE000000;
+static unsigned short *bcsr = (unsigned short *)0xAE000000;
 static unsigned char flash_bankwidth = 4;
 
 /* 
@@ -113,7 +120,7 @@
  */
 int setup_flash_params(void)
 {
-	switch ((bcsr->status >> 14) & 0x3) {
+	switch ((bcsr[2] >> 14) & 0x3) {
 		case 0: /* 64Mbit devices */
 			flash_size = 0x800000; /* 8MB per part */
 #if defined(DB1X00_BOTH_BANKS)





More information about the linux-mtd-cvs mailing list