diff options
Diffstat (limited to 'board/eltec/bab7xx')
-rw-r--r-- | board/eltec/bab7xx/asm_init.S | 30 | ||||
-rw-r--r-- | board/eltec/bab7xx/bab7xx.c | 10 | ||||
-rw-r--r-- | board/eltec/bab7xx/flash.c | 12 | ||||
-rw-r--r-- | board/eltec/bab7xx/l2cache.c | 6 | ||||
-rw-r--r-- | board/eltec/bab7xx/misc.c | 14 | ||||
-rw-r--r-- | board/eltec/bab7xx/pci.c | 32 | ||||
-rw-r--r-- | board/eltec/bab7xx/srom.h | 4 |
7 files changed, 54 insertions, 54 deletions
diff --git a/board/eltec/bab7xx/asm_init.S b/board/eltec/bab7xx/asm_init.S index 2a9b33e..a85fb8b 100644 --- a/board/eltec/bab7xx/asm_init.S +++ b/board/eltec/bab7xx/asm_init.S @@ -125,7 +125,7 @@ board_asm_init: lis r2, 0xfee0 ori r2, r2, 0xcfc -#ifdef CFG_ADDRESS_MAP_A +#ifdef CONFIG_SYS_ADDRESS_MAP_A /* * Switch to address map A if necessary. */ @@ -835,17 +835,17 @@ toggleError2: /* * Get base addr of ISA I/O space */ - lis r6, CFG_ISA_IO@h - ori r6, r6, CFG_ISA_IO@l + lis r6, CONFIG_SYS_ISA_IO@h + ori r6, r6, CONFIG_SYS_ISA_IO@l /* * Set offset to base address for config registers. */ -#if defined(CFG_NS87308_BADDR_0x) +#if defined(CONFIG_SYS_NS87308_BADDR_0x) addi r4, r0, 0x0279 -#elif defined(CFG_NS87308_BADDR_10) +#elif defined(CONFIG_SYS_NS87308_BADDR_10) addi r4, r0, 0x015C -#elif defined(CFG_NS87308_BADDR_11) +#elif defined(CONFIG_SYS_NS87308_BADDR_11) addi r4, r0, 0x002E #endif add r6, r6, r4 /* add offset to base */ @@ -867,7 +867,7 @@ toggleError2: addi r5, r0, SIO_LUNENABLE bl .sio_bw - lis r8, CFG_ISA_IO@h + lis r8, CONFIG_SYS_ISA_IO@h ori r8, r8, 0x0460 li r9, 0x03 stb r9, 0(r8) /* select PMC2 register */ @@ -898,7 +898,7 @@ toggleError2: /* * Init COM1 for polled output */ - lis r8, CFG_ISA_IO@h + lis r8, CONFIG_SYS_ISA_IO@h ori r8, r8, 0x03f8 li r9, 0x00 stb r9, 1(r8) /* int disabled */ @@ -972,8 +972,8 @@ waitEmpty1: /* * Get base addr of ISA I/O space */ - lis r3, CFG_ISA_IO@h - ori r3, r3, CFG_ISA_IO@l + lis r3, CONFIG_SYS_ISA_IO@h + ori r3, r3, CONFIG_SYS_ISA_IO@l addi r3, r3, 0x015C /* adjust to superI/O 87308 base */ or r6, r3, r3 /* make a copy */ @@ -1076,7 +1076,7 @@ waitEmpty1: */ .globl Printf Printf: - lis r10, CFG_ISA_IO@h /* COM1 port */ + lis r10, CONFIG_SYS_ISA_IO@h /* COM1 port */ ori r10, r10, 0x03f8 WaitChr: @@ -1107,7 +1107,7 @@ OutHex4: OutHex: li r9, 28 /* shift reg for 8 digits */ OHstart: - lis r10, CFG_ISA_IO@h /* COM1 port */ + lis r10, CONFIG_SYS_ISA_IO@h /* COM1 port */ ori r10, r10, 0x03f8 OutDig: lbz r0, 5(r10) /* read link status */ @@ -1149,7 +1149,7 @@ OutDec: mullw r10, r0, r6 subf r7, r10, r3 - lis r10, CFG_ISA_IO@h /* COM1 port */ + lis r10, CONFIG_SYS_ISA_IO@h /* COM1 port */ ori r10, r10, 0x03f8 or. r7, r7, r7 @@ -1198,7 +1198,7 @@ OutDec6: */ .globl OutChr OutChr: - lis r10, CFG_ISA_IO@h /* COM1 port */ + lis r10, CONFIG_SYS_ISA_IO@h /* COM1 port */ ori r10, r10, 0x03f8 OutChr1: @@ -1216,7 +1216,7 @@ OutChr1: spdRead: mfspr r26, 8 /* save link register */ - lis r30, CFG_ISA_IO@h + lis r30, CONFIG_SYS_ISA_IO@h ori r30, r30, 0x220 /* GPIO Port 1 */ li r7, 0x00 li r8, 0x100 diff --git a/board/eltec/bab7xx/bab7xx.c b/board/eltec/bab7xx/bab7xx.c index 8c56116..1f78f8d 100644 --- a/board/eltec/bab7xx/bab7xx.c +++ b/board/eltec/bab7xx/bab7xx.c @@ -44,7 +44,7 @@ ulong bab7xx_get_bus_freq (void) * The GPIO Port 1 on BAB7xx reflects the bus speed. */ volatile struct GPIO *gpio = - (struct GPIO *) (CFG_ISA_IO + CFG_NS87308_GPIO_BASE); + (struct GPIO *) (CONFIG_SYS_ISA_IO + CONFIG_SYS_NS87308_GPIO_BASE); unsigned char data = gpio->dta1; @@ -87,7 +87,7 @@ int checkcpu (void) int checkboard (void) { -#ifdef CFG_ADDRESS_MAP_A +#ifdef CONFIG_SYS_ADDRESS_MAP_A puts ("Board: ELTEC BAB7xx PReP\n"); #else puts ("Board: ELTEC BAB7xx CHRP\n"); @@ -126,16 +126,16 @@ long int dram_size (int board_type) register unsigned long i, msar1, mear1, memSize; -#if defined(CFG_MEMTEST) +#if defined(CONFIG_SYS_MEMTEST) register unsigned long reg; printf ("Testing DRAM\n"); /* write each mem addr with it's address */ - for (reg = CFG_MEMTEST_START; reg < CFG_MEMTEST_END; reg += 4) + for (reg = CONFIG_SYS_MEMTEST_START; reg < CONFIG_SYS_MEMTEST_END; reg += 4) *reg = reg; - for (reg = CFG_MEMTEST_START; reg < CFG_MEMTEST_END; reg += 4) { + for (reg = CONFIG_SYS_MEMTEST_START; reg < CONFIG_SYS_MEMTEST_END; reg += 4) { if (*reg != reg) return -1; } diff --git a/board/eltec/bab7xx/flash.c b/board/eltec/bab7xx/flash.c index 442dd00..21ae098 100644 --- a/board/eltec/bab7xx/flash.c +++ b/board/eltec/bab7xx/flash.c @@ -34,7 +34,7 @@ #include <asm/processor.h> #include <asm/pci_io.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 */ ulong flash_get_size (vu_long *addr, flash_info_t *info); static int write_word (flash_info_t *info, ulong dest, ulong data); @@ -55,7 +55,7 @@ unsigned long flash_init (void) int i; /* 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; } @@ -96,8 +96,8 @@ unsigned long flash_init (void) if (size2 == 4*1024*1024) { (void)flash_protect(FLAG_PROTECT_SET, - CFG_FLASH_BASE, - CFG_FLASH_BASE+monitor_flash_len-1, + CONFIG_SYS_FLASH_BASE, + CONFIG_SYS_FLASH_BASE+monitor_flash_len-1, &flash_info[1]); } @@ -370,7 +370,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) last = start; addr = (FLASH_WORD_SIZE *)(info->start[l_sect]); while ((addr[0] & (FLASH_WORD_SIZE)0x00800080) != (FLASH_WORD_SIZE)0x00800080) { - if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) { + if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { printf ("Timeout\n"); return 1; } @@ -500,7 +500,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data) start = get_timer (0); while ((dest2[i] & (FLASH_WORD_SIZE)0x00800080) != (data2[i] & (FLASH_WORD_SIZE)0x00800080)) { - if (get_timer(start) > CFG_FLASH_WRITE_TOUT) { + if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { return (1); } } diff --git a/board/eltec/bab7xx/l2cache.c b/board/eltec/bab7xx/l2cache.c index 1e75377..787704f 100644 --- a/board/eltec/bab7xx/l2cache.c +++ b/board/eltec/bab7xx/l2cache.c @@ -23,7 +23,7 @@ #include <common.h> -#if defined(CFG_L2_BAB7xx) +#if defined(CONFIG_SYS_L2_BAB7xx) #include <pci.h> #include <mpc106.h> @@ -77,7 +77,7 @@ int l2_cache_enable (int l2control) pci_write_config_dword (devbusfn, PCI_PICR2, reg32); /* cache size */ - if (*(volatile unsigned char *) (CFG_ISA_IO + 0x220) & 0x04) + if (*(volatile unsigned char *) (CONFIG_SYS_ISA_IO + 0x220) & 0x04) { /* cache size is 512 KB */ picr2CacheSize = PICR2_L2_SIZE_512K; @@ -156,4 +156,4 @@ int l2_cache_enable (int l2control) /*----------------------------------------------------------------------------*/ -#endif /* (CFG_L2_BAB7xx) */ +#endif /* (CONFIG_SYS_L2_BAB7xx) */ diff --git a/board/eltec/bab7xx/misc.c b/board/eltec/bab7xx/misc.c index 6a24807..1c94a76 100644 --- a/board/eltec/bab7xx/misc.c +++ b/board/eltec/bab7xx/misc.c @@ -31,7 +31,7 @@ #include "srom.h" /* imports */ -extern char console_buffer[CFG_CBSIZE]; +extern char console_buffer[CONFIG_SYS_CBSIZE]; extern int l2_cache_enable (int l2control); extern void *nvram_read (void *dest, const short src, size_t count); extern void nvram_write (short dest, const void *src, size_t count); @@ -134,7 +134,7 @@ int misc_init_r (void) SECOND_DEVICE, FIRST_BLOCK); /* read out current nvram shadow image */ - nvram_read (buf, CFG_NV_SROM_COPY_ADDR, CFG_SROM_SIZE); + nvram_read (buf, CONFIG_SYS_NV_SROM_COPY_ADDR, CONFIG_SYS_SROM_SIZE); if (strcmp (eerev.magic, "ELTEC") != 0) { @@ -162,8 +162,8 @@ int misc_init_r (void) copyNv = 1; /* copy to nvram */ } - if ((copyNv == 0) && (el_srom_checksum((u_char*)&eerev, CFG_SROM_SIZE) != - el_srom_checksum((u_char*)buf, CFG_SROM_SIZE))) + if ((copyNv == 0) && (el_srom_checksum((u_char*)&eerev, CONFIG_SYS_SROM_SIZE) != + el_srom_checksum((u_char*)buf, CONFIG_SYS_SROM_SIZE))) { printf ("Invalid revision info copy in nvram !\n"); printf ("Press key:\n <c> to copy current revision info to nvram.\n"); @@ -304,13 +304,13 @@ int misc_init_r (void) printf("OK\n\n"); /* write new values as shadow image to nvram */ - nvram_write (CFG_NV_SROM_COPY_ADDR, (void *)&eerev, CFG_SROM_SIZE); + nvram_write (CONFIG_SYS_NV_SROM_COPY_ADDR, (void *)&eerev, CONFIG_SYS_SROM_SIZE); } /*if (initSrom) */ /* copy current values as shadow image to nvram */ if (initSrom == 0 && copyNv == 1) - nvram_write (CFG_NV_SROM_COPY_ADDR, (void *)&eerev, CFG_SROM_SIZE); + nvram_write (CONFIG_SYS_NV_SROM_COPY_ADDR, (void *)&eerev, CONFIG_SYS_SROM_SIZE); /* update environment */ sprintf (buf, "%02x:%02x:%02x:%02x:%02x:%02x", @@ -333,7 +333,7 @@ int misc_init_r (void) /* * L2 cache configuration */ -#if defined(CFG_L2_BAB7xx) +#if defined(CONFIG_SYS_L2_BAB7xx) ptr = getenv("l2cache"); if (*ptr == '0') { diff --git a/board/eltec/bab7xx/pci.c b/board/eltec/bab7xx/pci.c index edbd3dd..46e5a8b 100644 --- a/board/eltec/bab7xx/pci.c +++ b/board/eltec/bab7xx/pci.c @@ -43,41 +43,41 @@ void pci_init_board(void) hose->last_busno = 0xff; pci_set_region(hose->regions + 0, - CFG_PCI_MEMORY_BUS, - CFG_PCI_MEMORY_PHYS, + CONFIG_SYS_PCI_MEMORY_BUS, + CONFIG_SYS_PCI_MEMORY_PHYS, /* * Attention: pci_hose_phys_to_bus() failes in address compare, - * so we need (CFG_PCI_MEMORY_SIZE-1) + * so we need (CONFIG_SYS_PCI_MEMORY_SIZE-1) */ - CFG_PCI_MEMORY_SIZE-1, + CONFIG_SYS_PCI_MEMORY_SIZE-1, PCI_REGION_MEM | PCI_REGION_MEMORY); /* PCI memory space */ pci_set_region(hose->regions + 1, - CFG_PCI_MEM_BUS, - CFG_PCI_MEM_PHYS, - CFG_PCI_MEM_SIZE, + CONFIG_SYS_PCI_MEM_BUS, + CONFIG_SYS_PCI_MEM_PHYS, + CONFIG_SYS_PCI_MEM_SIZE, PCI_REGION_MEM); /* ISA/PCI memory space */ pci_set_region(hose->regions + 2, - CFG_ISA_MEM_BUS, - CFG_ISA_MEM_PHYS, - CFG_ISA_MEM_SIZE, + CONFIG_SYS_ISA_MEM_BUS, + CONFIG_SYS_ISA_MEM_PHYS, + CONFIG_SYS_ISA_MEM_SIZE, PCI_REGION_MEM); /* PCI I/O space */ pci_set_region(hose->regions + 3, - CFG_PCI_IO_BUS, - CFG_PCI_IO_PHYS, - CFG_PCI_IO_SIZE, + CONFIG_SYS_PCI_IO_BUS, + CONFIG_SYS_PCI_IO_PHYS, + CONFIG_SYS_PCI_IO_SIZE, PCI_REGION_IO); /* ISA/PCI I/O space */ pci_set_region(hose->regions + 4, - CFG_ISA_IO_BUS, - CFG_ISA_IO_PHYS, - CFG_ISA_IO_SIZE, + CONFIG_SYS_ISA_IO_BUS, + CONFIG_SYS_ISA_IO_PHYS, + CONFIG_SYS_ISA_IO_SIZE, PCI_REGION_IO); hose->region_count = 5; diff --git a/board/eltec/bab7xx/srom.h b/board/eltec/bab7xx/srom.h index c18ab91..504b742 100644 --- a/board/eltec/bab7xx/srom.h +++ b/board/eltec/bab7xx/srom.h @@ -40,8 +40,8 @@ #define SROM_SHORT(pX) (*(u8 *)(pX) | *((u8 *)(pX)+1) << 8) /* bab7xx ELTEC srom */ -#define I2C_BUS_DAT (CFG_ISA_IO + 0x220) -#define I2C_BUS_DIR (CFG_ISA_IO + 0x221) +#define I2C_BUS_DAT (CONFIG_SYS_ISA_IO + 0x220) +#define I2C_BUS_DIR (CONFIG_SYS_ISA_IO + 0x221) /* srom at mpc107 */ #define MPC107_I2CADDR (mpc107_eumb_addr + 0x3000) /* address */ |