This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The attached patch adds support for buffered writes to the am29xxxxx V2 driver. If cyg_am29xxxxx_init_cfi() is used to initialize the device, then the write buffer size is auto-detected. If the flash supports buffered writes, then am29_hw_program_buffered() will get called, otherwise the "good old" am29_hw_program() will be called. I have only tested it with a flash hooked up in 16as8 mode, so please scrutinize the changes before applying, and - if possible - test with other flash combinations. Perhaps I should make a CDL option that guards the use of buffered writes (default 'off') until it's been verified by the community. I have two questions: 1) Why is data programmed to the flash verified by both cyg_am29xxxxx_program() and cyg_flash_program()? Isn't that a waste of CPU cycles? 2) For am29xxxxx, the number of retries when programming is given by CYGNUM_DEVS_FLASH_AMD_AM29XXXXX_V2_PROGRAM_TIMEOUT. This is OK, but what bothers me is that this is *not* the number of retries per written buffer or written word, but the number of retries per call to cyg_am29xxxxx_program(), whether 1 byte or a full sector is being written. This means that if a flash sector is bigger than CYGNUM_DEVS_FLASH_AMD_AM29XXXXX_V2_PROGRAM_TIMEOUT then it's not possible to write such a sector in one go. Regards, Rene Schipp von Branitz Nielsen Vitesse Semiconductors
Attachment:
am29xxxxxv2_2009_04_24.patch
Description: am29xxxxxv2_2009_04_24.patch
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |