diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-10-16 13:01:15 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 19:54:03 (GMT) |
commit | 6d0f6bcf337c5261c08fabe12982178c2c489d76 (patch) | |
tree | ae13958ffa9c6b58c2ea97aac07a4ad2f04a350f /cpu/leon2 | |
parent | 71edc271816ec82cf0550dd6980be2da3cc2ad9e (diff) | |
download | u-boot-6d0f6bcf337c5261c08fabe12982178c2c489d76.tar.xz |
rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'cpu/leon2')
-rw-r--r-- | cpu/leon2/interrupts.c | 8 | ||||
-rw-r--r-- | cpu/leon2/prom.c | 50 | ||||
-rw-r--r-- | cpu/leon2/serial.c | 2 | ||||
-rw-r--r-- | cpu/leon2/start.S | 36 |
4 files changed, 48 insertions, 48 deletions
diff --git a/cpu/leon2/interrupts.c b/cpu/leon2/interrupts.c index 35b375c..9b0da96 100644 --- a/cpu/leon2/interrupts.c +++ b/cpu/leon2/interrupts.c @@ -98,8 +98,8 @@ static void leon2_ic_enable(unsigned int irq) void handler_irq(int irq, struct pt_regs *regs) { if (irq_handlers[irq].handler) { - if (((unsigned int)irq_handlers[irq].handler > CFG_RAM_END) || - ((unsigned int)irq_handlers[irq].handler < CFG_RAM_BASE) + if (((unsigned int)irq_handlers[irq].handler > CONFIG_SYS_RAM_END) || + ((unsigned int)irq_handlers[irq].handler < CONFIG_SYS_RAM_BASE) ) { printf("handler_irq: bad handler: %x, irq number %d\n", (unsigned int)irq_handlers[irq].handler, irq); @@ -163,8 +163,8 @@ void irq_install_handler(int irq, interrupt_handler_t * handler, void *arg) printf("irq_install_handler: 0x%08lx replacing 0x%08lx\n", (ulong) handler, (ulong) irq_handlers[irq].handler); - if (((unsigned int)handler > CFG_RAM_END) || - ((unsigned int)handler < CFG_RAM_BASE) + if (((unsigned int)handler > CONFIG_SYS_RAM_END) || + ((unsigned int)handler < CONFIG_SYS_RAM_BASE) ) { printf("irq_install_handler: bad handler: %x, irq number %d\n", (unsigned int)handler, irq); diff --git a/cpu/leon2/prom.c b/cpu/leon2/prom.c index b031995..1a6c7f7 100644 --- a/cpu/leon2/prom.c +++ b/cpu/leon2/prom.c @@ -45,14 +45,14 @@ extern struct linux_romvec *kernel_arg_promvec; /* for __va */ extern int __prom_start; #define PAGE_OFFSET 0xf0000000 -#define phys_base CFG_SDRAM_BASE +#define phys_base CONFIG_SYS_SDRAM_BASE #define PROM_OFFS 8192 #define PROM_SIZE_MASK (PROM_OFFS-1) #define __va(x) ( \ (void *)( ((unsigned long)(x))-PROM_OFFS+ \ - (CFG_PROM_OFFSET-phys_base)+PAGE_OFFSET-TEXT_BASE ) \ + (CONFIG_SYS_PROM_OFFSET-phys_base)+PAGE_OFFSET-TEXT_BASE ) \ ) -#define __phy(x) ((void *)(((unsigned long)(x))-PROM_OFFS+CFG_PROM_OFFSET-TEXT_BASE)) +#define __phy(x) ((void *)(((unsigned long)(x))-PROM_OFFS+CONFIG_SYS_PROM_OFFSET-TEXT_BASE)) struct property { char *name; @@ -540,13 +540,13 @@ static struct leon_prom_info PROM_DATA spi = { __va(&spi.totphys), { NULL, - (char *)CFG_SDRAM_BASE, + (char *)CONFIG_SYS_SDRAM_BASE, 0, }, __va(&spi.avail), { NULL, - (char *)CFG_SDRAM_BASE, + (char *)CONFIG_SYS_SDRAM_BASE, 0, }, NULL, /* prommap_p */ @@ -654,7 +654,7 @@ static void PROM_TEXT leon_reboot(char *bcommand) /* get physical address */ struct leon_prom_info *pspi = - (void *)(CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (void *)(CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); unsigned int *srmmu_ctx_table; @@ -707,7 +707,7 @@ static void PROM_TEXT leon_reboot_physical(char *bcommand) srmmu_set_mmureg(0); /* Hardcoded start address */ - reset = CFG_MONITOR_BASE; + reset = CONFIG_SYS_MONITOR_BASE; /* flush data cache */ sparc_dcache_flush_all(); @@ -762,7 +762,7 @@ static int PROM_TEXT no_nextnode(int node) { /* get physical address */ struct leon_prom_info *pspi = - (void *)(CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (void *)(CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); /* convert into virtual address */ pspi = (struct leon_prom_info *) @@ -777,7 +777,7 @@ static int PROM_TEXT no_child(int node) { /* get physical address */ struct leon_prom_info *pspi = (struct leon_prom_info *) - (CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); /* convert into virtual address */ pspi = (struct leon_prom_info *) @@ -792,7 +792,7 @@ static struct property PROM_TEXT *find_property(int node, char *name) { /* get physical address */ struct leon_prom_info *pspi = (struct leon_prom_info *) - (CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); /* convert into virtual address */ pspi = (struct leon_prom_info *) @@ -811,7 +811,7 @@ static int PROM_TEXT no_proplen(int node, char *name) { /* get physical address */ struct leon_prom_info *pspi = (struct leon_prom_info *) - (CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); /* convert into virtual address */ pspi = (struct leon_prom_info *) @@ -827,7 +827,7 @@ static int PROM_TEXT no_getprop(int node, char *name, char *value) { /* get physical address */ struct leon_prom_info *pspi = (struct leon_prom_info *) - (CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); /* convert into virtual address */ pspi = (struct leon_prom_info *) @@ -850,7 +850,7 @@ static char PROM_TEXT *no_nextprop(int node, char *name) { /* get physical address */ struct leon_prom_info *pspi = (struct leon_prom_info *) - (CFG_PROM_OFFSET + sizeof(srmmu_tables)); + (CONFIG_SYS_PROM_OFFSET + sizeof(srmmu_tables)); struct property *prop; /* convert into virtual address */ @@ -906,7 +906,7 @@ void leon_prom_init(struct leon_prom_info *pspi) pspi->freq_khz = CONFIG_SYS_CLK_FREQ / 1000; /* Set Available main memory size */ - pspi->totphys.num_bytes = CFG_PROM_OFFSET - CFG_SDRAM_BASE; + pspi->totphys.num_bytes = CONFIG_SYS_PROM_OFFSET - CONFIG_SYS_SDRAM_BASE; pspi->avail.num_bytes = pspi->totphys.num_bytes; #undef nodes @@ -951,7 +951,7 @@ extern unsigned short bss_start, bss_end; int prom_init(void) { struct leon_prom_info *pspi = (void *) - ((((unsigned int)&spi) & PROM_SIZE_MASK) + CFG_PROM_OFFSET); + ((((unsigned int)&spi) & PROM_SIZE_MASK) + CONFIG_SYS_PROM_OFFSET); /* disable mmu */ srmmu_set_mmureg(0x00000000); @@ -977,7 +977,7 @@ void prepare_bootargs(char *bootargs) /* if no bootargs set, skip copying ==> default bootline */ if (bootargs && (*bootargs != '\0')) { pspi = (void *)((((unsigned int)&spi) & PROM_SIZE_MASK) + - CFG_PROM_OFFSET); + CONFIG_SYS_PROM_OFFSET); src = bootargs; dst = &pspi->arg[0]; left = 255; /* max len */ @@ -994,7 +994,7 @@ void srmmu_init_cpu(unsigned int entry) { sparc_srmmu_setup *psrmmu_tables = (void *) ((((unsigned int)&srmmu_tables) & PROM_SIZE_MASK) + - CFG_PROM_OFFSET); + CONFIG_SYS_PROM_OFFSET); /* Make context 0 (kernel's context) point * to our prepared memory mapping @@ -1010,21 +1010,21 @@ void srmmu_init_cpu(unsigned int entry) #define PTE 2 #define ACC_SU_ALL 0x1c psrmmu_tables->pgd_table[0xf0] = - (CFG_SDRAM_BASE >> 4) | ACC_SU_ALL | PTE; + (CONFIG_SYS_SDRAM_BASE >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf1] = - ((CFG_SDRAM_BASE + 0x1000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x1000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf2] = - ((CFG_SDRAM_BASE + 0x2000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x2000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf3] = - ((CFG_SDRAM_BASE + 0x3000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x3000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf4] = - ((CFG_SDRAM_BASE + 0x4000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x4000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf5] = - ((CFG_SDRAM_BASE + 0x5000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x5000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf6] = - ((CFG_SDRAM_BASE + 0x6000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x6000000) >> 4) | ACC_SU_ALL | PTE; psrmmu_tables->pgd_table[0xf7] = - ((CFG_SDRAM_BASE + 0x7000000) >> 4) | ACC_SU_ALL | PTE; + ((CONFIG_SYS_SDRAM_BASE + 0x7000000) >> 4) | ACC_SU_ALL | PTE; /* convert rom vec pointer to virtual address */ kernel_arg_promvec = (struct linux_romvec *) diff --git a/cpu/leon2/serial.c b/cpu/leon2/serial.c index ce9457f..4f41b8e 100644 --- a/cpu/leon2/serial.c +++ b/cpu/leon2/serial.c @@ -57,7 +57,7 @@ int serial_init(void) regs = (LEON2_Uart_regs *) & leon2->UART_Channel_2; #endif - regs->UART_Scaler = CFG_LEON2_UART1_SCALER; + regs->UART_Scaler = CONFIG_SYS_LEON2_UART1_SCALER; /* Let bit 11 be unchanged (debug bit for GRMON) */ tmp = READ_WORD(regs->UART_Control); diff --git a/cpu/leon2/start.S b/cpu/leon2/start.S index f23f499..9b5d83e 100644 --- a/cpu/leon2/start.S +++ b/cpu/leon2/start.S @@ -68,7 +68,7 @@ ARGPUSH = (WINDOWSIZE + 4) MINFRAME = (WINDOWSIZE + ARGPUSHSIZE + 4) /* Number of register windows */ -#ifndef CFG_SPARC_NWINDOWS +#ifndef CONFIG_SYS_SPARC_NWINDOWS #error Must define number of SPARC register windows, default is 8 #endif @@ -280,16 +280,16 @@ leon2_init_ioport: leon2_init_mctrl: /* memory config register 1 */ - set CFG_GRLIB_MEMCFG1, %g2 + set CONFIG_SYS_GRLIB_MEMCFG1, %g2 ld [%g1], %g3 ! and %g3, 0x300, %g3 or %g2, %g3, %g2 st %g2, [%g1 + LEON2_MCFG1] - set CFG_GRLIB_MEMCFG2, %g2 ! Load memory config register 2 + set CONFIG_SYS_GRLIB_MEMCFG2, %g2 ! Load memory config register 2 #if !( defined(TSIM) || !defined(BZIMAGE)) st %g2, [%g1 + LEON2_MCFG2] ! only for prom version, else done by "dumon -i" #endif - set CFG_GRLIB_MEMCFG3, %g2 ! Init FT register + set CONFIG_SYS_GRLIB_MEMCFG3, %g2 ! Init FT register st %g2, [%g1 + LEON2_ECTRL] ld [%g1 + LEON2_ECTRL], %g2 srl %g2, 30, %g2 @@ -310,7 +310,7 @@ leon2_init_psr: nop leon2_init_stackp: - set CFG_INIT_SP_OFFSET, %fp + set CONFIG_SYS_INIT_SP_OFFSET, %fp andn %fp, 0x0f, %fp sub %fp, 64, %sp @@ -327,7 +327,7 @@ cpu_init_unreloc: reloc: set TEXT_START,%g2 set DATA_END,%g3 - set CFG_RELOC_MONITOR_BASE,%g4 + set CONFIG_SYS_RELOC_MONITOR_BASE,%g4 reloc_loop: ldd [%g2],%l0 ldd [%g2+8],%l2 @@ -373,10 +373,10 @@ fixup_got: set __got_end,%g3 /* * new got offset = (old GOT-PTR (read with ld) - - * CFG_RELOC_MONITOR_BASE(from define) ) + + * CONFIG_SYS_RELOC_MONITOR_BASE(from define) ) + * Destination Address (from define) */ - set CFG_RELOC_MONITOR_BASE,%g2 + set CONFIG_SYS_RELOC_MONITOR_BASE,%g2 set TEXT_START, %g1 add %g4,%g2,%g4 sub %g4,%g1,%g4 @@ -397,7 +397,7 @@ got_loop: prom_relocate: set __prom_start, %g2 set __prom_end, %g3 - set CFG_PROM_OFFSET, %g4 + set CONFIG_SYS_PROM_OFFSET, %g4 prom_relocate_loop: ldd [%g2],%l0 @@ -413,7 +413,7 @@ prom_relocate_loop: * the new trap table address */ - set CFG_RELOC_MONITOR_BASE, %g2 + set CONFIG_SYS_RELOC_MONITOR_BASE, %g2 wr %g0, %g2, %tbr /* call relocate*/ @@ -421,14 +421,14 @@ prom_relocate_loop: /* Call relocated init functions */ jump: set cpu_init_f2,%o1 - set CFG_RELOC_MONITOR_BASE,%o2 + set CONFIG_SYS_RELOC_MONITOR_BASE,%o2 add %o1,%o2,%o1 sub %o1,%g1,%o1 call %o1 clr %o0 set board_init_f,%o1 - set CFG_RELOC_MONITOR_BASE,%o2 + set CONFIG_SYS_RELOC_MONITOR_BASE,%o2 add %o1,%o2,%o1 sub %o1,%g1,%o1 call %o1 @@ -454,7 +454,7 @@ _irq_entry: WRITE_PAUSE mov %l7, %o0 ! irq level set handler_irq, %o1 - set (CFG_RELOC_MONITOR_BASE-TEXT_BASE), %o2 + set (CONFIG_SYS_RELOC_MONITOR_BASE-TEXT_BASE), %o2 add %o1, %o2, %o1 call %o1 add %sp, SF_REGS_SZ, %o1 ! pt_regs ptr @@ -472,7 +472,7 @@ _window_overflow: mov %wim, %l3 ! Calculate next WIM mov %g1, %l7 srl %l3, 1, %g1 - sll %l3, (CFG_SPARC_NWINDOWS-1) , %l4 + sll %l3, (CONFIG_SYS_SPARC_NWINDOWS-1) , %l4 or %l4, %g1, %g1 save ! Get into window to be saved. @@ -509,7 +509,7 @@ _window_underflow: mov %wim, %l3 ! Calculate next WIM sll %l3, 1, %l4 - srl %l3, (CFG_SPARC_NWINDOWS-1), %l5 + srl %l3, (CONFIG_SYS_SPARC_NWINDOWS-1), %l5 or %l5, %l4, %l5 mov %l5, %wim nop; nop; nop @@ -578,7 +578,7 @@ trap_setup: */ srl %t_wim, 0x1, %g2 ! begin computation of new %wim - set (CFG_SPARC_NWINDOWS-1), %g3 !NWINDOWS-1 + set (CONFIG_SYS_SPARC_NWINDOWS-1), %g3 !NWINDOWS-1 sll %t_wim, %g3, %t_wim ! NWINDOWS-1 or %t_wim, %g2, %g2 @@ -612,7 +612,7 @@ ret_trap_entry: mov 2, %g1 sll %g1, %t_psr, %g1 - set CFG_SPARC_NWINDOWS, %g2 !NWINDOWS + set CONFIG_SYS_SPARC_NWINDOWS, %g2 !NWINDOWS srl %g1, %g2, %g2 or %g1, %g2, %g1 @@ -622,7 +622,7 @@ ret_trap_entry: sll %g2, 0x1, %g1 /* We have to grab a window before returning. */ - set (CFG_SPARC_NWINDOWS-1), %g3 !NWINDOWS-1 + set (CONFIG_SYS_SPARC_NWINDOWS-1), %g3 !NWINDOWS-1 srl %g2, %g3, %g2 or %g1, %g2, %g1 |