* [U-Boot] [PATCH] cfi_flash: Use flash_read32() in sector_erased()
@ 2010-10-25 16:31 Stefan Roese
2010-12-17 8:59 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-10-25 16:31 UTC (permalink / raw)
To: u-boot
The function sector_erased() is modified to not use pointer
access, but to use the correct accessor functions. This fixes a
problem on the t3corp board with the Xilinx DS617 flash chips. Here
a board specific accessor function is needed to read from flash
in 32bit mode. This patch enables such an operation mode.
Signed-off-by: Stefan Roese <sr@denx.de>
---
drivers/mtd/cfi_flash.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index e2317bd..c17c542 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1112,18 +1112,18 @@ static int sector_erased(flash_info_t *info, int i)
{
int k;
int size;
- volatile unsigned long *flash;
+ u32 *flash;
/*
* Check if whole sector is erased
*/
size = flash_sector_size(info, i);
- flash = (volatile unsigned long *) info->start[i];
+ flash = (u32 *)info->start[i];
/* divide by 4 for longword access */
size = size >> 2;
for (k = 0; k < size; k++) {
- if (*flash++ != 0xffffffff)
+ if (flash_read32(flash++) != 0xffffffff)
return 0; /* not erased */
}
--
1.7.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] cfi_flash: Use flash_read32() in sector_erased()
2010-10-25 16:31 [U-Boot] [PATCH] cfi_flash: Use flash_read32() in sector_erased() Stefan Roese
@ 2010-12-17 8:59 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-12-17 8:59 UTC (permalink / raw)
To: u-boot
On Monday 25 October 2010 18:31:39 Stefan Roese wrote:
> The function sector_erased() is modified to not use pointer
> access, but to use the correct accessor functions. This fixes a
> problem on the t3corp board with the Xilinx DS617 flash chips. Here
> a board specific accessor function is needed to read from flash
> in 32bit mode. This patch enables such an operation mode.
Applied to u-boot-cfi-flash/next. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-17 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 16:31 [U-Boot] [PATCH] cfi_flash: Use flash_read32() in sector_erased() Stefan Roese
2010-12-17 8:59 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox