diff options
Diffstat (limited to 'include')
37 files changed, 98 insertions, 48 deletions
diff --git a/include/common.h b/include/common.h index fb41d7ae5f..5ca8820898 100644 --- a/include/common.h +++ b/include/common.h @@ -116,21 +116,27 @@ typedef volatile unsigned char vu_char; #include <flash.h> #include <image.h> -#ifdef DEBUG -#define debug(fmt,args...) printf (fmt ,##args) -#define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args); -#else -#define debug(fmt,args...) -#define debugX(level,fmt,args...) -#endif /* DEBUG */ - #ifdef DEBUG -# define _DEBUG 1 +#define _DEBUG 1 #else -# define _DEBUG 0 +#define _DEBUG 0 #endif /* + * Output a debug text when condition "cond" is met. The "cond" should be + * computed by a preprocessor in the best case, allowing for the best + * optimization. + */ +#define debug_cond(cond, fmt, args...) \ + do { \ + if (cond) \ + printf(fmt, ##args); \ + } while (0) + +#define debug(fmt, args...) \ + debug_cond(_DEBUG, fmt, ##args) + +/* * An assertion is run-time check done in debug mode only. If DEBUG is not * defined then it is skipped. If DEBUG is defined and the assertion fails, * then it calls panic*( which may or may not reset/halt U-Boot (see diff --git a/include/configs/PCIPPC2.h b/include/configs/PCIPPC2.h index fb485b03ee..77cedc06d6 100644 --- a/include/configs/PCIPPC2.h +++ b/include/configs/PCIPPC2.h @@ -55,6 +55,10 @@ #define CONFIG_PREBOOT "" #define CONFIG_BOOTDELAY 5 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif + /* * BOOTP options */ diff --git a/include/configs/PCIPPC6.h b/include/configs/PCIPPC6.h index 16d6450d91..a8d20ca920 100644 --- a/include/configs/PCIPPC6.h +++ b/include/configs/PCIPPC6.h @@ -55,6 +55,10 @@ #define CONFIG_PREBOOT "" #define CONFIG_BOOTDELAY 5 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif + /* * BOOTP options */ diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h index 183045b460..8b8113df51 100644 --- a/include/configs/VCMA9.h +++ b/include/configs/VCMA9.h @@ -76,7 +76,7 @@ #define CONFIG_CMD_BSP #define CONFIG_CMD_NAND -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " diff --git a/include/configs/cerf250.h b/include/configs/cerf250.h index be325e8c26..70427daca2 100644 --- a/include/configs/cerf250.h +++ b/include/configs/cerf250.h @@ -36,7 +36,7 @@ */ #define CONFIG_PXA250 1 /* This is an PXA250 CPU */ #define CONFIG_CERF250 1 /* on Cerf PXA Board */ -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_BAUDRATE 38400 #define CONFIG_SYS_TEXT_BASE 0x0 diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 011731b874..8a3446efd1 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -28,7 +28,7 @@ #define CONFIG_PXA27X 1 /* Marvell PXA270 CPU */ #define CONFIG_VPAC270 1 /* Toradex Colibri PXA270 board */ -#undef BOARD_LATE_INIT +#undef CONFIG_BOARD_LATE_INIT #undef CONFIG_USE_IRQ #undef CONFIG_SKIP_LOWLEVEL_INIT diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h index 7e4b424de4..b507786bf2 100644 --- a/include/configs/efikamx.h +++ b/include/configs/efikamx.h @@ -79,7 +79,7 @@ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) #define CONFIG_BOARD_EARLY_INIT_F -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT /* * Hardware drivers diff --git a/include/configs/imx31_phycore.h b/include/configs/imx31_phycore.h index 48bd50bb7f..f4bfee490b 100644 --- a/include/configs/imx31_phycore.h +++ b/include/configs/imx31_phycore.h @@ -192,7 +192,7 @@ /* EET platform additions */ #ifdef CONFIG_IMX31_PHYCORE_EET -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h index 20e1087dae..a239efce2e 100644 --- a/include/configs/jadecpu.h +++ b/include/configs/jadecpu.h @@ -51,7 +51,7 @@ #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT /* * Compressions diff --git a/include/configs/lubbock.h b/include/configs/lubbock.h index bbdae3c551..90c5bf8974 100644 --- a/include/configs/lubbock.h +++ b/include/configs/lubbock.h @@ -41,7 +41,7 @@ #define CONFIG_SHARP_LM8V31 #endif #define CONFIG_MMC -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_DOS_PARTITION #define CONFIG_SYS_TEXT_BASE 0x0 #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 09ff7c4fb9..6b3fd76003 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -68,6 +68,10 @@ # define CONFIG_XILINX_LL_TEMAC 1 # define CONFIG_SYS_ENET #endif +#if defined(XILINX_AXIEMAC_BASEADDR) +# define CONFIG_XILINX_AXIEMAC 1 +# define CONFIG_SYS_ENET +#endif #undef ET_DEBUG diff --git a/include/configs/mpc7448hpc2.h b/include/configs/mpc7448hpc2.h index 61d758e639..3e7377511c 100644 --- a/include/configs/mpc7448hpc2.h +++ b/include/configs/mpc7448hpc2.h @@ -54,6 +54,10 @@ #undef CONFIG_ECC /* disable ECC support */ +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif + /* Board-specific Initialization Functions to be called */ #define CONFIG_SYS_BOARD_ASM_INIT #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/ms7750se.h b/include/configs/ms7750se.h index 16fb0d4fe8..03f52f3905 100644 --- a/include/configs/ms7750se.h +++ b/include/configs/ms7750se.h @@ -45,7 +45,7 @@ #define CONFIG_SCIF_CONSOLE 1 #define CONFIG_BAUDRATE 38400 #define CONFIG_CONS_SCIF1 1 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_BOOTDELAY -1 #define CONFIG_BOOTARGS "console=ttySC0,38400" diff --git a/include/configs/mx1ads.h b/include/configs/mx1ads.h index 0643312baf..9c1b255e65 100644 --- a/include/configs/mx1ads.h +++ b/include/configs/mx1ads.h @@ -45,7 +45,7 @@ /* #define _CONFIG_UART2 */ /* internal uart 2 */ /* #define CONFIG_SILENT_CONSOLE */ /* use this to disable output */ -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define USE_920T_MMU 1 #if 0 diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index b72f30b634..2e5cde5408 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -106,7 +106,7 @@ */ #undef CONFIG_CMD_IMLS -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_BOOTDELAY 3 diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index 1707b4d7e2..79bae5637f 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -42,7 +42,7 @@ #define CONFIG_SYS_64BIT_VSPRINTF #define CONFIG_BOARD_EARLY_INIT_F -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_REVISION_TAG diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 0d4ceb3910..028a842f34 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -54,7 +54,7 @@ */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT /* * Hardware drivers diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index 97ae2f2960..47032487f9 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -44,7 +44,7 @@ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024) #define CONFIG_BOARD_EARLY_INIT_F -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO #define CONFIG_MXC_UART diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index 13d1e6637b..20db3972f6 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -96,7 +96,7 @@ #define CONFIG_SYS_MEMTEST_END 0x0FFFFFFF #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256 * 1024) -#define BOARD_LATE_INIT /* call board_late_init during start up */ +#define CONFIG_BOARD_LATE_INIT /* call board_late_init during start up */ /* timing informazion */ #define CONFIG_SYS_HZ 1000 /* Mandatory... */ diff --git a/include/configs/p3mx.h b/include/configs/p3mx.h index 94a69927ed..e44009e8b1 100644 --- a/include/configs/p3mx.h +++ b/include/configs/p3mx.h @@ -447,4 +447,8 @@ #define L2_ENABLE (L2_INIT | L2CR_L2E) +#ifndef __ASSEMBLY__ +#include <../board/Marvell/include/core.h> +#endif + #endif /* __CONFIG_H */ diff --git a/include/configs/pleb2.h b/include/configs/pleb2.h index 7dd6246f11..2aeb7fb34e 100644 --- a/include/configs/pleb2.h +++ b/include/configs/pleb2.h @@ -38,7 +38,7 @@ #define CONFIG_PLEB2 1 /* on an PLEB2 Board */ #undef CONFIG_LCD #undef CONFIG_MMC -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_SYS_TEXT_BASE 0x0 #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ diff --git a/include/configs/ppmc7xx.h b/include/configs/ppmc7xx.h index d3c8990857..4ceee17cd2 100644 --- a/include/configs/ppmc7xx.h +++ b/include/configs/ppmc7xx.h @@ -51,6 +51,10 @@ #define CONFIG_SYS_TEXT_BASE 0xFFF00000 +#ifndef __ASSEMBLY__ +#include <galileo/core.h> +#endif + /* * Monitor configuration * diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h index cd95081a99..620d270893 100644 --- a/include/configs/pxa255_idp.h +++ b/include/configs/pxa255_idp.h @@ -64,7 +64,7 @@ #define CONFIG_MMC 1 #define CONFIG_DOS_PARTITION 1 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ diff --git a/include/configs/qong.h b/include/configs/qong.h index f2a1e0143d..c61a9b32bb 100644 --- a/include/configs/qong.h +++ b/include/configs/qong.h @@ -138,7 +138,7 @@ #define CONFIG_CMD_SETEXPR #define CONFIG_CMD_SPI -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_BOOTDELAY 5 diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h index a7a92f798c..0ce3fa864c 100644 --- a/include/configs/r2dplus.h +++ b/include/configs/r2dplus.h @@ -30,7 +30,7 @@ #define CONFIG_SCIF_CONSOLE 1 #define CONFIG_BAUDRATE 115200 #define CONFIG_CONS_SCIF1 1 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_BOOTDELAY -1 #define CONFIG_BOOTARGS "console=ttySC0,115200" diff --git a/include/configs/sh7757lcr.h b/include/configs/sh7757lcr.h index 4a5fd0d292..2d6eb3320f 100644 --- a/include/configs/sh7757lcr.h +++ b/include/configs/sh7757lcr.h @@ -107,7 +107,7 @@ #define SH7757LCR_ETHERNET_MAC_BASE SH7757LCR_ETHERNET_MAC_BASE_SPI #define SH7757LCR_ETHERNET_MAC_SIZE 17 #define SH7757LCR_ETHERNET_NUM_CH 2 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT /* Gigabit Ether */ #define SH7757LCR_GIGA_ETHERNET_NUM_CH 2 diff --git a/include/configs/trizepsiv.h b/include/configs/trizepsiv.h index 6ec9b8036e..2d55044ede 100644 --- a/include/configs/trizepsiv.h +++ b/include/configs/trizepsiv.h @@ -43,7 +43,7 @@ #define CONFIG_PXA27X 1 /* This is an PXA27x CPU */ #define CONFIG_MMC 1 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #define CONFIG_SYS_TEXT_BASE 0x0 #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ diff --git a/include/configs/tx25.h b/include/configs/tx25.h index 6380bb8979..8cb57ffc1a 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -137,7 +137,7 @@ #define CONFIG_FEC_MXC_PHYADDR 0x1f #define CONFIG_MII #define CONFIG_CMD_NET -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_ENV_OVERWRITE #define CONFIG_BOOTDELAY 5 diff --git a/include/configs/u8500_href.h b/include/configs/u8500_href.h index 636922c2f9..4747fbd351 100644 --- a/include/configs/u8500_href.h +++ b/include/configs/u8500_href.h @@ -35,7 +35,7 @@ #define CONFIG_SYS_HZ 1000 /* must be 1000 */ #define CONFIG_BOARD_EARLY_INIT_F -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT /* * Size of malloc() pool diff --git a/include/configs/vision2.h b/include/configs/vision2.h index a2a9f3fb43..bee9e970a9 100644 --- a/include/configs/vision2.h +++ b/include/configs/vision2.h @@ -39,7 +39,7 @@ #define CONFIG_REVISION_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MACH_TYPE MACH_TYPE_TTC_VISION2 diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h index 8a41416305..6dce8aeaf1 100644 --- a/include/configs/xaeniax.h +++ b/include/configs/xaeniax.h @@ -45,7 +45,7 @@ #define CONFIG_SYS_TEXT_BASE 0x0 -#define BOARD_LATE_INIT 1 +#define CONFIG_BOARD_LATE_INIT #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h index ade40b54e8..9505007a8e 100644 --- a/include/configs/zipitz2.h +++ b/include/configs/zipitz2.h @@ -29,7 +29,7 @@ #define CONFIG_ZIPITZ2 1 /* Zipit Z2 board */ #define CONFIG_SYS_TEXT_BASE 0x0 -#undef BOARD_LATE_INIT +#undef CONFIG_BOARD_LATE_INIT #undef CONFIG_USE_IRQ #undef CONFIG_SKIP_LOWLEVEL_INIT diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h index 0d5ee141f3..9a7a27ac1d 100644 --- a/include/configs/zmx25.h +++ b/include/configs/zmx25.h @@ -46,7 +46,7 @@ #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT /* * Compressions diff --git a/include/i2c.h b/include/i2c.h index 8ceb4c8521..ee31034c7a 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -46,16 +46,16 @@ */ #define I2C_RXTX_LEN 128 /* maximum tx/rx buffer length */ -#if defined(CONFIG_I2C_MULTI_BUS) -#if !defined(CONFIG_SYS_MAX_I2C_BUS) -#define CONFIG_SYS_MAX_I2C_BUS 2 -#endif -#define I2C_GET_BUS() i2c_get_bus_num() -#define I2C_SET_BUS(a) i2c_set_bus_num(a) +#ifdef CONFIG_I2C_MULTI_BUS +#define MAX_I2C_BUS 2 +#define I2C_MULTI_BUS 1 #else -#define CONFIG_SYS_MAX_I2C_BUS 1 -#define I2C_GET_BUS() 0 -#define I2C_SET_BUS(a) +#define MAX_I2C_BUS 1 +#define I2C_MULTI_BUS 0 +#endif + +#if !defined(CONFIG_SYS_MAX_I2C_BUS) +#define CONFIG_SYS_MAX_I2C_BUS MAX_I2C_BUS #endif /* define the I2C bus number for RTC and DTT if not already done */ @@ -236,4 +236,18 @@ int i2c_set_bus_speed(unsigned int); unsigned int i2c_get_bus_speed(void); +/* NOTE: These two functions MUST be always_inline to avoid code growth! */ +static inline unsigned int I2C_GET_BUS(void) __attribute__((always_inline)); +static inline unsigned int I2C_GET_BUS(void) +{ + return I2C_MULTI_BUS ? i2c_get_bus_num() : 0; +} + +static inline void I2C_SET_BUS(unsigned int bus) __attribute__((always_inline)); +static inline void I2C_SET_BUS(unsigned int bus) +{ + if (I2C_MULTI_BUS) + i2c_set_bus_num(bus); +} + #endif /* _I2C_H_ */ diff --git a/include/image.h b/include/image.h index 1ba866e475..c56a18df70 100644 --- a/include/image.h +++ b/include/image.h @@ -615,7 +615,7 @@ void fit_conf_print(const void *fit, int noffset, const char *p); #ifndef USE_HOSTCC static inline int fit_image_check_target_arch(const void *fdt, int node) { - return !fit_image_check_arch(fdt, node, IH_ARCH_DEFAULT); + return fit_image_check_arch(fdt, node, IH_ARCH_DEFAULT); } #endif /* USE_HOSTCC */ diff --git a/include/lcd.h b/include/lcd.h index 0e098d925e..89cc90c0b9 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -159,8 +159,8 @@ typedef struct vidinfo { #elif defined(CONFIG_ATMEL_LCD) typedef struct vidinfo { - u_long vl_col; /* Number of columns (i.e. 640) */ - u_long vl_row; /* Number of rows (i.e. 480) */ + ushort vl_col; /* Number of columns (i.e. 640) */ + ushort vl_row; /* Number of rows (i.e. 480) */ u_long vl_clk; /* pixel clock in ps */ /* LCD configuration register */ diff --git a/include/net.h b/include/net.h index b408dea666..ad9afbf417 100644 --- a/include/net.h +++ b/include/net.h @@ -430,6 +430,12 @@ extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, i extern void NetReceive(volatile uchar *, int); /* + * Check if autoload is enabled. If so, use either NFS or TFTP to download + * the boot file. + */ +void net_auto_load(void); + +/* * The following functions are a bit ugly, but necessary to deal with * alignment restrictions on ARM. * |