Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Fixes to MTD flash driver on AMD Alchemy db1100 board
@ 2005-02-21  5:01 Josh Green
  2005-02-21  5:23 ` Pete Popov
  2005-02-21 10:44 ` Ulrich Eckhardt
  0 siblings, 2 replies; 8+ messages in thread
From: Josh Green @ 2005-02-21  5:01 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 2656 bytes --]

Hello, I found a couple compile problems with the
drivers/mtd/maps/db1x00-flash.c MTD driver.  I'm using linux-mips CVS
from a few weeks back, corresponding to 2.6.11rc2.  I noticed some
recent CVS traffic in regards to this driver, but I didn't see them in
cvsweb on the linux-mips site.  My apologies if this is something that
has already been reported.  Fixes in the patch below:

- Specify proper paths for #include of au1000.h and db1x00.h
- Cast return value of ioremap to (void __iomem *) to get rid of warning
concerning conversion of integer to pointer
- Setup DB1X00_BOTH_BANKS, DB1X00_BOOT_ONLY, and DB1X00_USER_ONLY
defines in db1x00.h (used pb1550.h as an example) since they seemed to
be missing which was causing the following to be triggered:

#error MTD_DB1X00 define combo error /* should never happen */

I can see the partitions in /dev/mtd now, but I have not thoroughly
tested it yet to see if there are any other problems.

Best regards,
	Josh Green


---------------


diff -ruN a/drivers/mtd/maps/db1x00-flash.c b/drivers/mtd/maps/db1x00-flash.c
--- a/drivers/mtd/maps/db1x00-flash.c	2005-02-20 20:29:30.268844944 -0800
+++ b/drivers/mtd/maps/db1x00-flash.c	2005-02-20 20:29:36.025969728 -0800
@@ -18,8 +18,8 @@
 #include <linux/mtd/partitions.h>
 
 #include <asm/io.h>
-#include <asm/au1000.h>
-#include <asm/db1x00.h>
+#include <asm/mach-au1x00/au1000.h>
+#include <asm/mach-db1x00/db1x00.h>
 
 #ifdef 	DEBUG_RW
 #define	DBG(x...)	printk(x)
@@ -192,7 +192,7 @@
 	 */
 	printk(KERN_NOTICE "Db1xxx flash: probing %d-bit flash bus\n", 
 			db1xxx_mtd_map.bankwidth*8);
-	db1xxx_mtd_map.virt = (unsigned long)ioremap(window_addr, window_size);
+	db1xxx_mtd_map.virt = (void __iomem *)ioremap(window_addr, window_size);
 	db1xxx_mtd = do_map_probe("cfi_probe", &db1xxx_mtd_map);
 	if (!db1xxx_mtd) return -ENXIO;
 	db1xxx_mtd->owner = THIS_MODULE;
diff -ruN a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h
--- a/include/asm-mips/mach-db1x00/db1x00.h	2005-02-20 20:30:51.710463936 -0800
+++ b/include/asm-mips/mach-db1x00/db1x00.h	2005-02-20 20:31:00.671101712 -0800
@@ -134,6 +134,14 @@
 #define SET_VCC_VPP(VCC, VPP, SLOT)\
 	((((VCC)<<2) | ((VPP)<<0)) << ((SLOT)*8))
 
+#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
+
 /* SD controller macros */
 /*
  * Detect card.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-02-27 22:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-21  5:01 Fixes to MTD flash driver on AMD Alchemy db1100 board Josh Green
2005-02-21  5:23 ` Pete Popov
2005-02-21 10:44 ` Ulrich Eckhardt
2005-02-21 23:57   ` Josh Green
2005-02-22  6:06     ` Josh Green
2005-02-22  7:25       ` Pete Popov
2005-02-22 15:32         ` Ulrich Eckhardt
2005-02-26 22:04           ` Pete Popov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox