From bc8be110ff314cab0e09792a05b6871672c18302 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Tue, 11 May 2010 11:16:33 +0800 Subject: NOR: add read() callback to struct flash_driver Final target is to force bus_width size during CFI flash read. In this first step I need to replace default flash read with flash specific implementation. This patch introduces: - flash_driver_read() layer; - default_flash_read(), backward compatible; - read() callback in struct flash_driver; - proper initialization in every flash_driver instance. Signed-off-by: Antonio Borneo --- src/flash/nor/tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/flash/nor/tcl.c') diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index ad218123..af655c6d 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -559,7 +559,7 @@ COMMAND_HANDLER(handle_flash_fill_command) goto done; } - err = target_read_buffer(target, address + wrote, cur_size, readback); + err = flash_driver_read(bank, readback, address - bank->base + wrote, cur_size); if (err != ERROR_OK) { retval = err; -- cgit v1.2.3-18-g5258