]> git.baikalelectronics.ru Git - uboot.git/commit
spi: ich: Drop while loop in hardware sequencing erase case
authorWolfgang Wallner <wolfgang.wallner@br-automation.com>
Tue, 14 Jan 2020 13:05:48 +0000 (14:05 +0100)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 3 Feb 2020 17:19:28 +0000 (01:19 +0800)
commit4a60f6939fafbfdaa3c35f4270ea2f390514f266
tree391b8604d769927d584d1fa0bd5b291a2e73edcb
parentfc5943a88d690662ad2a64baecf9a457f4c4685d
spi: ich: Drop while loop in hardware sequencing erase case

When ich_spi_exec_op_hwseq() is called to erase a 4k block
(opcode = SPINOR_OP_BE_4K), it expects to find a length value in
op->data.nbytes, but that value is always 0. As a result, the while loop
is never executed and no erase is carried out.

Fix this by dropping the loop code entirely, only keeping the relevant
parts of the loop body.

See http://patchwork.ozlabs.org/patch/1222779/ for more detailed
background information and discussion.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/spi/ich.c