summaryrefslogtreecommitdiff
path: root/board/eric
diff options
context:
space:
mode:
Diffstat (limited to 'board/eric')
-rw-r--r--board/eric/eric.c2
-rw-r--r--board/eric/flash.c48
-rw-r--r--board/eric/init.S2
3 files changed, 26 insertions, 26 deletions
diff --git a/board/eric/eric.c b/board/eric/eric.c
index 972d485b5a6..600b9d7a7ce 100644
--- a/board/eric/eric.c
+++ b/board/eric/eric.c
@@ -142,7 +142,7 @@ phys_size_t initdram (int board_type)
* so let init.S do the init job for SDRAM
* and simply return 32MByte here
*/
- return (CFG_SDRAM_SIZE * 1024 * 1024);
+ return (CONFIG_SYS_SDRAM_SIZE * 1024 * 1024);
#else
/* Read Serial Presence Detect Information */
diff --git a/board/eric/flash.c b/board/eric/flash.c
index 2c7d2a08c40..7e57513aebf 100644
--- a/board/eric/flash.c
+++ b/board/eric/flash.c
@@ -25,10 +25,10 @@
#include <ppc4xx.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 */
-#ifdef CFG_FLASH_16BIT
+#ifdef CONFIG_SYS_FLASH_16BIT
#define FLASH_WORD_SIZE unsigned short
#define FLASH_ID_MASK 0xFFFF
#else
@@ -42,7 +42,7 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
/* stolen from esteem192e/flash.c */
ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info);
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
static int write_word (flash_info_t *info, ulong dest, ulong data);
#else
static int write_short (flash_info_t *info, ulong dest, ushort data);
@@ -61,7 +61,7 @@ unsigned long flash_init (void)
unsigned long base_b0, base_b1;
/* 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;
}
@@ -75,7 +75,7 @@ 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 (FLASH_BASE0_PRELIM, &flash_info[0]);
@@ -88,8 +88,8 @@ unsigned long flash_init (void)
&flash_info[0]);
#else
(void)flash_protect(FLAG_PROTECT_SET,
- CFG_MONITOR_BASE,
- CFG_MONITOR_BASE+monitor_flash_len-1,
+ CONFIG_SYS_MONITOR_BASE,
+ CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1,
&flash_info[0]);
#endif
size_b1 = 0 ;
@@ -137,8 +137,8 @@ unsigned long flash_init (void)
&flash_info[0]);
#else
(void)flash_protect(FLAG_PROTECT_SET,
- CFG_MONITOR_BASE,
- CFG_MONITOR_BASE+monitor_flash_len-1,
+ CONFIG_SYS_MONITOR_BASE,
+ CONFIG_SYS_MONITOR_BASE+monitor_flash_len-1,
&flash_info[0]);
#endif
@@ -187,7 +187,7 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
} else if (info->flash_id & FLASH_BTYPE) {
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
/* set sector offsets for bottom boot block type */
info->start[0] = base + 0x00000000;
info->start[1] = base + 0x00004000;
@@ -241,7 +241,7 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
i = info->sector_count - 1;
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
info->start[i--] = base + info->size - 0x00004000;
info->start[i--] = base + info->size - 0x00008000;
info->start[i--] = base + info->size - 0x0000C000;
@@ -403,7 +403,7 @@ ulong flash_get_size (volatile FLASH_WORD_SIZE *addr, flash_info_t *info)
/* Write auto select command: read Manufacturer ID */
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
/*
* Note: if it is an AMD flash and the word at addr[0000]
@@ -654,7 +654,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
/* Disable interrupts which might cause a timeout here */
flag = disable_interrupts();
if(info->flash_id < FLASH_AMD_COMP) {
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
addr[0x0555] = 0x00AA00AA;
addr[0x02AA] = 0x00550055;
addr[0x0555] = 0x00800080;
@@ -695,7 +695,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;
}
@@ -716,7 +716,7 @@ DONE:
for (sect = s_first; sect<=s_last; sect++) {
if (info->protect[sect] == 0) { /* not protected */
barf = 0;
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
addr = (vu_long*)(info->start[sect]);
addr[0] = 0x00200020;
addr[0] = 0x00D000D0;
@@ -767,7 +767,7 @@ DONE:
flash_info_t *info;
int i;
- for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
+ for (i=0, info=&flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
if ((addr >= info->start[0]) &&
(addr < (info->start[0] + info->size)) ) {
return (info);
@@ -844,7 +844,7 @@ DONE:
int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
{
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
ulong cp, wp, data;
int l;
#else
@@ -853,7 +853,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
#endif
int i, rc;
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
wp = (addr & ~3); /* get lower word aligned address */
@@ -980,7 +980,7 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
* 1 - write timeout
* 2 - Flash not erased
*/
-#ifndef CFG_FLASH_16BIT
+#ifndef CONFIG_SYS_FLASH_16BIT
static int write_word (flash_info_t * info, ulong dest, ulong data)
{
vu_long *addr = (vu_long *) (info->start[0]);
@@ -1018,7 +1018,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
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);
}
}
@@ -1026,7 +1026,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
} else {
while (!(addr[0] & 0x00800080)) { /* wait for error or finish */
- if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {
+ if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
return (1);
}
@@ -1093,7 +1093,7 @@ static int write_short (flash_info_t * info, ulong dest, ushort data)
if (info->flash_id < FLASH_AMD_COMP) {
/* AMD stuff */
while ((*((vu_short *) dest) & 0x0080) != (data & 0x0080)) {
- if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {
+ if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
return (1);
}
}
@@ -1101,7 +1101,7 @@ static int write_short (flash_info_t * info, ulong dest, ushort data)
} else {
/* intel stuff */
while (!(addr[0] & 0x0080)) { /* wait for error or finish */
- if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
+ if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT)
return (1);
}
@@ -1120,7 +1120,7 @@ static int write_short (flash_info_t * info, ulong dest, ushort data)
*addr = 0x00B0;
*addr = 0x0070;
while (!(addr[0] & 0x0080)) { /* wait for error or finish */
- if (get_timer (start) > CFG_FLASH_WRITE_TOUT)
+ if (get_timer (start) > CONFIG_SYS_FLASH_WRITE_TOUT)
return (1);
}
*addr = 0x00FF;
diff --git a/board/eric/init.S b/board/eric/init.S
index 9d4e7ff4824..2304cc7bbe6 100644
--- a/board/eric/init.S
+++ b/board/eric/init.S
@@ -219,7 +219,7 @@ sdram_init:
mflr r31
-#ifdef CFG_SDRAM_MANUALLY
+#ifdef CONFIG_SYS_SDRAM_MANUALLY
/*------------------------------------------------------------------- */
/* Set MB0CF for bank 0. (0-32MB) Address Mode 4 since 12x8(2) */
/*------------------------------------------------------------------- */