On Friday 22 May 2009 12:20:57 Raúl Sánchez Siles wrote:
>   Hello all:
>
>   This start a patchset series for implementing x16_as_x8 cfi compliant
> feature.
>
>   · 01-x16_as_x8-consolidate_addresses.patch
>   · 02-x16_as_x8-flash_address.patch
>   · 03-x16_as_x8-multibyte_read.patch
>
>   I have taken a view to the CFI specification [0] and it looks that the
> approach should also work for intel chips, while I had only tested it with
> spansion flash.
>
>   FYI, I'm using this patchset all the time while working with flash on the
> boards I'm testing.
>
>   I finally merged the command_address functionality into flash_address
> function. The rest is the same as I sent.
>
>   I hope this patchset is considered for version 0.2.0. But a little
> testing should confirm this.
>
> [0] http://www.jedec.org/download/search/jesd68-01.pdf

-- 
Raúl Sánchez Siles

Departamento de Montaje

INFOGLOBAL, S. A.

* C/ Virgilio, 2. Ciudad de la Imagen.
28223 Pozuelo de Alarcón (Madrid), España
* T: +34 91 506 40 00
* F: +34 91 506 40 01


--- a/src/flash/cfi.c
+++ b/src/flash/cfi.c
@@ -2129,11 +2129,11 @@
 	if (bank->chip_width == 1)
 	{
 		u8 manufacturer, device_id;
-		if((retval = target_read_u8(target, bank->base + 0x0, &manufacturer)) != ERROR_OK)
+		if((retval = target_read_u8(target, flash_address(bank, 0, 0x00), &manufacturer)) != ERROR_OK)
 		{
 			return retval;
 		}
-		if((retval = target_read_u8(target, bank->base + 0x1, &device_id)) != ERROR_OK)
+		if((retval = target_read_u8(target, flash_address(bank, 0, 0x01), &device_id)) != ERROR_OK)
 		{
 			return retval;
 		}
@@ -2142,11 +2142,11 @@
 	}
 	else if (bank->chip_width == 2)
 	{
-		if((retval = target_read_u16(target, bank->base + 0x0, &cfi_info->manufacturer)) != ERROR_OK)
+		if((retval = target_read_u16(target, flash_address(bank, 0, 0x00), &cfi_info->manufacturer)) != ERROR_OK)
 		{
 			return retval;
 		}
-		if((retval = target_read_u16(target, bank->base + 0x2, &cfi_info->device_id)) != ERROR_OK)
+		if((retval = target_read_u16(target, flash_address(bank, 0, 0x02), &cfi_info->device_id)) != ERROR_OK)
 		{
 			return retval;
 		}
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to