50c50 < #define MAX_CHIPS 2 --- > #define MAX_CHIPS 4 54a55,56 > #define MEM_NON_CACHEABLE (0x00000000) > 81c83,84 < #include --- > > //#include 154a158,163 > enum { ManufacturerFujitsu = 0x0004, > M29LV160T = 0x22C4, > M29LV160B = 0x2249 > }; > > 196a206,210 > unsigned short v1,v2; > v1=*((volatile unsigned short *)(flashStart)); > v2=*((volatile unsigned short *)(flashStart)); > v1&=0x4040; > v2&=0x4040; 198,199c212,213 < return((*flashStart & D6_MASK) != < (*flashStart & D6_MASK)); --- > //return((*flashStart & 0x0040) != (*flashStart & 0x0040)); > return (v1!=v2); 556,557c570,576 < chips[0].start = (unsigned char *)(MEM_CSE0_START | MEM_NON_CACHEABLE); < chips[1].start = (unsigned char *)(MEM_CSE1_START | MEM_NON_CACHEABLE); --- > // chips[0].start = (unsigned char *)(MEM_CSE0_START | MEM_NON_CACHEABLE); > // chips[1].start = (unsigned char *)(MEM_CSE1_START | MEM_NON_CACHEABLE); > > chips[0].start = (unsigned char *)(0xFF800000); > chips[1].start = (unsigned char *)(0xFFA00000); > chips[2].start = (unsigned char *)(0xFFC00000); > chips[3].start = (unsigned char *)(0xFFE00000); 563a583,586 > #ifdef FLASH_VERBOSE > safe_printk("Chip[%d]->",i); > #endif > 582a606 > manu == ManufacturerFujitsu || 617a642 > // case M29LV160T: 631a657 > case M29LV160B: 756a783 > 758d784 < 768c794 < /* Init erasing of the number of sectors needed */ --- > while(erasedSize < size) { 769a796 > /* Init erasing of the number of sectors needed */ 776d802 < while(erasedSize < size) { 778a805,810 > while (flash_is_busy(flashStart)) { > current->state = TASK_INTERRUPTIBLE; > current->timeout = jiffies + HZ / 2; > schedule(); > } > 916a949 > unsigned short valout; 966a1000 > /* 969c1003,1017 < != (*flashStart & D6_MASK)) --- > != (*flashStart & D6_MASK)) ; > */ > do { > valout=*((volatile unsigned short *)(programAddress)); > if (((valout ^ *theData) & 0x80) == 0) { > break; > } > } while ((valout & 0x20) == 0x0000); > if (((valout ^ *theData) & 0x80) != 0) { > valout=*((volatile unsigned short *)(programAddress)); > if (((valout ^ *theData) & 0x80) != 0) { > ;//result = -1; > } > } > 978,985c1026,1034 < break; < < printk("Flash: verify error 0x%p. " < "(flash_write() 1)\n", < programAddress); < printk("*programAddress = 0x%04x, " < "*theData = 0x%04x\n", < *programAddress, *theData); --- > break; > else{ > printk("Flash: verify error 0x%p. " > "(flash_write() 1)\n", > programAddress); > printk("*programAddress = 0x%04x, " > "*theData = 0x%04x\n", > *programAddress, *theData); > } 1018a1068 > /* 1021a1072,1086 > */ > > do { > valout=*((volatile unsigned short *)(programAddress)); > if (((valout ^ *(flashptr) last_byte) & 0x80) == 0) { > break; > } > } while ((valout & 0x20) == 0x0000); > if (((valout ^ *(flashptr) last_byte) & 0x80) != 0) { > valout=*((volatile unsigned short *)(programAddress)); > if (((valout ^ *(flashptr) last_byte) & 0x80) != 0) { > ;//result = -1; > } > } > 1150a1216 > int i; 1164c1230 < partitions[0].size = chips[0].sectorsize; --- > partitions[0].size = 0x100000; 1172c1238,1246 < bootb = (struct bootblock *)partitions[0].start; --- > partitions[1].chip = &chips[0]; > partitions[1].start = partitions[0].start+partitions[0].size; > partitions[1].size = 0x100000-0x10000; > partitions[1].flags = 0; /* FIXME */ > flash_sizes[FLASH_MINOR+1] = > partitions[1].size >> BLOCK_SIZE_BITS; > printk(pmsg, 1, partitions[1].start, partitions[1].size); > > pidx=2; 1189a1264,1266 > > #if 0 > bootb = (struct bootblock *)partitions[0].start; 1246c1323,1324 < } --- > > #endif } 1249a1328,1340 > for(i=1;i<4;i++) > if(chips[i].isValid) { > partitions[i+1].chip = &chips[i]; > partitions[i+1].start = chips[i].start; > partitions[i+1].size = chips[i].size; > partitions[i+1].flags = 0; /* FIXME */ > flash_sizes[FLASH_MINOR+i+1] = > partitions[i+1].size >> BLOCK_SIZE_BITS; > printk(pmsg, i+1, partitions[i+1].start, partitions[i+1].size); > pidx++; > } > > 1304a1396,1397 > flash_probe(); >