Add serprog_map so that chips are addressed properly.
I did this for adding LPC support to my ATmega644 programmer.
Signed-off-by: Urja Rannikko <urjaman(a)gmail.com>
------
Sorry if I interrupted you all out of nowhere :P, I was porting LPC
code somebody (Mike Stirling, had to look that up) did for the AVR
to my ATmega644 (FTDI-USB) programmer, and noticed that it forced a
base address of 0xFFF80000 that is right only for 512K chips.
I modified the code to only add the highest 8 bits that are not
addressable in serprog protocol, and added this map function to have
flashrom
address stuff properly. This shouldnt affect non-serprog code at all,
and it shouldnt matter to parallel, nor it would affect the lpc addr
or 0xFFF80000-implementation, also my SPI W25Q80 doesnt mind being
addressed in this way at all (detect and read tested). Further testing
is recommended.
Also sidenote: it might be useful to add an optional
write_jedec_1-implementation into serprog. This thing is taking
forever to write LPC. (LPC with a 12Mhz AVR isnt that fast anyways,
but with USB ping-pong on every byte written...)
--
Urja Rannikko