[LinuxBIOS] [PATCH] improved SPI flash support (restructured)

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Mon Oct 1 13:01:33 CEST 2007


On 01.10.2007 12:54, Stefan Reinauer wrote:
> Carl-Daniel Hailfinger wrote:
>>>> +int probe_spi(struct flashchip *flash)
>>>> +{
>>>> +	unsigned char readarr[3];
>>>>       
>>> This should be a struct imho
>>>
>>> typedef struct spi_id {
>>>         unsigned char vendor_id;
>>>         unsigned short device_id;
>>> } spi_id_t;
>>>     
>> Yes, but the underlying generic SPI function uses an array for commands
>> and results. Once I add write/erase support, it will become obvious why
>> I used unsigned char arrays.
>>
>>   
> Ah, so maybe it should be a union?

That's an option. I'll consider this once I refine the code.

Carl-Daniel




More information about the coreboot mailing list