summaryrefslogtreecommitdiffstats
path: root/uClinux-2.4.20-uc1/drivers/block/blkmem.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2011-03-18 19:56:30 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2011-03-18 19:56:30 (GMT)
commitb10d9039a678f38ed48f4cf032c6b3bc82848594 (patch)
treefb0f35237b91b33d0694b8213d89cef0e84a80b8 /uClinux-2.4.20-uc1/drivers/block/blkmem.c
parent569556c4a762771f01d767db95ad18966cedd2f7 (diff)
downloadopenipcam-b10d9039a678f38ed48f4cf032c6b3bc82848594.zip
openipcam-b10d9039a678f38ed48f4cf032c6b3bc82848594.tar.gz
openipcam-b10d9039a678f38ed48f4cf032c6b3bc82848594.tar.bz2
Winbond flash support.
Diffstat (limited to 'uClinux-2.4.20-uc1/drivers/block/blkmem.c')
-rw-r--r--uClinux-2.4.20-uc1/drivers/block/blkmem.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/uClinux-2.4.20-uc1/drivers/block/blkmem.c b/uClinux-2.4.20-uc1/drivers/block/blkmem.c
index 27c506f..a71c55f 100644
--- a/uClinux-2.4.20-uc1/drivers/block/blkmem.c
+++ b/uClinux-2.4.20-uc1/drivers/block/blkmem.c
@@ -220,6 +220,14 @@ extern char __romfs_start[];
#define FIXED_ROMARRAY __romfs_start
#endif
+#ifdef CONFIG_ARCH_WINBOND
+#ifndef ROMFS_BASE
+#define FIXED_ROMARRAY (char *)0x700000
+#else
+#define FIXED_ROMARRAY (char *)ROMFS_BASE
+#endif
+#endif
+
/******* END OF BOARD-SPECIFIC CONFIGURATION ************/
/* Simple romfs, at internal, cat on the end of kernel, or seperate fixed adderess romfs. */
@@ -2799,6 +2807,16 @@ int __init blkmem_init( void )
#endif
for(i=0;i<arenas;i++) {
+#ifdef CONFIG_WBFLASH //lsshi 2005-8-31 04:47
+ if(i==0) {
+#ifndef ROMFS_BASE
+ arena[i].address = 0x700000; //GetImgAddr(0x700000);
+#else
+ arena[i].address = ROMFS_BASE;
+#endif
+ }
+#endif
+
if (arena[i].length == -1)
arena[i].length = ntohl(*(volatile unsigned long *)(arena[i].address+8));
blkmem_blocksizes[i] = 1024;