public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* (no subject)
@ 2002-03-27  8:01 Jim Zeus
  2002-03-27  8:06 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Jim Zeus @ 2002-03-27  8:01 UTC (permalink / raw)
  To: David  Woodhouse; +Cc: all in MTD mailinglist

Hi,David
    Can you tell me why only my mtd char device with even minor deivce number works? and there is no such thing happened on my mtd block device.

and I find that in drivers/mtd/mtdchar.c/mtd_open there is a line :
	int devnum = minor >> 1;
I think if this is the reason, the odd mtd char devs should works just like the even devs, 
that means the dev1 should be the same thing as dev0,and dev3==dev2... isnt it?

Thanks

Jim Zeus

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2009-06-01 11:20 Mnl
  0 siblings, 0 replies; 61+ messages in thread
From: Mnl @ 2009-06-01 11:20 UTC (permalink / raw)



-- 
You are among the winners of the National Lottery.(£1,000,000.00GBP) Mr.
Michael Smith(mnldepartment@9.cn ) 1. Full Names: ………2.
Gender:…….3. Age:……..4.Contact Address:……5. Country of
Residence:…………6. Nationality:…………7.
Occupation:…….8.Telephone Mobile :…………….9.Choose your claims
option.(1)Courier Delivery (2)Bank Transfer

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2009-05-18 15:18 Mnl
  0 siblings, 0 replies; 61+ messages in thread
From: Mnl @ 2009-05-18 15:18 UTC (permalink / raw)


Hello,

£1,000,000.00 Pounds is now yours. Congrats... You have won.

Send your information to Mr. Michael Smith. +44-704-573-6915 on
mrs.jeniferfox@9.cn  to help you process your claims.
Provide your Name, Address, Age, Phone Number, Occupation.

Mrs. Jenifer Fox
Monday Lotto

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2009-05-18 12:20 Mnl
  0 siblings, 0 replies; 61+ messages in thread
From: Mnl @ 2009-05-18 12:20 UTC (permalink / raw)


Hello,

£1,000,000.00 Pounds is now yours. Congrats... You have won.

Send your information to Mr. Michael Smith. +44-704-573-6915 on
mrs.jeniferfox@9.cn  to help you process your claims.
Provide your Name, Address, Age, Phone Number, Occupation.

Mrs. Jenifer Fox
Monday Lotto

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2006-03-10 13:57 Selmeci, Tamas
  0 siblings, 0 replies; 61+ messages in thread
From: Selmeci, Tamas @ 2006-03-10 13:57 UTC (permalink / raw)
  To: linux-mtd

> Yes it possible,
> You can use cmdpartion if it is present in the kernel, or static
partion.

Maybe this will be a silly question, but how can I create those
partitions on my SMC using PC-based Linux if I have a card reader? Is
cmdpartition for this purpose? (using vivi on the developer board I can
create partitions, but vivi is in close relationship with BonFS and it
keeps on creating BonFS for me - probably I should modify the
sources...)

And does anybody know why should BonFS be used if partitioning can be
solved without that too?

Bye
--
Tamas Selmeci
Siemens PSE HU
Tel.:    +36-1-471-3861
Email:   tamas.selmeci@siemens.com
Address: H-1143 Budapest, Gizella ut 51-59 

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-10-20 16:05 Korolev, Alexey
  0 siblings, 0 replies; 61+ messages in thread
From: Korolev, Alexey @ 2005-10-20 16:05 UTC (permalink / raw)
  To: linux-mtd

Nicolas,

Selecting of only one CFI buswidth and chip interleave helped to resolve
the halting issue.
cfi_cmdset001.o doesn't contain any reference to __udivsi3 __divsi3 and
__ashrdi3 in data segment.
I made several tests no halts or kernel panics got appeared. 

P/S 
1. I also tried to relocate some /arch/arm/lib code into RAM. It was
very bad move because it caused kernel Data abort at the very beginning
of kernel bootup process. Looks some code uses __divsi3 operations
before memory got initialized.
2. I have a question about XIP and icache 
	a. Execute kernel instructions from FLASH. Start filling of
icache pages by instructions from FLASH.
	b. Do_write_buffer call. Switching to READ_STATUS. 
	c. Finish filling of icache pages by instructions from FLASH.
(Part of icache is corrupted).
	d. Return from Do_write_buffer 
	e. Execute instruction from FLASH which is presorted in icache.
-> Data abort or kernel panic.

Is it possible to face the following scenario? 

Thanks,
Alexey

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-09-15 13:22 Konstantin Kletschke
  0 siblings, 0 replies; 61+ messages in thread
From: Konstantin Kletschke @ 2005-09-15 13:22 UTC (permalink / raw)
  To: linux-mtd


Hi Folks!

I realize actuall on 2.6.13 flash_unlock is not functional anymore,
have I missed something? I use it with cfi_cmdset_0001.c quite often
on 2.6.12. Version of flash_unlock is current cvs...

# strace flash_unlock /dev/mtd3
execve("/usr/sbin/flash_unlock", ["flash_unlock", "/dev/mtd3"], [/* 16 vars */]) = 0
old_mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40005000
readlink("/lib/ld-uClibc.so.0", "ld-uClibc-0.9.27.so", 1024) = 19
stat("/etc/ld.so.cache", 0xbeb236a0)    = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 4
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(4, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0h\22\0\000"..., 4096) = 4096
old_mmap(NULL, 61440, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000d000
old_mmap(0x4000d000, 25188, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x4000d000
old_mmap(0x4001b000, 1032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x6000) = 0x4001b000
close(4)                                = 0
munmap(0x40006000, 4096)                = 0
open("/lib/libc.so.0", O_RDONLY)        = 4
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40006000
read(4, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\220\356\0"..., 4096) = 4096
old_mmap(NULL, 368640, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001c000
old_mmap(0x4001c000, 309464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x4001c000
old_mmap(0x40070000, 5568, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x4c000) = 0x40070000
old_mmap(0x40072000, 15824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40072000
close(4)                                = 0
mprotect(0x4001c000, 309464, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
munmap(0x40006000, 4096)                = 0
mprotect(0x4001c000, 309464, PROT_READ|PROT_EXEC) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x11000
brk(0x12000)                            = 0x12000
open("/dev/mtd3", O_RDWR)               = 4
ioctl(4, MTRRIOC_SET_ENTRY, 0xbeb23cfc) = 0
ioctl(4, MTRRIOC_SET_PAGE_ENTRY, 0xbeb23cf4) = -1071198208
write(2, "Could not unlock MTD device: ", 29Could not unlock MTD device: ) = 29
write(2, "/dev/mtd3", 9/dev/mtd3)                = 9
write(2, "\n", 1
)                       = 1
close(4)                                = 0
_exit(1)                                = ?

Konsti

-- 
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E  A080 1E69 3FDA EF62 FCEF

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-07-23  4:50 Mr.Derrick Tanner.
  0 siblings, 0 replies; 61+ messages in thread
From: Mr.Derrick Tanner. @ 2005-07-23  4:50 UTC (permalink / raw)




^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-07-18 12:06 murasfdg sjhfsd
  0 siblings, 0 replies; 61+ messages in thread
From: murasfdg sjhfsd @ 2005-07-18 12:06 UTC (permalink / raw)
  To: linux-mtd

 dear my friend
    i want details about ultrix file system and how optimizing unix file operations

thanks my friend bye-bye


-- 
India.com free e-mail - www.india.com. 
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-07-03  2:47 Amit Sharma
  2005-07-03 12:04 ` Artem B. Bityuckiy
  0 siblings, 1 reply; 61+ messages in thread
From: Amit Sharma @ 2005-07-03  2:47 UTC (permalink / raw)
  To: linux-mtd

Hi 
I have problem in MTD driver with jFFS2 mounting on NAND device.During 
Cp -f /tmp/jffs2.image /dev/mtd/o
I get error
"page not aligned "

can any one help me in this problem

Thanks
Amit

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2005-06-21 14:48 David L
  0 siblings, 0 replies; 61+ messages in thread
From: David L @ 2005-06-21 14:48 UTC (permalink / raw)
  To: linux-mtd

Hi,

I'm using a Nand flash driver on a Compulab board with a proprietary driver 
provided by Compulab.  I'd like to switch to a non-proprietary driver like 
MTD for a few reasons.  But having read through the MTD documentation, I'm 
not sure we can maintain our current boot strategy if we migrate to MTD.  
Right now, we boot to DOS that comes with the board and then use loadlin to 
boot a kernel/initial ramdisk that reside on a partition of the Nand flash 
that has a DOS filesystem on it.  On the rare event that we need to change 
the kernel or initial ramdisk, we mount the DOS filesystem from Linux and 
change the file.

Is there a way to maintain this strategy if we use MTD?  I saw in the NAND 
API document that only jffs2 and YAFFS filesystems can be used with MTD.  Is 
there any way around this? (I don't care how efficient it is).  And even if 
there is a workaround that would allow us to modify files in a DOS 
filesystem from Linux, will MTD partitions be visible from DOS so that we 
can boot in the first place?

Thanks...

                    David

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2004-11-16 13:48 Artem B. Bityuckiy
  2004-11-16 13:55 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Artem B. Bityuckiy @ 2004-11-16 13:48 UTC (permalink / raw)
  To: David Woodhouse; +Cc: MTD List

Hello David,

When I create checkpoints, I read all the nodes which will be referred by 
this checkpoint and check their CRCs. This is because we must trust 
checkpoints and do not check CRCs for them on the iget() call.

When the Garbage Collector moves node, which is currently referred by an 
checkpoint inact (I mean the jffs2_garbage_collect_pristine() function), 
we have to read this node after we GC it. This is the problem. The unclean 
reboot may happed and we can not guarantee that all noted in checkpoint 
are OK. :-(

So, how do you think is it absolutely necessary to check that nodes which 
are reffered by checkpoint are OK? Is it OK if we just detect errors when 
we actually read file?

Thanks.

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2004-11-16 11:42 Artem B. Bityuckiy
  0 siblings, 0 replies; 61+ messages in thread
From: Artem B. Bityuckiy @ 2004-11-16 11:42 UTC (permalink / raw)
  To: MTD List; +Cc: David Woodhouse


David Woodhouse wrote:
> On Mon, 2004-11-15 at 11:34 +0300, Artem B. Bityuckiy wrote:
> 
>>Hello guys,
>>
>>I would be happy to know your opinions about to introduce one more 
>>32-bit field to the node_ref structure in the JFFS2. Is this really bad?
> 
> 
> Yes but if you make a really good case for it and you finish the bits
> which allow us to drop the length field we might let you get away with
> it :)
> 
It seems I've found the way how to avoid this. But I need more bits in the 
node_ref structure. The flash_offset field is already used so I have 
decided to use the next_in_ino field which is always at least 4-byte 
aligned. It is the dangerous game with adresses, but I really want to 
save memory. Do you think it is OK? (I think yes)

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: BBRAM
@ 2002-11-19 21:13 Jörn Engel
  2002-11-20  2:01 ` (no subject) Taeil Um
  0 siblings, 1 reply; 61+ messages in thread
From: Jörn Engel @ 2002-11-19 21:13 UTC (permalink / raw)
  To: Richard Brunelle; +Cc: linux-mtd

On Tue, 19 November 2002 14:40:19 -0500, Richard Brunelle wrote:
> 
> -How the parameters to SLRAM are passed?

This depends on your boot loader. For lilo, you can put this into
/etc/lilo.conf:
	append="slram=bbram,exe0000,+0x8000"

> -Is there any provision for pageable memory?

No, none. The slram driver needs absolute control over the memory
area, it uses. If the kernel mm code also uses it, e.g. hands it out
on kmalloc() calls, you're screwed.

Jörn

-- 
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-11-15 20:58 Wauviel
  0 siblings, 0 replies; 61+ messages in thread
From: Wauviel @ 2002-11-15 20:58 UTC (permalink / raw)
  To: linux-mtd-cvs

Offshore Suppliers Directory (http://www.OffshoreSuppliersDirectory.com) has just gotten better!

You know Offshore Suppliers Directory as the world's first published guide to offshore software development, services, and product suppliers. However, did you know it's a growing online B2B, buyer / supplier exchange as well?

New features for BUYERS:

* RFPs and Projects:  You can post your RFPs to all suppliers or you can select just the suppliers you want to invite after a search. 
* Offshore Resource Management System (ORMS): Nobody knows your requirements better than you.  Search for the right suppliers and invite them to respond to your RFP / Project all within ORMS! 
* Search Utilities:  Perform basic and complex searches for offshore suppliers (both companies and independent contractors) at our unique ORMS. 
* Purchase your advance copy of the Offshore Suppliers Directory at a  30% discount! Limited Time Offer!

New features for SUPPLIERS:

* Basic listings are FREE!  More comprehensive listings are available for purchase. Note: Buyers will search for suppliers by business and technology capabilities.  These fields are ONLY available with a paid listing.  If you want buyers to find you and invite you to bid on their RFP then upgrade to a 1-page or 2-page listing today. 
* Our rates have been reduced!  A 1-page listing is now only $75.00 (was $125.00) and a 2-page listing is now only $125.00 (was 200.00)! 
* Support for Independent Offshore Contractors.  Sometimes buyers just need one or two resources to support a project and now finding those individuals is simple.  It's like having Monster.com but for the offshore market! Make sure buyers find you! The cost is only $19.95 per year (that's only $0.05 per day!). 
* List your offshore company! Your company information will be available to buyers around the world in both the printed directory and the online searches. 
* We're sending FREE copies of the Offshore Suppliers Directory to key individuals at Fortune 500 companies! Make sure you have as much information as possible in the printed guide by purchasing a 1-page or 2-page listing so they choose your company as the right providers of services to meet their needs!  If you're not in the printed guide or online directory how can they select you? 
* With our Offshore Resource Management System (ORMS) you don't have to register for RFPs, the system takes care of that automatically for you when you register as a Supplier or Independent Contractor!

See us at the following sites!:

National Association of Software and Service Companies (NASSCOM): www.nasscom.org

Outsourcing Russia - All about IT Outsourcing to Russia: www.outsourcing-russia.com

Software Ireland - Ireland's leading FREE portal to the IT industry: www.softwareireland.com

 

To Your Success,

Offshore Suppliers Directory

http://www.OffshoreSuppliersDirectory.com

YOUR NAME WAS SELECTED AS A PERSON OR ORGANIZATION INVOLVED WITH TECHNOLOGY. 
WE APOLOGIZE IF THIS EMAIL IS NOT APPLICABLE TO YOU. 
THIS IS A ONE TIME SUBMISSION.  
YOU DO NOT NEED TO SUBMIT A REMOVAL REQUEST.

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-07-15 10:25 Valls Pellicer,Joan
  0 siblings, 0 replies; 61+ messages in thread
From: Valls Pellicer,Joan @ 2002-07-15 10:25 UTC (permalink / raw)
  To: 'Herman@WirelessNetworksInc.com'; +Cc: linux-mtd

On Mon, 17 Sep 2001, Herman Oosthuysen wrote: 
> Howdy, 
>
> Well, it would be horribly slow when system logs etc in /var are written
to
> flash, but in practice you can write to Flash an incredible number of
times 
> before it will become unreliable. In my experience the first thing 
> that happens with age is that the erase cycles become slower and may
increase 
> from around 500ms to as much as 15s, but the device will still work
reliably. 
> This aging happens quite quickly actually - a few hundred erase cycles and
the 
> device will be significantly slower than when new. (I have seen and fixed
many 
> erase algorithms that do not allow sufficient erase time for old parts!). 
I've been looking for this agging problem in M-Systems (like system
integrator), Toshiba and Samsung (like Flash memory manufacturers) Web pages
and I can't find any information. Only in Samsung flash FAQs I've find the
following question (and answer):
Q2. Is program/erase time deteriorated with the increase of program/erase
cycles? 
 <<...OLE_Obj...>> 
A : Samsung's NAND Flash goes through an internal qualification process with
endurance up to 1M cycles. Since NAND Flash has superior endurance to other
Flash technology, the closing of cell threshold is not noticeable until 1M
cycles. The erase time does not change at all, regardless of endurance up to
1M cycles. The program time could take a little longer or does not change. 
 <<...OLE_Obj...>> 
Samsung says that their erasing cycle typical is 2 mseg. and maximal is 3
mseg., which differs a lot of your measurements. When you said 500 mseg.,
were you talking about format operations?
Do you know if this agging problems still occurs? Does it happen with a
specific vendor or product?

Joan Valls
jvp-sice-barcelona@dragados.com

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-07-02 17:00 Roy Lauer
  0 siblings, 0 replies; 61+ messages in thread
From: Roy Lauer @ 2002-07-02 17:00 UTC (permalink / raw)
  To: linux-mtd

I'm using DOC 2000, and the latest mtd sw from the
CVS.

Following is what I get a boot time (I do NOT yet boot
from the flash):

> Using configured DiskOnChip probe address 0xf0400000
> DiskOnChip 2000 found at address 0xF0400000
> Flash chip found: Manufacturer ID: 98, Chip ID: 73
(Toshiba TH58V128DC)
> 4 flash chips found. Total DiskOnChip size: 64 MiB
> mtd: Giving out device 0 to DiskOnChip 2000
> NFTL driver: nftlcore.c $Revision: 1.86 $,
nftlmount.c $Revision: 1.28 $
> NFTL_notify_add for DiskOnChip 2000
> NFTL_setup
> NFTL: UnitSizeFactor 0x00 detected. This violates
the spec but we think we know what it means...
> Cannot calculate an NFTL geometry to match size of
0x1ed20.
> Using C:986 H:16 S:8 (== 0x1ed00 sects)
> Partition check:
>  nftla: nftla1

The main problem (which cannot be seen above) is a
delay of about 90 seconds after 
"Flash chip found: ...". The system seems to stuck and
only after a timeout 0f 90 seconds it continues 
with "4 flash chips found...". What can be the reason
for that?

Other problems are UnitSizeFactor=0x00 and the size of
0x1ed20. The driver seems to manage with that. Is this
ok?

Any help will be apreciated.

Roy


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-06-19  2:24 Áº²¨
  0 siblings, 0 replies; 61+ messages in thread
From: Áº²¨ @ 2002-06-19  2:24 UTC (permalink / raw)
  To: david; +Cc: linux-mtd

Hi,everybody
I would like to use mkfs.jffs to create a flash image I can burn into flash.

but the question is I don't know how to boot from this image.

the kernel of our system is 2.4.18 and the platform is ppc 8xx_io
series(ppc823)

How to setup jffs/mtd as the root filesystem/dev for our system?

Thanks,

   -- nielsen


 
 





--http://www.eyou.com
--Îȶ¨¿É¿¿µÄÃâ·Ñµç×ÓÐÅÏä  ÓïÒôÓʼþ  ÒÆ¶¯ÊéÇ©  ÈÕÀú·þÎñ  ÍøÂç´æ´¢...ÒÚÓÊδ¾¡

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-05-03 11:46 victor.martin
  0 siblings, 0 replies; 61+ messages in thread
From: victor.martin @ 2002-05-03 11:46 UTC (permalink / raw)
  To: linux-mtd

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]

Thanks Charles, i think an IDE flash disk should have the same behaviour than 
an IDE disk, but one of them i think it works like a flash card, without 
internal journalling, so it makes incompatible with IDE spec. because of 
accessing times to the disk. 

The problem is that i can install blkmtd module with a device

insmod blkmtd device=/dev/fd0 for example

I can see it in /proc as mtd0

I have a mtdblock 0 with major -minor 31, 0

but when i try to use it, i can't use mtd0 and mtdblock0 and i don't know what 
is wrong.

I have tried to use /dev filesystem but when i use it my kernel doesn't boot

¿What can i do?


---------------------------------------------
Sent using Endymion MailMan.

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-04-29 14:19 Jim Zeus
  0 siblings, 0 replies; 61+ messages in thread
From: Jim Zeus @ 2002-04-29 14:19 UTC (permalink / raw)
  To: all in MTD mailinglist

Hi ,folks 
 
I am reading MTD code now , and I meet some problem

in the /drivers/mtd/chips/cfi_probe.c 

	/* Check each previous chip to see if it's an alias */
	for (i=0; i<cfi->numchips; i++) {
		/* This chip should be in read mode if it's one
		   we've already touched. */
		if (qry_present(map,chips[i].start,cfi)) {
			/* Eep. This chip also had the QRY marker. 
			 * Is it an alias for the new one? */
			cfi_send_gen_cmd(0xF0, 0, chips[i].start, map, cfi, cfi->device_type, NULL);

			/* If the QRY marker goes away, it's an alias */
			if (!qry_present(map, chips[i].start, cfi)) {
				printk(KERN_DEBUG "%s: Found an alias at 0x%x for the chip at 0x%lx\n",
				       map->name, base, chips[i].start);
				return 0;

/*******I have no idea that the following query command for*******/
/**********I think it will never happen*******************/}
			/* Yes, it's actually got QRY for data. Most 
			 * unfortunate. Stick the new chip in read mode
			 * too and if it's the same, assume it's an alias. */
			/* FIXME: Use other modes to do a proper check */
			cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
			
			if (qry_present(map, base, cfi)) {
				printk(KERN_DEBUG "%s: Found an alias at 0x%x for the chip at 0x%lx\n",
				       map->name, base, chips[i].start);
				return 0;
			} 
		}
	}
	


from the code I deduce that 
1. if send the query command twice , the "QRY" will disappear.
2. if send the query command onec, the "QRY" will always be there even you read it many times.
Is my conclusion right?
I know its a stupid question to hardware engineer, but I am a software engineer:<

Any help will be appreciated.


_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-04-19  3:23 swimming_fisher
  0 siblings, 0 replies; 61+ messages in thread
From: swimming_fisher @ 2002-04-19  3:23 UTC (permalink / raw)
  To: linux-mtd

Hi,
I make a image using mkfs.jffs2 v1.17 for i386,and burn it into my Assabet under redboot.But I fail to mount it using  "mount -t jffs2 /dev/mtdblock3 /mnt".It suggests:
 "jffs2_scan_empty():Empty block at 0xxxxxxx"
 "jffs2_scan_eraseblock():Magic bitmask not found at 0xxxxxxx"

Why?Please give me some advice!

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-04-11  6:13 Jim Zeus
  0 siblings, 0 replies; 61+ messages in thread
From: Jim Zeus @ 2002-04-11  6:13 UTC (permalink / raw)
  To: David  Woodhouse; +Cc: all in MTD mailinglist

Hi, David

I try hard but still cant find the reason why there is something wrong with my jffs2, which shows the following message:

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x734d instead

there are many of those when boot the kernel.

I divde the 2 flash chips(intel strataflash 28F128J3A, 16M) into 4 partition:

0x00000000-0x00020000 : "Bootloader"
0x00020000-0x00800000 : "Kernel"
0x00800000-0x01000000 : "Rootfs"
0x01000000-0x02000000 : "JFFS2"

and I erase all the 32M flash before kernel up, then burn the bootloader into "Bootloader",burn the kernel image into "Kernel",burn the jffs2.image into "Rootfs",and "JFFS2" is reserved so I can use it after the kernel is up.

I am confused by the message , because it is OK when I use jffs, is this a bug of jffs2?

Thank you for your help

Jim Zeus

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: (no subject)
@ 2002-03-19  7:59 Jim Zeus
  0 siblings, 0 replies; 61+ messages in thread
From: Jim Zeus @ 2002-03-19  7:59 UTC (permalink / raw)
  To: David Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist

thanks!  David, I have solved the problem! Ola, Ola ,Ola ......^O^

--- David Woodhouse <dwmw2@infradead.org> wrote:
>it'll be controlled by a GPIO pin somewhere. That would be board-specific.

it doesnt controlled by a GPIO,but just like that, its be controlled by a TC(traffic controller), no introduction about it in the document. 
But finally I beat the problem.

thank you for your help very much!

Jim Zeus(survivor from the problem)

_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: (no subject)
@ 2002-03-18  7:42 Jim Zeus
  2002-03-18  8:38 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Jim Zeus @ 2002-03-18  7:42 UTC (permalink / raw)
  To: David Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist


--- David Woodhouse <dwmw2@infradead.org> wrote:
>
>zeusj@firstlinux.net said:
>> >I note you don't have a set_vpp() method. Do you need one?
>>  Sure, thanks! 
>
>Does that mean adding one actually makes it work?

aha! no , it doesnt means that, 
since I am not familiar to the intel strata flash 28f128, 
I thought you have a set_vpp() method for it and it can be transmitted to me for my file.
I think I misunderstood what you mean :)
but... I check all the doc I can find but they are all about the hardware:(so many pins...) ,do u have a set_vpp() method for 28f128? If it does, can u show me?

(disheartened)Jim Zeus 


_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: (no subject)
@ 2002-03-17 10:21 Jim Zeus
  2002-03-17 10:32 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Jim Zeus @ 2002-03-17 10:21 UTC (permalink / raw)
  To: David Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist


>Do you have the correct voltage applied to the Vpen line of the flash chip? 
>I note you don't have a set_vpp() method. Do you need one?

Sure, thanks!

>'insurance'? I expect JFFS2 to be more reliable than JFFS at this point. 
>That was, after all, most of the point in doing a complete rewrite :)

OK, I'll try it:)

and why the message show me that "Invalid ioctl 5401 (MEMGETINFO = 80204d01)
"? I find it is in the method mtd_ioctl , and its in the case "default".





_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: (no subject)
@ 2002-03-15  9:55 Jim Zeus
  2002-03-15 10:15 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Jim Zeus @ 2002-03-15  9:55 UTC (permalink / raw)
  To: David Woodhouse, David  Woodhouse; +Cc: all in MTD mailinglist

Hi, David
>Show me.

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>


#define WINDOW_ADDR 0x00000000
#define WINDOW_SIZE 0x01000000
#define BUSWIDTH 2

static struct mtd_info *mymtd;


static __u8 perseus_read8(struct map_info *map,unsigned long ofs)
{
	return __raw_readb(map->map_priv_1 + ofs);
}

static __u16 perseus_read16(struct map_info *map,unsigned long ofs)
{
	return __raw_readw(map->map_priv_1 + ofs);
}

static __u32 perseus_read32(struct map_info *map, unsigned long ofs)
{
	return __raw_readl(map->map_priv_1 + ofs);
}

static void perseus_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
{
	memcpy(to, (void *)(map->map_priv_1 + from), len);
}

static void perseus_write8(struct map_info *map, __u8 d, unsigned long adr)
{
	*(__u8 *)(map->map_priv_1 + adr) = d;
}

static void perseus_write16(struct map_info *map, __u16 d, unsigned long adr)
{
	*(__u16 *)(map->map_priv_1 + adr) = d;
}

static void perseus_write32(struct map_info *map, __u32 d, unsigned long adr)
{
	*(__u32 *)(map->map_priv_1 + adr) = d;
}

static void perseus_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
{
	memcpy((void *)(map->map_priv_1 + to), from, len);
}


static struct mtd_partition perseus_partition[]={
    { 
	    name: "Perseus Bootloader", 
	    offset: 0, 
	    size:   0x20000,
    },
    {
	   name:"Perseus Kernel",
	   offset:0x20000,
	   size:0x7e0000,
    },
    { 
	    name: "Perseus RamDisk", /////
	    offset: 0x800000,
	    size:0x800000, 
    }
};

#define NUM_PARTITIONS (sizeof(perseus_partition)/sizeof(perseus_partition[0]))


struct map_info perseus_map = {
	name: "Perseus StrataFlash map",
	size: WINDOW_SIZE,
	buswidth: BUSWIDTH,
	read8: perseus_read8,
	read16: perseus_read16,
	read32: perseus_read32,
	copy_from: perseus_copy_from,
	write8: perseus_write8,
	write16: perseus_write16,
	write32: perseus_write32,
	copy_to: perseus_copy_to,
};


static  int __init init_perseus(void)
{
	printk(KERN_NOTICE "Perseus Strataflash mapping:size %x at %x\n", WINDOW_SIZE, WINDOW_ADDR);
	perseus_map.map_priv_1 = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
	printk("ZEUS:perseus_map.map_priv_1=%x\n",perseus_map.map_priv_1);
	if (!perseus_map.map_priv_1) {
		printk("Failed to ioremap\n");
		return -EIO;
	}
	
	mymtd = do_map_probe("cfi_probe", &perseus_map);
	if (mymtd) {
		mymtd->module = THIS_MODULE;
		add_mtd_partitions( mymtd, perseus_partition, NUM_PARTITIONS );

		add_mtd_device(mymtd);
		printk("ZEUS:right end of init_perseus(I mean flash)\n");
		return 0;
	}
	
	iounmap((void *)perseus_map.map_priv_1);
	printk("ZEUS:so its the wrong end of init_perseus(flash)\n");
	return -ENXIO;

}

mod_exit_t cleanup_perseus(void)
{
	if (mymtd) {
		del_mtd_device(mymtd);
		map_destroy(mymtd);
	}
	if (perseus_map.map_priv_1) {
		iounmap((void *)perseus_map.map_priv_1);
		perseus_map.map_priv_1 = 0;
	}
}

module_init(init_perseus);
module_exit(cleanup_perseus);

>Why JFFS not JFFS2?
sure I can use jffs2 too, but for more insurance , I use jffs:)

AND, after some modification, the phenomena I showed you in last mail has been disappeared . 
now, if i use "cp somefile /dev/mtd0", it said£º

MTD_open

MTD_ioctl

Invalid ioctl 5401 (MEMGETINFO = 80204d01)

MTD_write

Chip not ready for buffer write. Xstatus = 18, status = 98

cp: write: Input/output error

MTD_close

I think I have make the mtd up,but why I cant write?
and if I "mount /dev/mtdblock0 /jffs -t jffs",the kernel tell me mount failed and  said"Invalid argument"

BTW:
in my opinion, the "mtd_info" struct should be to describe a mtd device.
the "map_info" struct should be to describe a mapping area in memory which mapping to the mtd device(?) and WINDOW_ADDR is the PA of the mtd device(in my file) and map_info.map_priv_1 is a pointer to the VA of the mtd device.
Is that right? to be honest , I am really confused by these.I cant find any documentation to explain it . 

thank you for your help!

Jim Zeus


_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2002-03-15  4:15 Jim Zeus
  2002-03-15  9:27 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Jim Zeus @ 2002-03-15  4:15 UTC (permalink / raw)
  To: David  Woodhouse; +Cc: all in MTD mailinglist

hello, David, thank you for answer my question before
now I've got other 2 questions

I've defined the CONFIG_MTD_BLOCK by choosing "Caching block device access to MTD device".I divided the flash (16 M)into 3 partitions: bootloader, kernel and jffs. and I have create several device file mtd0-mtd4(with major device number 80) and mtdblock0-mtdblock4(with major device number 31). 
now , the first problem appears
1. if I use "cat /proc/mtd" I just can find only one mtd device which is the first partition.

so I modify the file /drivers/mtd/maps/perseus-flash.c to divide the flash into only one partition : jffs (start: the start of flash size:8M) after the kernel up. I mount the mtdblock0 as jffs onto /jffs with command "mount -t jffs /dev/mtdblock0 /jffs". I didnt erase the flash or copy jffs image to mtd because I think mount can create the filesystem format automatically .
then the second problem appears 
2. after enter command mount , lots of meesage appear in the screen (which really scare me:-).and the kernel......died.

I guess maybe the mtd never up , so I reboot and cp some file to /dev/mtd0 , it said "cant open /dev/mtd0 : No such device",but when I try to cp the same file to /dev/mtdblock0 , the message look like what showed when I mount appears
and here is the message:

# mount /dev/mtdblock0 jffs -t jffs

mtdblock_open

ok

JFFS: Trying to mount device 1f:00.

jffs_build_fs()

jffs_create_control()

jffs_build_begin()

  fmc->flash_size = 8388608 bytes

jffs_scan_flash(): start pos = 0x0, end = 0x800000

check_partly_erased_sector():checking sector which contains offset 0x0 for flipp
ing bits..

flash_safe_read(c001a160, 00000000, c0b15000, 00001000)

Unable to handle kernel NULL pointer dereference at virtual address 00000000

pgd = c0b78000

*pgd = 10b9d001, *pmd = 10b9d001, *pte = 00000000, *ppte = 00000000

Internal error: Oops: 0

CPU: 0

pc : [<00000000>]    lr : [<c00b590c>]    Not tainted

sp : c0b7fc34  ip : fffffffe  fp : c0140528

r10: c001b6dc  r9 : 00000080  r8 : c0b7e000

r7 : c001b6a0  r6 : 00000000  r5 : c0135850  r4 : c0b7fc54

r3 : 00001000  r2 : 00000000  r1 : c0b15000  r0 : c0135850

Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user

Control: 3177  Table: 10B78000  DAC: 00000015

Process mount (pid: 16, stackpage=c0b7f000)

Stack:
>>....here is many address and value 


Backtrace: frame pointer underflow

Function entered at [<fffffff1>] from [<00000000>]

Backtrace aborted due to bad frame pointer <c0140528>

Code: bad PC value.

Kernel panic: Aiee, killing interrupt handler!

In interrupt handler - not syncing



I am just a poor programmer who want to mount a file system, cant u help me?
your help was and will be appreciated .

Jim Zeus(really confused)



_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag

^ permalink raw reply	[flat|nested] 61+ messages in thread
* Re: (no subject)
@ 2002-01-03 15:46 Allen Curtis
  0 siblings, 0 replies; 61+ messages in thread
From: Allen Curtis @ 2002-01-03 15:46 UTC (permalink / raw)
  To: sheela_kashyap; +Cc: linux-mtd

We had the same problem where the /dev/ entries where not included in the
JFFS image. In our case I ran MAKEDEV to recreate the missing devices.

The version of JFFS we are using came with HHL Professional 2.0. Based on
the CVS versions, it looks like it is the original code release.

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-12-28 23:48 Sheela Kashyap
  2001-12-28 23:52 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Sheela Kashyap @ 2001-12-28 23:48 UTC (permalink / raw)
  To: linux-mtd

Hi,

I am relatively new to Linux and definitely new to MTD/JFFS. We have
a motorola 8xx board, the boot loader used is ppcboot. We are
currently using NFS as the root file system.  The kernel has been
compiled with the right JFFS and MTD options. I am able to erase the
MTD device, copy the file system on to it and mount and umount
multiple times without any problems. The kernel is in the flash.  We
are using Dhcp to figure out its IP address. 

When I set the bootargs in ppcboot to "root=/dev/mtdblock1 rw" or
"root=/dev/mtdblock1 rw ip=10.100.4.44" and try booting the kernel,
everything is fine till it comes time to mount the root FS.It still
seems to try and go out on the net. This is the trace I see. I have
cut out some parts to reduce the clutter. 

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


Initializing...
  CPU:   XPC860xxZPnnD4 at 80 MHz: 16 kB I-Cache 8 kB D-Cache FEC
present
  Board:   DRAM:  About to program UPMB... finished programming UPMB
Setting value for MPTPR to 400
Run precharge command for each chip-select used
<snip...>

cas latensies supported          3  2    
<snip...>

ppcboot->printenv
bootdelay=10
baudrate=19200
ipaddr=10.0.0.77
serverip=10.0.0.128
bootcmd=bootm 28080000
stdin=serial
stdout=serial
stderr=serial
bootargs=root=/dev/mtdblock1 rw ip=10.100.4.44 

SWSE(bootrom)->bootm 28080000
## Booting Linux kernel at 28080000 ...
   Image Name:   HHL 2.0 for SWSE version 0.005
   Created:      2001-12-06   5:07:40
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    550042 Bytes = 537 kB = 0 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Transferring control to Linux (at address 00000000) ...
Linux version 2.4.2_hhl20 (rick@localhost.localdomain) (gcc version
2.95.3 20010
315 (release/MontaVista)) #6 Wed Dec 5 21:03:08 PST 2001  
On node 0 totalpages: 65536
zone(0): 65536 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock1 rw ip=10.100.4.44 
Decrementer Frequency = 300000000/60 

<snip....>

JFFS version 1.0, (C) 1999, 2000  Axis Communications AB
loop: loaded (max 8 devices)
physmap flash device: 1780000 at 28880000
Physically mapped flash: Found 2 x16 CFI devices at location 0 in 16
bit mode
JEDEC ID: 89 18
cstm_cfi_jedec flash device: 1780000 at 28880000
MTD flash: Found 2 x16 CFI devices at location 0 in 16 bit mode
JEDEC ID: 89 18
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 16384)
Sending BOOTP requests............. timed out!
IP-Config: Auto-configuration of network failed.
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
request_module[block-major-2]: Root fs not mounted
VFS: Cannot open root device "mtdblock1" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
Rebooting in 180 seconds..                         

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

The "Sending BOOTP requests" line is what I don't understand. The
kernel obviously does not figure out that the root filesystem to be
used is 'jffs'. How can I get it to do that? Do I need to make
changes to some kernel files? Or is it that I need to change the
kernel so that it detects the MTD block device first and figures out
the filesystem?

Any help is greatly appreciated. 

Thanks,
Sheela.

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-12-19 19:01 ilatypov
  0 siblings, 0 replies; 61+ messages in thread
From: ilatypov @ 2001-12-19 19:01 UTC (permalink / raw)
  To: Linux MTD list

There are two concerns as I see:

1. I don't know too much about the FTL layer.  The patch to the GRUB boot
loader for booting off DiskOnChip will recognize NFTL block device access
layer only.  The corresponding format command is
   nftl_format /dev/mtd0 98304
provided that the bootloader itself takes the first 12 * 8K bytes.  Make
sure that the nftl drivers were not loaded or activated before issuing
this command.  The device names corresponding to the partitions of
DiskOnChip are /dev/nftla*, of course.

2. The GRUB firmware might not include the DiskOnChip patch.  I suppose
you copied the pre_stage2 file from the GRUB tree to the MTD tree and ran
the make command to generate the grub_firmawre file.  I also understand
that the firmware was stored onto DiskOnChip by launching this command:
    doc_loadbios /dev/mtd0 grub_firmware

Thank you,

Ilguiz

On Wed, 19 Dec 2001, dharmendra.t bavale wrote:

>   I tried all mke2fs /dev/flta1.
[..]
> grub>root (dc0,1)
> The selected disk does not exist
[..]

^ permalink raw reply	[flat|nested] 61+ messages in thread
* RE: (no subject)
@ 2001-09-14 20:11 Siders, Keith
  0 siblings, 0 replies; 61+ messages in thread
From: Siders, Keith @ 2001-09-14 20:11 UTC (permalink / raw)
  To: 'David Woodhouse'; +Cc: linux-mtd

-> Why do you want to write the compressed version to the 
-> filesystem? Just so 
-> that you can use gzip -9 and get better compression?
-> 
-> --
-> dwmw2
-> 

In my application I will receive the image already zlib compressed. I was
hoping to skip having to take up memory with both compressed and
uncompressed images prior to writing to JFFS2. But alas, since it's
necessary, I shall malloc(new_space), uncompress(new_space, old_space) ,
free(old_space), fwrite(new_space), and finally free(new_space).

ks

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-09-14 16:25 Siders, Keith
  2001-09-14 16:32 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: Siders, Keith @ 2001-09-14 16:25 UTC (permalink / raw)
  To: linux-mtd

I have a requirement to store compressed binary images with the intent that
they will be uncompressed when loaded into memory. Can JFFS2 store data
without compression, in this case previously compressed data, and still
automatically uncompress it when retrieved from the filesystem?

Keith Siders
Software Engineer
 Toshiba America Consumer Products, Inc.
Advanced Television Technology Center
801 Royal Parkway, Suite 100
Nashville, Tennessee 37214
Phone: (615) 257-4050
Fax:   (615) 453-7880

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-05-02 15:59 zud sdf
  0 siblings, 0 replies; 61+ messages in thread
From: zud sdf @ 2001-05-02 15:59 UTC (permalink / raw)
  To: mtd

subscribe mtd

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-05-02 15:29 zud sdf
  0 siblings, 0 replies; 61+ messages in thread
From: zud sdf @ 2001-05-02 15:29 UTC (permalink / raw)
  To: MTD

subscribe mtd

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-05-02 15:24 zud sdf
  2001-05-02 15:32 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: zud sdf @ 2001-05-02 15:24 UTC (permalink / raw)
  To: MTD

subscribe

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (no subject)
@ 2001-05-02 15:17 Zydla Tsui
  0 siblings, 0 replies; 61+ messages in thread
From: Zydla Tsui @ 2001-05-02 15:17 UTC (permalink / raw)
  To: MTD

subscribe

^ permalink raw reply	[flat|nested] 61+ messages in thread
* (No Subject)
@ 2001-04-24 11:29 simon.munton
  2001-04-24 14:46 ` David Woodhouse
  0 siblings, 1 reply; 61+ messages in thread
From: simon.munton @ 2001-04-24 11:29 UTC (permalink / raw)
  To: mtd

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



[-- Attachment #2: Type: text/plain, Size: 2038 bytes --]

Back in January, I posted a similar question about the unlock bypass mode.

Unfortunately, I've been busy on other things since then, so I've not been able to follow up on it.

The chip needs to be locked before going into the unlock bypass mode and unlocked when it comes out of this mode. It would probably be best to have a couple of helper functions to enter and exit bypass mode. 

Also, in do_write_oneword, it should skip the wait for the chip to be ready and not set the state back to ready if fast is set true.

I've also noticed that CFI_DEVICETYPE_X8 is used in several places, where it seems that cfi->device_type should be used instead (one instance is in issuing the enter bypass mode commands).

Something along the lines of the attached diff (haven't even tried compiling it, so it may be buggy)

Simon

> -----Original Message-----
> From: Brenk, Rudger van [mailto:rudger.van.brenk@intersil.com]
> Sent: 23 April 2001 2:56 pm
> To: 'mtd@infradead.org'
> Subject: Problems using fast write in cfi_cmdset_0002.c
> 
> 
> While building a uClinux environment using MTD and JFFS on an 
> AMD AM29DL323
> device (Kernel 2.0.38). I encountered some problems using the 
> cfi_cmdset_0002.c,
> when ever the fast write option is used the flash is put in a 
> 'unlock bypass
> mode' and starts writing bytes to flash. 
> 
> This is OK but in between byte writes the chip state is set 
> back to FL_READY,
> and available for other threads to access. If an other 
> threads accesses the
> flash chip it's still in 'unlock bypass mode' and will not 
> accept other
> commands/or even worse when this thread schedules out the 
> byte write program
> will continue when the device isn't anymore in 'unlock bypass mode'!!
> 
> Is there anybody else experiencing problems like this?
> 
> Thanks,
> 
> Rudger 
> 
> 
> Rudger.van.Brenk@intersil.com
> 
> 
> 
> 
> To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
> 




--------------------
talk21 your FREE portable and private address on the net at http://www.talk21.com

[-- Attachment #3: cfi_cmdset_0002.c.diff --]
[-- Type: text/plain, Size: 7140 bytes --]

--- cfi_cmdset_0002.c	Tue Apr 17 15:13:54 2001
+++ C:\TEMP/cfi_cmdset_0002.c	Tue Apr 24 10:46:22 2001
@@ -304,7 +304,7 @@
  retry:
 	cfi_spin_lock(chip->mutex);
 
-	if (chip->state != FL_READY){
+	if (!fast && chip->state != FL_READY){
 	        printk("Waiting for chip to write, status = %d\n", chip->state);
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		add_wait_queue(&chip->wq, &wait);
@@ -331,9 +331,9 @@
 		cfi_send_gen_cmd(0xA0, 0, chip->start, map, cfi->interleave, cfi->device_type, NULL);
 	}
 	else {
-	        cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	        cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	        cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
+	        cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	        cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	        cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi->interleave, cfi->device_type, NULL);
 	}
 
 	cfi_write(map, datum, adr);
@@ -365,13 +365,79 @@
 		ret = -EIO;
 	}       
 	DISABLE_VPP(map);
-	chip->state = FL_READY;
-	wake_up(&chip->wq);
+        if (!fast) {
+	        chip->state = FL_READY;
+	        wake_up(&chip->wq);
+        }
 	cfi_spin_unlock(chip->mutex);
 	
 	return ret;
 }
 
+static void cfi_enter_bypass_mode (struct mtd_info *mtd, int chipnum)
+{
+	struct map_info *map = mtd->priv;
+	struct cfi_private *cfi = map->fldrv_priv;
+        unsigned long chipstart;
+        struct flchip *chip = &cfi->chips[chipnum];
+	unsigned long timeo = jiffies + HZ;
+	DECLARE_WAITQUEUE(wait, current);
+
+ retry:
+	cfi_spin_lock(chip->mutex);
+
+	if (chip->state != FL_READY){
+	        printk("Waiting for chip to write, status = %d\n", chip->state);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		add_wait_queue(&chip->wq, &wait);
+                
+		cfi_spin_unlock(chip->mutex);
+
+		schedule();
+		remove_wait_queue(&chip->wq, &wait);
+		printk("Wake up to write:\n");
+#if 0
+		if(signal_pending(current))
+			return -EINTR;
+#endif
+		timeo = jiffies + HZ;
+
+		goto retry;
+	}	
+
+	chip->state = FL_WRITING;
+
+        chipstart = cfi->chips[chipnum].start;
+
+	/* Go into unlock bypass mode */
+	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x20, cfi->addr_unlock1, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+
+	cfi_spin_unlock(chip->mutex);
+}
+
+static void cfi_exit_bypass_mode (struct mtd_info *mtd, int chipnum)
+{
+	struct map_info *map = mtd->priv;
+	struct cfi_private *cfi = map->fldrv_priv;
+        unsigned long chipstart;
+        struct flchip *chip = &cfi->chips[chipnum];
+
+	chipstart = cfi->chips[chipnum].start;
+
+	cfi_spin_lock(chip->mutex);
+
+	/* Come out of bypass mode */
+	cfi_send_gen_cmd(0x90, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x00, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+
+	chip->state = FL_READY;
+	wake_up(&chip->wq);
+
+        cfi_spin_unlock(chip->mutex);
+}
+
 static int cfi_amdstd_write (struct mtd_info *mtd, loff_t to , size_t len, size_t *retlen, const u_char *buf)
 {
 	struct map_info *map = mtd->priv;
@@ -425,10 +491,10 @@
 		}
 	}
 	
-	/* Go into unlock bypass mode */
-	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0x20, cfi->addr_unlock1, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
+        if (cfi->fast_prog) {
+  	        /* Go into unlock bypass mode */
+                cfi_enter_bypass_mode (mtd, chipnum);
+        }
 
 	/* We are now aligned, write as much as possible */
 	while(len >= CFIDEV_BUSWIDTH) {
@@ -448,8 +514,7 @@
 		if (ret) {
 			if (cfi->fast_prog){
 				/* Get out of unlock bypass mode */
-				cfi_send_gen_cmd(0x90, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
-				cfi_send_gen_cmd(0x00, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+                                cfi_exit_bypass_mode (mtd, chipnum);
 			}
 			return ret;
 		}
@@ -462,8 +527,7 @@
 		if (ofs >> cfi->chipshift) {
 			if (cfi->fast_prog){
 				/* Get out of unlock bypass mode */
-				cfi_send_gen_cmd(0x90, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
-				cfi_send_gen_cmd(0x00, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+                                cfi_exit_bypass_mode (mtd, chipnum);
 			}
 
 			chipnum ++; 
@@ -473,17 +537,14 @@
 			chipstart = cfi->chips[chipnum].start;
 			if (cfi->fast_prog){
 				/* Go into unlock bypass mode for next set of chips */
-				cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-				cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-				cfi_send_gen_cmd(0x20, cfi->addr_unlock1, chipstart, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
+                                cfi_enter_bypass_mode (mtd, chipnum);
 			}
 		}
 	}
 
 	if (cfi->fast_prog){
 		/* Get out of unlock bypass mode */
-		cfi_send_gen_cmd(0x90, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
-		cfi_send_gen_cmd(0x00, 0, chipstart, map, cfi->interleave, cfi->device_type, NULL);
+                cfi_exit_bypass_mode (mtd, chipnum);
 	}
 
 	if (len & (CFIDEV_BUSWIDTH-1)) {
@@ -546,11 +607,11 @@
 
 	adr += chip->start;
 	ENABLE_VPP(map);
-	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
-	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, CFI_DEVICETYPE_X8, NULL);
+	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi->interleave, cfi->device_type, NULL);
+	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi->interleave, cfi->device_type, NULL);
 	cfi_write(map, CMD(0x30), adr);
 	
 	timeo = jiffies + (HZ*20);

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

end of thread, other threads:[~2009-06-01 11:22 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-27  8:01 (no subject) Jim Zeus
2002-03-27  8:06 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2009-06-01 11:20 Mnl
2009-05-18 15:18 Mnl
2009-05-18 12:20 Mnl
2006-03-10 13:57 Selmeci, Tamas
2005-10-20 16:05 Korolev, Alexey
2005-09-15 13:22 Konstantin Kletschke
2005-07-23  4:50 Mr.Derrick Tanner.
2005-07-18 12:06 murasfdg sjhfsd
2005-07-03  2:47 Amit Sharma
2005-07-03 12:04 ` Artem B. Bityuckiy
2005-06-21 14:48 David L
2004-11-16 13:48 Artem B. Bityuckiy
2004-11-16 13:55 ` David Woodhouse
2004-11-16 11:42 Artem B. Bityuckiy
2002-11-19 21:13 BBRAM Jörn Engel
2002-11-20  2:01 ` (no subject) Taeil Um
2002-11-20  7:20   ` David Woodhouse
2002-11-21  8:40     ` Taeil Um
2002-11-15 20:58 Wauviel
2002-07-15 10:25 Valls Pellicer,Joan
2002-07-02 17:00 Roy Lauer
2002-06-19  2:24 Áº²¨
2002-05-03 11:46 victor.martin
2002-04-29 14:19 Jim Zeus
2002-04-19  3:23 swimming_fisher
2002-04-11  6:13 Jim Zeus
2002-03-19  7:59 Jim Zeus
2002-03-18  7:42 Jim Zeus
2002-03-18  8:38 ` David Woodhouse
2002-03-17 10:21 Jim Zeus
2002-03-17 10:32 ` David Woodhouse
2002-03-15  9:55 Jim Zeus
2002-03-15 10:15 ` David Woodhouse
2002-03-15  4:15 Jim Zeus
2002-03-15  9:27 ` David Woodhouse
2002-01-03 15:46 Allen Curtis
2001-12-28 23:48 Sheela Kashyap
2001-12-28 23:52 ` David Woodhouse
2002-01-02 23:57   ` Sheela Kashyap
2002-01-03  0:06     ` David Woodhouse
2002-01-03  0:27       ` Sheela Kashyap
2002-01-03  9:26         ` David Woodhouse
2002-01-03 18:57           ` Sheela Kashyap
2001-12-19 19:01 ilatypov
2001-09-14 20:11 Siders, Keith
2001-09-14 16:25 Siders, Keith
2001-09-14 16:32 ` David Woodhouse
2001-05-02 15:59 zud sdf
2001-05-02 15:29 zud sdf
2001-05-02 15:24 zud sdf
2001-05-02 15:32 ` David Woodhouse
2001-05-02 15:17 Zydla Tsui
2001-04-24 11:29 (No Subject) simon.munton
2001-04-24 14:46 ` David Woodhouse
2001-04-25  9:51   ` Masami Komiya
2001-04-25 10:26     ` David Woodhouse
2001-04-25 12:19       ` Masami Komiya
2001-04-25 12:26         ` David Woodhouse
2001-04-25 12:55           ` Masami Komiya
2001-04-25 13:30             ` David Woodhouse

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