diff options
Diffstat (limited to 'board/snmc/qs850')
-rw-r--r-- | board/snmc/qs850/flash.c | 22 | ||||
-rw-r--r-- | board/snmc/qs850/qs850.c | 16 |
2 files changed, 19 insertions, 19 deletions
diff --git a/board/snmc/qs850/flash.c b/board/snmc/qs850/flash.c index d2f169b..9e276a1 100644 --- a/board/snmc/qs850/flash.c +++ b/board/snmc/qs850/flash.c @@ -29,7 +29,7 @@ #include <asm/u-boot.h> #include <asm/processor.h> -flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ +flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ #define FLASH_WORD_SIZE unsigned long @@ -57,7 +57,7 @@ unsigned long flash_init (void) volatile FLASH_WORD_SIZE* flash_base; /* Init: no FLASHes known */ - for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) { + for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) { flash_info[i].flash_id = FLASH_UNKNOWN; } @@ -87,13 +87,13 @@ unsigned long flash_init (void) } /* Only one bank */ - if (CFG_MAX_FLASH_BANKS == 1) { + if (CONFIG_SYS_MAX_FLASH_BANKS == 1) { /* Setup offsets */ flash_get_offsets ((ulong)flash_base, &flash_info[0]); /* Monitor protection ON by default */ - (void)flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE, - CFG_MONITOR_BASE+CFG_MONITOR_LEN-1, &flash_info[0]); + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE, + CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1, &flash_info[0]); size_b1 = 0 ; flash_info[0].size = size_b0; return(size_b0); @@ -125,8 +125,8 @@ unsigned long flash_init (void) flash_get_offsets (base_b0, &flash_info[0]); /* monitor protection ON by default */ - (void)flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE, - CFG_MONITOR_BASE+CFG_MONITOR_LEN-1, &flash_info[0]); + (void)flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE, + CONFIG_SYS_MONITOR_BASE+CONFIG_SYS_MONITOR_LEN-1, &flash_info[0]); if (size_b1) { /* Re-do sizing to get full correct info */ @@ -134,11 +134,11 @@ unsigned long flash_init (void) flash_get_offsets (base_b1, &flash_info[1]); /* monitor protection ON by default */ - (void)flash_protect(FLAG_PROTECT_SET, base_b1+size_b1-CFG_MONITOR_LEN, + (void)flash_protect(FLAG_PROTECT_SET, base_b1+size_b1-CONFIG_SYS_MONITOR_LEN, base_b1+size_b1-1, &flash_info[1]); /* monitor protection OFF by default (one is enough) */ - (void)flash_protect(FLAG_PROTECT_CLEAR, base_b0+size_b0-CFG_MONITOR_LEN, + (void)flash_protect(FLAG_PROTECT_CLEAR, base_b0+size_b0-CONFIG_SYS_MONITOR_LEN, base_b0+size_b0-1, &flash_info[0]); } else { flash_info[1].flash_id = FLASH_UNKNOWN; @@ -480,7 +480,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) while ((addr[0] & (0x00800080&FLASH_ID_MASK)) != (0x00800080&FLASH_ID_MASK) ) { - if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) { + if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { printf ("Timeout\n"); return 1; } @@ -607,7 +607,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data) start = get_timer(0); while ((*((vu_long *)dest) & 0x00800080) != (data & 0x00800080)) { - if (get_timer(start) > CFG_FLASH_WRITE_TOUT) { + if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { return (1); } } diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c index 2fbe8ae..cc8eaad 100644 --- a/board/snmc/qs850/qs850.c +++ b/board/snmc/qs850/qs850.c @@ -146,7 +146,7 @@ int checkboard (void) phys_size_t initdram (int board_type) { - volatile immap_t *immap = (immap_t *)CFG_IMMR; + volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; long int size; @@ -155,17 +155,17 @@ phys_size_t initdram (int board_type) /* * Prescaler for refresh */ - memctl->memc_mptpr = CFG_MPTPR; + memctl->memc_mptpr = CONFIG_SYS_MPTPR; /* * Map controller bank 1 to the SDRAM address */ - memctl->memc_or1 = CFG_OR1; - memctl->memc_br1 = CFG_BR1; + memctl->memc_or1 = CONFIG_SYS_OR1; + memctl->memc_br1 = CONFIG_SYS_BR1; udelay(1000); /* perform SDRAM initialization sequence */ - memctl->memc_mamr = CFG_16M_MAMR; + memctl->memc_mamr = CONFIG_SYS_16M_MAMR; udelay(100); /* Program the SDRAM's Mode Register */ @@ -192,7 +192,7 @@ phys_size_t initdram (int board_type) /* * Check for 32M SDRAM Memory Size */ - size = dram_size(CFG_32M_MAMR|MAMR_PTAE, + size = dram_size(CONFIG_SYS_32M_MAMR|MAMR_PTAE, (long *)SDRAM_BASE, SDRAM_32M_MAX_SIZE); udelay (1000); @@ -200,7 +200,7 @@ phys_size_t initdram (int board_type) * Check for 16M SDRAM Memory Size */ if (size != SDRAM_32M_MAX_SIZE) { - size = dram_size(CFG_16M_MAMR|MAMR_PTAE, + size = dram_size(CONFIG_SYS_16M_MAMR|MAMR_PTAE, (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE); udelay (1000); } @@ -221,7 +221,7 @@ phys_size_t initdram (int board_type) static long int dram_size (long int mamr_value, long int *base, long int maxsize) { - volatile immap_t *immap = (immap_t *)CFG_IMMR; + volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; memctl->memc_mamr = mamr_value; |