summaryrefslogtreecommitdiffstats
path: root/board_enable.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-05-02 20:08:01 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-05-02 20:08:01 +0000
commit96c2dfc10f35cca18dc9643dd23c8663d42ed53d (patch)
tree9cd6a4035cfd1b102078d47c0078999a48c02d75 /board_enable.c
parent3603a28a6d23efea90efb51216a08244e6645bcd (diff)
downloadast2050-flashrom-96c2dfc10f35cca18dc9643dd23c8663d42ed53d.zip
ast2050-flashrom-96c2dfc10f35cca18dc9643dd23c8663d42ed53d.tar.gz
spi25.c: Refactor spi_write_status_register helpers
In r1115 "Write protection handling for Atmel AT25*" the old spi_write_status_register function was duplicated to send WREN and EWSR commands respectively controlled by a new common wrapper function spi_write_status_register without a reason. Both functions' resulting code is equal apart from the opcode used. The code itself does also differ in the macros used, but their value (apart from the opcode) is equal. This patch adds a new parameter for the opcode to the helper function which allows removal of the other one. This relies on the fact that EWSR and WREN have the same INSIZE and OUTSIZE though. If that is really seen as an issue, the sizes could be made parameters too. This patch also changes the wrapper so that it no longer sets the feature bits of the struct flash(ctx) argument. This may result in changed output, because it no longer implicitly disables the debug message in following executions. Since almost all chips had their feature bits fixed in the previous commit, this is a minor problem. Also, spi_write_status_enable has been dead code since r658 or so. Remove it. Corresponding to flashrom svn r1528. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'board_enable.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud