summaryrefslogtreecommitdiff
path: root/board/freescale/m5253demo/flash.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
committerStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
commitc23154aab5825fec81d5500c53eaa686646c76b5 (patch)
tree32b0aafae49f664a65ced50981492bb031f006b8 /board/freescale/m5253demo/flash.c
parentcb07d74e2e0c0a41533b6bcd551af9bf2ebcf2bc (diff)
parent9d195a546179bc732aba9eacccf0a9a3db591288 (diff)
downloadu-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.zip
u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.gz
u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/freescale/m5253demo/flash.c')
-rw-r--r--board/freescale/m5253demo/flash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index 16bba59..071701d 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -56,14 +56,16 @@ ulong flash_init(void)
int flash_get_offsets(ulong base, flash_info_t * info)
{
- int j, k;
+ int i;
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) {
info->start[0] = base;
- for (k = 0, j = 0; j < CONFIG_SYS_SST_SECT; j++, k++) {
- info->start[k + 1] = info->start[k] + CONFIG_SYS_SST_SECTSZ;
- info->protect[k] = 0;
+ info->protect[0] = 0;
+ for (i = 1; i < CONFIG_SYS_SST_SECT; i++) {
+ info->start[i] = info->start[i - 1]
+ + CONFIG_SYS_SST_SECTSZ;
+ info->protect[i] = 0;
}
}