summaryrefslogtreecommitdiff
path: root/board/esd/canbt/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/esd/canbt/flash.c')
-rw-r--r--board/esd/canbt/flash.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/board/esd/canbt/flash.c b/board/esd/canbt/flash.c
index 685850e84fd..de847f9beac 100644
--- a/board/esd/canbt/flash.c
+++ b/board/esd/canbt/flash.c
@@ -43,8 +43,8 @@ unsigned long flash_init (void)
{
unsigned long size_b0;
int i;
- uint pbcr;
- unsigned long base_b0;
+ uint pbcr;
+ unsigned long base_b0;
/* Init: no FLASHes known */
for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
@@ -60,25 +60,25 @@ unsigned long flash_init (void)
size_b0, size_b0<<20);
}
- /* Setup offsets */
- flash_get_offsets (-size_b0, &flash_info[0]);
+ /* Setup offsets */
+ flash_get_offsets (-size_b0, &flash_info[0]);
- /* Re-do sizing to get full correct info */
- mtdcr(ebccfga, pb0cr);
- pbcr = mfdcr(ebccfgd);
- mtdcr(ebccfga, pb0cr);
- base_b0 = -size_b0;
- pbcr = (pbcr & 0x0001ffff) | base_b0 | (((size_b0/1024/1024)-1)<<17);
- mtdcr(ebccfgd, pbcr);
- /* printf("pb1cr = %x\n", pbcr); */
+ /* Re-do sizing to get full correct info */
+ mtdcr(ebccfga, pb0cr);
+ pbcr = mfdcr(ebccfgd);
+ mtdcr(ebccfga, pb0cr);
+ base_b0 = -size_b0;
+ pbcr = (pbcr & 0x0001ffff) | base_b0 | (((size_b0/1024/1024)-1)<<17);
+ mtdcr(ebccfgd, pbcr);
+ /* printf("pb1cr = %x\n", pbcr); */
- /* Monitor protection ON by default */
- (void)flash_protect(FLAG_PROTECT_SET,
- -monitor_flash_len,
- 0xffffffff,
- &flash_info[0]);
+ /* Monitor protection ON by default */
+ (void)flash_protect(FLAG_PROTECT_SET,
+ -monitor_flash_len,
+ 0xffffffff,
+ &flash_info[0]);
- flash_info[0].size = size_b0;
+ flash_info[0].size = size_b0;
return (size_b0);
}