[coreboot] SPIPGM source code
RayeR
rayer at seznam.cz
Fri Nov 28 00:02:02 CET 2008
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
More information about the coreboot
mailing list