diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-10-16 15:01:15 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 21:54:03 +0200 |
commit | 6d0f6bcf337c5261c08fabe12982178c2c489d76 (patch) | |
tree | ae13958ffa9c6b58c2ea97aac07a4ad2f04a350f /board/gth | |
parent | 71edc271816ec82cf0550dd6980be2da3cc2ad9e (diff) | |
download | u-boot-imx-6d0f6bcf337c5261c08fabe12982178c2c489d76.zip u-boot-imx-6d0f6bcf337c5261c08fabe12982178c2c489d76.tar.gz u-boot-imx-6d0f6bcf337c5261c08fabe12982178c2c489d76.tar.bz2 |
rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'board/gth')
-rw-r--r-- | board/gth/ee_access.c | 14 | ||||
-rw-r--r-- | board/gth/ee_dev.h | 8 | ||||
-rw-r--r-- | board/gth/flash.c | 42 | ||||
-rw-r--r-- | board/gth/gth.c | 18 | ||||
-rw-r--r-- | board/gth/pcmcia.c | 8 |
5 files changed, 45 insertions, 45 deletions
diff --git a/board/gth/ee_access.c b/board/gth/ee_access.c index 716c90e..2a33a0e 100644 --- a/board/gth/ee_access.c +++ b/board/gth/ee_access.c @@ -152,7 +152,7 @@ read_byte(void){ int i; int Value; u8 Result=0; -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR u32 Flags; #endif @@ -162,7 +162,7 @@ read_byte(void){ /* Small delay between pulses */ udelay(1); -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR /* Disable irq */ save_flags(Flags); cli(); @@ -182,7 +182,7 @@ read_byte(void){ if(Value) Value=1; -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR /* Enable irq */ restore_flags(Flags); #endif @@ -205,7 +205,7 @@ write_byte(u8 Byte){ Write LSb first */ int i; int Value; -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR u32 Flags; #endif @@ -216,7 +216,7 @@ write_byte(u8 Byte){ udelay(1); Value = Byte&1; -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR /* Disable irq */ save_flags(Flags); cli(); @@ -237,7 +237,7 @@ write_byte(u8 Byte){ WRITE_PORT(1); -#ifndef CFG_IMMR +#ifndef CONFIG_SYS_IMMR /* Enable irq */ restore_flags(Flags); #endif @@ -289,7 +289,7 @@ int ee_init_data(void){ int i; u8 Tx[10]; int tmp; - volatile immap_t *immap = (immap_t *)CFG_IMMR; + volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; while(0){ tmp = 1-tmp; diff --git a/board/gth/ee_dev.h b/board/gth/ee_dev.h index 417c7b6..3004b46 100644 --- a/board/gth/ee_dev.h +++ b/board/gth/ee_dev.h @@ -9,10 +9,10 @@ #define E_DEBUG(fmt,args...) if( Debug ) printk(KERN_DEBUG"EE: " fmt, ##args) -#define PORT_B_PAR ((volatile immap_t *)CFG_IMMR)->im_cpm.cp_pbpar -#define PORT_B_ODR ((volatile immap_t *)CFG_IMMR)->im_cpm.cp_pbodr -#define PORT_B_DIR ((volatile immap_t *)CFG_IMMR)->im_cpm.cp_pbdir -#define PORT_B_DAT ((volatile immap_t *)CFG_IMMR)->im_cpm.cp_pbdat +#define PORT_B_PAR ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbpar +#define PORT_B_ODR ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbodr +#define PORT_B_DIR ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdir +#define PORT_B_DAT ((volatile immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_pbdat #define SET_PORT_B_INPUT(Mask) PORT_B_DIR &= ~(Mask) #define SET_PORT_B_OUTPUT(Mask) PORT_B_DIR |= Mask diff --git a/board/gth/flash.c b/board/gth/flash.c index 11e105e..169270b 100644 --- a/board/gth/flash.c +++ b/board/gth/flash.c @@ -24,7 +24,7 @@ #include <common.h> #include <mpc8xx.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 */ /*----------------------------------------------------------------------- * Functions @@ -44,7 +44,7 @@ static void flash_get_offsets (ulong base, flash_info_t *info); unsigned long flash_init (void) { - volatile immap_t *immap = (immap_t *)CFG_IMMR; + volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; unsigned long size_b0, size_b1; int i; @@ -54,7 +54,7 @@ unsigned long flash_init (void) return(0x1fffff); /* 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; } @@ -90,45 +90,45 @@ unsigned long flash_init (void) size_b1 = 0; /* Remap FLASH according to real size */ - memctl->memc_or0 = CFG_OR0_PRELIM; - memctl->memc_br0 = CFG_BR0_PRELIM; + memctl->memc_or0 = CONFIG_SYS_OR0_PRELIM; + memctl->memc_br0 = CONFIG_SYS_BR0_PRELIM; /* Re-do sizing to get full correct info */ - size_b0 = flash_get_size((vu_long *)CFG_FLASH_BASE, &flash_info[0]); + size_b0 = flash_get_size((vu_long *)CONFIG_SYS_FLASH_BASE, &flash_info[0]); - flash_get_offsets (CFG_FLASH_BASE, &flash_info[0]); + flash_get_offsets (CONFIG_SYS_FLASH_BASE, &flash_info[0]); -#if CFG_MONITOR_BASE >= CFG_FLASH_BASE +#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE /* monitor protection ON by default */ (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 if (size_b1) { - /* memctl->memc_or1 = CFG_OR1_PRELIM; - memctl->memc_br1 = CFG_BR1_PRELIM; */ + /* memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; + memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; */ /* Re-do sizing to get full correct info */ - size_b1 = flash_get_size((vu_long *)(CFG_FLASH_BASE + size_b0), + size_b1 = flash_get_size((vu_long *)(CONFIG_SYS_FLASH_BASE + size_b0), &flash_info[1]); - flash_get_offsets (CFG_FLASH_BASE + size_b0, &flash_info[1]); + flash_get_offsets (CONFIG_SYS_FLASH_BASE + size_b0, &flash_info[1]); -#if CFG_MONITOR_BASE >= CFG_FLASH_BASE +#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE /* monitor protection ON by default */ (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[1]); #endif } else { -/* memctl->memc_or1 = CFG_OR1_PRELIM; - FIXME memctl->memc_br1 = CFG_BR1_PRELIM; */ +/* memctl->memc_or1 = CONFIG_SYS_OR1_PRELIM; + FIXME memctl->memc_br1 = CONFIG_SYS_BR1_PRELIM; */ flash_info[1].flash_id = FLASH_UNKNOWN; flash_info[1].sector_count = -1; @@ -501,7 +501,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) while ((addr[0] & 0xFFFFFFFF) != 0xFFFFFFFF) #endif { - if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) { + if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) { printf ("Timeout\n"); return 1; } @@ -638,7 +638,7 @@ static int write_word (flash_info_t *info, ulong dest, ulong data) while ((*((vu_long *)dest) & 0x80808080) != (data & 0x80808080)) #endif { - if (get_timer(start) > CFG_FLASH_WRITE_TOUT) { + if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) { return (1); } } diff --git a/board/gth/gth.c b/board/gth/gth.c index 788a6a0..4399db2 100644 --- a/board/gth/gth.c +++ b/board/gth/gth.c @@ -38,7 +38,7 @@ int checkboard (void) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; int Id = 0; int Rev = 0; u32 Pbdat; @@ -162,7 +162,7 @@ const uint fpga_table[] = { int _initsdram (uint base, uint * noMbytes) { - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; volatile memctl8xx_t *mc = &immap->im_memctl; volatile u32 *memptr; @@ -235,7 +235,7 @@ int _initsdram (uint base, uint * noMbytes) void _sdramdisable (void) { - 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_br1 = 0x00000000; @@ -345,7 +345,7 @@ do \ static void write_bootdata (volatile u16 * addr, u8 System, u8 Count) { u16 data; - volatile u16 *flash = (u16 *) (CFG_FLASH_BASE); + volatile u16 *flash = (u16 *) (CONFIG_SYS_FLASH_BASE); if ((System != FAILSAFE_BOOT) & (System != SYSTEM_BOOT)) { printf ("Invalid system data %u, setting failsafe\n", System); @@ -376,12 +376,12 @@ static void write_bootdata (volatile u16 * addr, u8 System, u8 Count) static void maybe_update_restart_reason (volatile u32 * addr32) { /* Update addr if sw wd restart */ - volatile u16 *flash = (u16 *) (CFG_FLASH_BASE); + volatile u16 *flash = (u16 *) (CONFIG_SYS_FLASH_BASE); volatile u16 *addr_16 = (u16 *) addr32; u32 rsr; /* Dont reset register now */ - rsr = ((volatile immap_t *) CFG_IMMR)->im_clkrst.car_rsr; + rsr = ((volatile immap_t *) CONFIG_SYS_IMMR)->im_clkrst.car_rsr; rsr >>= 24; @@ -419,7 +419,7 @@ static void check_restart_reason (void) int i; volatile u32 *raddr; - raddr = (u32 *) (CFG_FLASH_BASE + POWER_OFFSET); + raddr = (u32 *) (CONFIG_SYS_FLASH_BASE + POWER_OFFSET); if (*raddr == 0xFFFFFFFF) { /* Nothing written */ @@ -456,7 +456,7 @@ static void check_boot_tries (void) u8 system; u8 count; - addr = (u16 *) (CFG_FLASH_BASE + BOOTDATA_OFFSET); + addr = (u16 *) (CONFIG_SYS_FLASH_BASE + BOOTDATA_OFFSET); if (*addr == 0xFFFF) { printf ("*** No bootdata exists. ***\n"); @@ -528,7 +528,7 @@ int misc_init_r (void) u8 Tx[5]; int page; int read = 0; - volatile immap_t *immap = (immap_t *) CFG_IMMR; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; /* Kill fpga */ immap->im_ioport.iop_papar &= ~(PA_FL_CONFIG | PA_FL_CE); diff --git a/board/gth/pcmcia.c b/board/gth/pcmcia.c index cffcbde..a4db16d 100644 --- a/board/gth/pcmcia.c +++ b/board/gth/pcmcia.c @@ -31,10 +31,10 @@ int pcmcia_hardware_enable (int slot) debug ("hardware_enable: GTH Slot %c\n", 'A' + slot); - immap = (immap_t *) CFG_IMMR; - sysp = (sysconf8xx_t *) (&(((immap_t *) CFG_IMMR)->im_siu_conf)); - pcmp = (pcmconf8xx_t *) (&(((immap_t *) CFG_IMMR)->im_pcmcia)); - cp = (cpm8xx_t *) (&(((immap_t *) CFG_IMMR)->im_cpm)); + immap = (immap_t *) CONFIG_SYS_IMMR; + sysp = (sysconf8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_siu_conf)); + pcmp = (pcmconf8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_pcmcia)); + cp = (cpm8xx_t *) (&(((immap_t *) CONFIG_SYS_IMMR)->im_cpm)); /* clear interrupt state, and disable interrupts */ pcmp->pcmc_pscr = PCMCIA_MASK (_slot_); |