mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
Unify non-shifted and shifted JEDEC access
Some Parallel bus chips have a 16-bit mode and an 8-bit mode. They use normal JEDEC addresses for 16-bit mode and shifted addresses (by 1 bit) for 8-bit mode. Some programmers can access them in 16-bit mode, but on all flashrom-supported programmers so far, we access them in 8-bit mode. This means we have to shift the addresses but apart from the addresses we can share the code. This patch makes this possible by checking the chip's FEATURE_ADDR_SHIFTED flag in common JEDEC functions and applying the right addresses respectively. Corresponding to flashrom svn r1840. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:

committed by
Stefan Tauner

parent
6697f71ade
commit
a8cf3620a4
@ -155,10 +155,6 @@ int printlock_regspace2_uniform_64k(struct flashctx *flash);
|
||||
int printlock_regspace2_block_eraser_0(struct flashctx *flash);
|
||||
int printlock_regspace2_block_eraser_1(struct flashctx *flash);
|
||||
|
||||
/* m29f400bt.c */
|
||||
int probe_m29f400bt(struct flashctx *flash);
|
||||
int write_m29f400bt(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
|
||||
/* sst28sf040.c */
|
||||
int erase_chip_28sf040(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
|
||||
int erase_sector_28sf040(struct flashctx *flash, unsigned int address, unsigned int sector_size);
|
||||
@ -197,8 +193,6 @@ int erase_sector_stm50(struct flashctx *flash, unsigned int block, unsigned int
|
||||
|
||||
/* en29lv640b.c */
|
||||
int probe_en29lv640b(struct flashctx *flash);
|
||||
int erase_block_shifted_jedec(struct flashctx *flash, unsigned int start, unsigned int len);
|
||||
int erase_chip_block_shifted_jedec(struct flashctx *flash, unsigned int start, unsigned int len);
|
||||
int write_en29lv640b(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
|
||||
|
||||
#endif /* !__CHIPDRIVERS_H__ */
|
||||
|
Reference in New Issue
Block a user