Hello, I was asked by Rudolf to give the source code of my DOS/WIN/LINUX universal SPI FlashROM programming utility. So here's it: http://www.volny.cz/rayer/programm/spipgm.c Feel free to integrate it into your flashrom utility (btw I would be interested in DOS/WIN32 port)
Note: you will need to accomodate low-level function for I/O acces, this layer is NOT included. Under linux it should be enough to rise IOPL and then use inportb/ outportb (beware arguments order, I use DJGPP syntax). Sorry for the comments, my mind is randomly switching between cz/en :)
RayeR
Hi RayeR,
thank you very much for the source code!
On 26.11.2008 01:24, RayeR wrote:
I was asked by Rudolf to give the source code of my DOS/WIN/LINUX universal SPI FlashROM programming utility. So here's it: http://www.volny.cz/rayer/programm/spipgm.c Feel free to integrate it into your flashrom utility (btw I would be interested in DOS/WIN32 port)
flashrom is GPL. Is that OK for you?
Note: you will need to accomodate low-level function for I/O acces, this layer is NOT included.
Yes, we will have to write such a layer anyway.
Under linux it should be enough to rise IOPL and then use inportb/ outportb (beware arguments order, I use DJGPP syntax).
Thanks for the hint!
Sorry for the comments, my mind is randomly switching between cz/en :)
No problem, my mind is randomly switching between de/en, so I know how to make the best out of such comments. And your code is very clean, so I don't need most of the comments.
Regards, Carl-Daniel
On 27.11.2008 21:57, Carl-Daniel Hailfinger wrote:
Hi RayeR,
thank you very much for the source code!
I found some time to check your chip ID list against my chip ID database and I have a few questions:
The following definition conflicts with the definition in my database for SST25VF032B. SST25VF032 0x2542 Maybe the SST25VF032 and the SST25VF032B have different IDs. Do you have a datasheet for the SST25VF032?
Do you know where I can get data sheets for the following chips? Google turns up nothing. SST25VF064 0x2543 SST25VF128 0x2544 SST26VF064 0x2603
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
Do you know where I can get data sheets for the following chips? Google turns up nothing. SST25VF064 0x2543 SST25VF128 0x2544 SST26VF064 0x2603
Go to the SST web site. If they are not available there, they are not available period. I would suggest to not bother with code until you can get the documentation from the source.
//Peter
On 28.11.2008 01:53, Peter Stuge wrote:
Carl-Daniel Hailfinger wrote:
Do you know where I can get data sheets for the following chips? Google turns up nothing. SST25VF064 0x2543 SST25VF128 0x2544 SST26VF064 0x2603
Go to the SST web site. If they are not available there, they are not available period. I would suggest to not bother with code until you can get the documentation from the source.
OK, will do.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
flashrom is GPL. Is that OK for you?
Yes
Note: you will need to accomodate low-level function for I/O acces, this layer is NOT included.
Yes, we will have to write such a layer anyway.
Below are some linux macros I used there.
Under linux it should be enough to rise IOPL and then use inportb/ outportb (beware arguments order, I use DJGPP syntax).
Thanks for the hint!
just iopl(3); should be need but it requires root privileges.
I found some time to check your chip ID list against my chip ID database and I have a few questions:
The following definition conflicts with the definition in my database for SST25VF032B. SST25VF032 0x2542 Maybe the SST25VF032 and the SST25VF032B have different IDs. Do you have a datasheet for the SST25VF032?
Do you know where I can get data sheets for the following chips? Google turns up nothing. SST25VF064 0x2543 SST25VF128 0x2544 SST26VF064 0x2603
Here's my collection of SST SPI FLash datasheets: http://rayer.ic.cz/350d/sst.zip
/****************************************************************************/ /* Linuxova I/O inlined ASM makra a funkce */ /****************************************************************************/ #ifdef __linux__ // begin of Linux stuff //***************** aliases for Linux macros ******************************** #ifndef inportb #define inportb(port) inb(port) #endif
#ifndef inportw #define inportw(port) inw(port) #endif
#ifndef inportl #define inportl(port) inl(port) #endif
#ifndef outportb #define outportb(port,data) outb(data,port) // makro outb ma obracene poradi parametru #endif
#ifndef outportw #define outportw(port,data) outw(data,port) // makro outw ma obracene poradi parametru #endif
#ifndef outportl #define outportl(port,data) outl(data,port) // makro outl ma obracene poradi parametru #endif
#ifndef udelay // pauza v us #define udelay usleep // linux ma presny casovac s rozlisenim na us #endif
#ifndef delay // pauza v ms #define delay(msec) usleep(msec*1000) // linux ma presny casovac s rozlisenim na us #endif
Hi RayeR,
thanks for the quick response! The explanations are very valuable for me.
On 28.11.2008 00:02, RayeR wrote:
Carl-Daniel Hailfinger wrote:
I found some time to check your chip ID list against my chip ID database and I have a few questions:
The following definition conflicts with the definition in my database for SST25VF032B. SST25VF032 0x2542 Maybe the SST25VF032 and the SST25VF032B have different IDs. Do you have a datasheet for the SST25VF032?
Do you know where I can get data sheets for the following chips? Google turns up nothing. SST25VF064 0x2543 SST25VF128 0x2544 SST26VF064 0x2603
Here's my collection of SST SPI FLash datasheets: http://rayer.ic.cz/350d/sst.zip
I could not find any of the chips in the list above in your collection. May I ask where you found the IDs?
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
I could not find any of the chips in the list above in your collection. May I ask where you found the IDs?
I don't remember, maybe just I made a guess how the JID would continue in curent product line to be prepared to future. It's going similar with other manufacturers. If you see some mismatch and have you proved with some tech. document tell me what to change.
M.