On 10.07.2010 21:20, Carl-Daniel Hailfinger wrote:
> On 10.07.2010 20:15, Michael Karcher wrote:
>
>> Am Samstag, den 10.07.2010, 19:41 +0200 schrieb Carl-Daniel Hailfinger:
>>
>>> The spi_programmer array has a .write_256
>>> member for every controller. In case the controller can't do anything
>>> except 1-byte writes, we set
>>> .write_256 = spi_chip_write_1_new
>>>
>> Not every controller. SPI_CONTROLLER_DUMMY really has NULL in this
>> field. Your patch does not change that. And please kill the test if we
>> are sure that write_256 is always non-null.
>>
>
> Right. I wanted to add a write_256 function to the dummy programmer
> anyway. I'll send an updated patch.
> Side note: If no SPI controller is selected, write_256 is empty as well,
> but I'd say that's not a problem because it should never happen.
>
>
>
>> If your plan is to base a new 1371 on top of this patch, I'm perfectly
>> fine with these wrappers.
>>
>
> Thanks. That's indeed the plan.
>
New version, should hopefully address all comments.
Convert SPI chips to partial write, but wrap the write functions in a
compat layer to allow converting the rest of flashrom later.
I actually have patches for most of the remaining conversion, but I
wanted to get this out and reviewed first.
Compile tested, but that's it. I would really appreciate it if someone
could test this on a machine with SPI flash.
FWIW, I downloaded the patch from Patchwork and tried it out on my NM10 chipset / W25Q32 chip and it seemed to work fine. Log is attached.