|
From: kc8apf at B. <kc...@ma...> - 2009-05-22 19:47:07
|
Author: kc8apf
Date: 2009-05-22 19:47:07 +0200 (Fri, 22 May 2009)
New Revision: 1884
Modified:
trunk/src/flash/cfi.c
Log:
Author: Ra?\195?\186l S?\195?\161nchez Siles <rsa...@in...>
- Consistently use flash_address
Modified: trunk/src/flash/cfi.c
===================================================================
--- trunk/src/flash/cfi.c 2009-05-22 17:44:04 UTC (rev 1883)
+++ trunk/src/flash/cfi.c 2009-05-22 17:47:07 UTC (rev 1884)
@@ -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;
}
|