summaryrefslogtreecommitdiff
path: root/board/w7o
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-12-17 16:53:07 +0100
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-12-17 16:53:07 +0100
commitcb5473205206c7f14cbb1e747f28ec75b48826e2 (patch)
tree8f4808d60917100b18a10b05230f7638a0a9bbcc /board/w7o
parentbaf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff)
parent92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff)
downloadu-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip
u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.gz
u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.bz2
Merge branch 'fixes' into cleanups
Conflicts: board/atmel/atngw100/atngw100.c board/atmel/atstk1000/atstk1000.c cpu/at32ap/at32ap700x/gpio.c include/asm-avr32/arch-at32ap700x/clk.h include/configs/atngw100.h include/configs/atstk1002.h include/configs/atstk1003.h include/configs/atstk1004.h include/configs/atstk1006.h include/configs/favr-32-ezkit.h include/configs/hammerhead.h include/configs/mimc200.h
Diffstat (limited to 'board/w7o')
-rw-r--r--board/w7o/cmd_vpd.c2
-rw-r--r--board/w7o/flash.c22
-rw-r--r--board/w7o/init.S20
-rw-r--r--board/w7o/post2.c8
-rw-r--r--board/w7o/u-boot.lds1
-rw-r--r--board/w7o/u-boot.lds.debug2
-rw-r--r--board/w7o/vpd.c6
-rw-r--r--board/w7o/w7o.c4
-rw-r--r--board/w7o/watchdog.c2
9 files changed, 34 insertions, 33 deletions
diff --git a/board/w7o/cmd_vpd.c b/board/w7o/cmd_vpd.c
index fdd6ceb..310fde0 100644
--- a/board/w7o/cmd_vpd.c
+++ b/board/w7o/cmd_vpd.c
@@ -35,7 +35,7 @@
int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
VPD vpd; /* Board specific data struct */
- uchar dev_addr = CFG_DEF_EEPROM_ADDR;
+ uchar dev_addr = CONFIG_SYS_DEF_EEPROM_ADDR;
/* Validate usage */
if (argc > 2) {
diff --git a/board/w7o/flash.c b/board/w7o/flash.c
index 32815fb..6774949 100644
--- a/board/w7o/flash.c
+++ b/board/w7o/flash.c
@@ -29,7 +29,7 @@
#include <watchdog.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
@@ -49,7 +49,7 @@ unsigned long flash_init (void)
unsigned long size_b1, 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;
}
@@ -90,13 +90,13 @@ unsigned long flash_init (void)
/* Protect the FPGA image */
(void)flash_protect(FLAG_PROTECT_SET,
FLASH_BASE1_PRELIM,
- FLASH_BASE1_PRELIM + CFG_FPGA_IMAGE_LEN - 1,
+ FLASH_BASE1_PRELIM + CONFIG_SYS_FPGA_IMAGE_LEN - 1,
&flash_info[1]);
/* Protect the default boot image */
(void)flash_protect(FLAG_PROTECT_SET,
- FLASH_BASE1_PRELIM + CFG_FPGA_IMAGE_LEN,
- FLASH_BASE1_PRELIM + CFG_FPGA_IMAGE_LEN + 0x600000 - 1,
+ FLASH_BASE1_PRELIM + CONFIG_SYS_FPGA_IMAGE_LEN,
+ FLASH_BASE1_PRELIM + CONFIG_SYS_FPGA_IMAGE_LEN + 0x600000 - 1,
&flash_info[1]);
/* Setup offsets for Main Flash */
@@ -294,11 +294,11 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
}
}
- /* Make sure we don't exceed CFG_MAX_FLASH_SECT */
- if (info->sector_count > CFG_MAX_FLASH_SECT) {
+ /* Make sure we don't exceed CONFIG_SYS_MAX_FLASH_SECT */
+ if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) {
printf ("** ERROR: sector count %d > max (%d) **\n",
- info->sector_count, CFG_MAX_FLASH_SECT);
- info->sector_count = CFG_MAX_FLASH_SECT;
+ info->sector_count, CONFIG_SYS_MAX_FLASH_SECT);
+ info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
}
/* set up sector start address table */
@@ -520,7 +520,7 @@ static int flash_erase32(flash_info_t *info, int s_first, int s_last)
udelay (1000);
while (((status = *addr) & 0x00800080) != 0x00800080) {
- if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) {
+ if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
printf ("Timeout\n");
*addr = 0x00B000B0; /* suspend erase */
*addr = 0x00FF00FF; /* reset to read mode */
@@ -787,7 +787,7 @@ static int write_word32(flash_info_t *info, ulong dest, ulong data)
while (((status = *addr) & 0x00800080) != 0x00800080) {
WATCHDOG_RESET();
- if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
+ if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
*addr = 0x00FF00FF; /* restore read mode */
return (1);
}
diff --git a/board/w7o/init.S b/board/w7o/init.S
index 35d7dbc..2fd84ba 100644
--- a/board/w7o/init.S
+++ b/board/w7o/init.S
@@ -64,11 +64,11 @@ ext_bus_cntlr_init:
mflr r3 /* get address of ..getAddr */
/* Calculate number of cache lines for this function */
- addi r4, 0, (((.Lfe0 - ..getAddr) / CFG_CACHELINE_SIZE) + 2)
+ addi r4, 0, (((.Lfe0 - ..getAddr) / CONFIG_SYS_CACHELINE_SIZE) + 2)
mtctr r4
..ebcloop:
icbt r0, r3 /* prefetch cache line for addr in r3*/
- addi r3, r3, CFG_CACHELINE_SIZE /* move to next cache line */
+ addi r3, r3, CONFIG_SYS_CACHELINE_SIZE /* move to next cache line */
bdnz ..ebcloop /* continue for $CTR cache lines */
/********************************************************************
@@ -103,14 +103,14 @@ ext_bus_cntlr_init:
*******************************************************************/
addi r3, 0, pb0ap
mtdcr ebccfga, r3
- addis r4, 0, CFG_W7O_EBC_PB0AP@h
- ori r4, r4, CFG_W7O_EBC_PB0AP@l
+ addis r4, 0, CONFIG_SYS_W7O_EBC_PB0AP@h
+ ori r4, r4, CONFIG_SYS_W7O_EBC_PB0AP@l
mtdcr ebccfgd, r4
addi r3, 0, pb0cr
mtdcr ebccfga, r3
- addis r4, 0, CFG_W7O_EBC_PB0CR@h
- ori r4, r4, CFG_W7O_EBC_PB0CR@l
+ addis r4, 0, CONFIG_SYS_W7O_EBC_PB0CR@h
+ ori r4, r4, CONFIG_SYS_W7O_EBC_PB0CR@l
mtdcr ebccfgd, r4
/********************************************************************
@@ -118,14 +118,14 @@ ext_bus_cntlr_init:
*******************************************************************/
addi r3, 0, pb7ap
mtdcr ebccfga, r3
- addis r4, 0, CFG_W7O_EBC_PB7AP@h
- ori r4, r4, CFG_W7O_EBC_PB7AP@l
+ addis r4, 0, CONFIG_SYS_W7O_EBC_PB7AP@h
+ ori r4, r4, CONFIG_SYS_W7O_EBC_PB7AP@l
mtdcr ebccfgd, r4
addi r3, 0, pb7cr
mtdcr ebccfga, r3
- addis r4, 0, CFG_W7O_EBC_PB7CR@h
- ori r4, r4, CFG_W7O_EBC_PB7CR@l
+ addis r4, 0, CONFIG_SYS_W7O_EBC_PB7CR@h
+ ori r4, r4, CONFIG_SYS_W7O_EBC_PB7CR@l
mtdcr ebccfgd, r4
/* We are all done */
diff --git a/board/w7o/post2.c b/board/w7o/post2.c
index 6ee33eb..1dfaa2f 100644
--- a/board/w7o/post2.c
+++ b/board/w7o/post2.c
@@ -38,7 +38,7 @@
#if defined(CONFIG_RTC_M48T35A)
void rtctest(void)
{
- volatile uchar *tchar = (uchar*)(CFG_NVRAM_BASE_ADDR + CFG_NVRAM_SIZE - 9);
+ volatile uchar *tchar = (uchar*)(CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE - 9);
struct rtc_time tmp;
/* set up led code for RTC tests */
@@ -89,9 +89,9 @@ int dtt_test(int sensor)
hyst = dtt_read(sensor, DTT_TEMP_HYST) / 256;
/* check values */
- if ((hyst != (CFG_DTT_MAX_TEMP - CFG_DTT_HYSTERESIS)) ||
- (trip != CFG_DTT_MAX_TEMP) ||
- (temp < CFG_DTT_LOW_TEMP) || (temp > CFG_DTT_MAX_TEMP))
+ if ((hyst != (CONFIG_SYS_DTT_MAX_TEMP - CONFIG_SYS_DTT_HYSTERESIS)) ||
+ (trip != CONFIG_SYS_DTT_MAX_TEMP) ||
+ (temp < CONFIG_SYS_DTT_LOW_TEMP) || (temp > CONFIG_SYS_DTT_MAX_TEMP))
return 1;
return 0;
diff --git a/board/w7o/u-boot.lds b/board/w7o/u-boot.lds
index 3373793..80e960b 100644
--- a/board/w7o/u-boot.lds
+++ b/board/w7o/u-boot.lds
@@ -128,6 +128,7 @@ SECTIONS
*(.dynbss)
*(.bss)
*(COMMON)
+ . = ALIGN(4);
}
_end = . ;
PROVIDE (end = .);
diff --git a/board/w7o/u-boot.lds.debug b/board/w7o/u-boot.lds.debug
index d3ffed3..d2089de 100644
--- a/board/w7o/u-boot.lds.debug
+++ b/board/w7o/u-boot.lds.debug
@@ -61,7 +61,7 @@ SECTIONS
lib_generic/crc32.o (.text)
lib_ppc/extable.o (.text)
- common/environment.o(.text)
+ common/env_embedded.o(.text)
*(.text)
*(.fixup)
diff --git a/board/w7o/vpd.c b/board/w7o/vpd.c
index 2ce1568..57558e8 100644
--- a/board/w7o/vpd.c
+++ b/board/w7o/vpd.c
@@ -24,7 +24,7 @@
#if defined(VXWORKS)
# include <stdio.h>
# include <string.h>
-# define CFG_DEF_EEPROM_ADDR 0xa0
+# define CONFIG_SYS_DEF_EEPROM_ADDR 0xa0
extern char iicReadByte( char, char );
extern ulong_t crc32( unsigned char *, unsigned long );
#else
@@ -47,7 +47,7 @@ vpd_reader(unsigned char *buf, unsigned dev_addr, unsigned off, unsigned count)
* SDRAM SPD in the first 128 bytes,
* so skew the offset.
*/
- if (dev_addr == CFG_DEF_EEPROM_ADDR)
+ if (dev_addr == CONFIG_SYS_DEF_EEPROM_ADDR)
offset += SDRAM_SPD_DATA_SIZE;
/* Try to read the I2C EEPROM */
@@ -127,7 +127,7 @@ static int vpd_is_valid(unsigned dev_addr, unsigned char *buf)
/* Check Eyecatcher */
if (strncmp((char *)(vpd->header.eyecatcher), VPD_EYECATCHER, VPD_EYE_SIZE) != 0) {
unsigned offset = 0;
- if (dev_addr == CFG_DEF_EEPROM_ADDR)
+ if (dev_addr == CONFIG_SYS_DEF_EEPROM_ADDR)
offset += SDRAM_SPD_DATA_SIZE;
printf("Error: VPD EEPROM 0x%x corrupt @ 0x%x\n", dev_addr, offset);
diff --git a/board/w7o/w7o.c b/board/w7o/w7o.c
index 0e3b84c..22cdfcd 100644
--- a/board/w7o/w7o.c
+++ b/board/w7o/w7o.c
@@ -132,7 +132,7 @@ int checkboard (void)
puts ("Board: ");
/* VPD data present in I2C EEPROM */
- if (vpd_get_data (CFG_DEF_EEPROM_ADDR, &vpd) == 0) {
+ if (vpd_get_data (CONFIG_SYS_DEF_EEPROM_ADDR, &vpd) == 0) {
/*
* Known board type.
*/
@@ -204,7 +204,7 @@ static void w7o_env_init (VPD * vpd)
/*
* Read VPD
*/
- if (vpd_get_data (CFG_DEF_EEPROM_ADDR, vpd) != 0)
+ if (vpd_get_data (CONFIG_SYS_DEF_EEPROM_ADDR, vpd) != 0)
return;
/*
diff --git a/board/w7o/watchdog.c b/board/w7o/watchdog.c
index 4bbd94f..131399c 100644
--- a/board/w7o/watchdog.c
+++ b/board/w7o/watchdog.c
@@ -32,7 +32,7 @@
void hw_watchdog_reset(void)
{
- volatile ushort *hwd = (ushort *)(CFG_W7O_EBC_PB7CR & 0xfff00000);
+ volatile ushort *hwd = (ushort *)(CONFIG_SYS_W7O_EBC_PB7CR & 0xfff00000);
/*
* Read the LMG's hwd register and toggle the