diff options
author | Aubrey Li <aubrey.adi@gmail.com> | 2007-03-19 22:55:58 +0800 |
---|---|---|
committer | Aubrey Li <aubrey.adi@gmail.com> | 2007-03-19 22:55:58 +0800 |
commit | a6154fd1cfd020f6da8527e0365b1020a11a71d0 (patch) | |
tree | ff694909b836eb37ff3f6935bbc11c0b06460fcc /board/bf537-stamp/flash.c | |
parent | 8e709bbb2636b5670a8f2b575e138eb1f55773f6 (diff) | |
download | u-boot-imx-a6154fd1cfd020f6da8527e0365b1020a11a71d0.zip u-boot-imx-a6154fd1cfd020f6da8527e0365b1020a11a71d0.tar.gz u-boot-imx-a6154fd1cfd020f6da8527e0365b1020a11a71d0.tar.bz2 |
[Blackfin][PATCH] minor cleanup
Diffstat (limited to 'board/bf537-stamp/flash.c')
-rw-r--r-- | board/bf537-stamp/flash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/board/bf537-stamp/flash.c b/board/bf537-stamp/flash.c index 172d3be..42dcf06 100644 --- a/board/bf537-stamp/flash.c +++ b/board/bf537-stamp/flash.c @@ -330,14 +330,14 @@ int erase_block_flash(int nBlock) if ((nBlock < 0) || (nBlock > AFP_NumSectors)) return FALSE; - // figure out the offset of the block in flash + /* figure out the offset of the block in flash */ if ((nBlock >= 0) && (nBlock < SecFlashABegin)) ulSectorOff = nBlock * AFP_SectorSize1; else if ((nBlock >= SecFlashABegin) && (nBlock < NUM_SECTORS)) ulSectorOff = SecFlashAOff + (nBlock - SecFlashABegin) * AFP_SectorSize2; - // no such sector + /* no such sector */ else return FLASH_FAIL; @@ -388,15 +388,15 @@ void get_sector_number(long ulOffset, int *pnSector) long lMainEnd = 0x400000; long lBootEnd = 0x10000; - // sector numbers for the FLASH A boot sectors + /* sector numbers for the FLASH A boot sectors */ if (ulOffset < lBootEnd) { nSector = (int)ulOffset / AFP_SectorSize1; } - // sector numbers for the FLASH B boot sectors + /* sector numbers for the FLASH B boot sectors */ else if ((ulOffset >= lBootEnd) && (ulOffset < lMainEnd)) { nSector = ((ulOffset / (AFP_SectorSize2)) + 7); } - // if it is a valid sector, set it + /* if it is a valid sector, set it */ if ((nSector >= 0) && (nSector < AFP_NumSectors)) *pnSector = nSector; |