Skip to contentSkip to conversation

BOARD_LATE_INIT <-> CONFIG_BOARD_LATE_INIT

U-Boot Superseded Helmut Raiger 3 participants 9 messages Oct 20, 2011 – Oct 27, 2011 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

is there a sound reason, why BOARD_LATE_INIT isn't named like
other CONFIG options? I'm inclined to fix this as it took me some time to find out why my board_late_init() wasn't called.

Helmut

--
Scanned by MailScanner.

#1 lore raw
Quoted 2 lines · Helmut Raiger

Hi,

Hi Helmut,

Quoted 3 lines

is there a sound reason, why BOARD_LATE_INIT isn't named like
other CONFIG options? I'm inclined to fix this as it took me some time to find out why my board_late_init() wasn't called.

I assume that the name was not changed when all defines got the CONFIG_SYS prefix, so we had for example FLASH_SIZE instead of CONFIG_SYS_FLASH_SIZE as now. Surely it is not coherent with the rest of code, so I vote for fixing it.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#2 lore raw

PATCH 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

In reply to Helmut Raiger

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Alongside it removes some leftover
#define BOARD_LATE_INIT 1

---
 arch/arm/lib/board.c                 |    2 +-
 arch/sandbox/lib/board.c             |    2 +-
 arch/sh/lib/board.c                  |    2 +-
 board/freescale/mx35pdk/mx35pdk.c    |    4 ++--
 board/freescale/mx51evk/mx51evk.c    |    2 +-
 board/imx31_phycore/imx31_phycore.c  |    2 +-
 board/st-ericsson/u8500/u8500_href.c |    4 ++--
 include/configs/VCMA9.h              |    2 +-
 include/configs/cerf250.h            |    2 +-
 include/configs/colibri_pxa270.h     |    2 +-
 include/configs/efikamx.h            |    2 +-
 include/configs/imx31_phycore.h      |    2 +-
 include/configs/jadecpu.h            |    2 +-
 include/configs/lubbock.h            |    2 +-
 include/configs/ms7750se.h           |    2 +-
 include/configs/mx1ads.h             |    2 +-
 include/configs/mx31pdk.h            |    2 +-
 include/configs/mx35pdk.h            |    2 +-
 include/configs/mx51evk.h            |    2 +-
 include/configs/mx53evk.h            |    2 +-
 include/configs/nhk8815.h            |    2 +-
 include/configs/pleb2.h              |    2 +-
 include/configs/pxa255_idp.h         |    2 +-
 include/configs/qong.h               |    2 +-
 include/configs/r2dplus.h            |    2 +-
 include/configs/sh7757lcr.h          |    2 +-
 include/configs/trizepsiv.h          |    2 +-
 include/configs/tx25.h               |    2 +-
 include/configs/u8500_href.h         |    2 +-
 include/configs/vision2.h            |    2 +-
 include/configs/xaeniax.h            |    2 +-
 include/configs/zipitz2.h            |    2 +-
 include/configs/zmx25.h              |    2 +-
 33 files changed, 35 insertions(+), 35 deletions(-)
arch/arm/lib/board.c +1 -1
index 1fe3751..29dd348 100644
@@ -578,7 +578,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
 		copy_filename(BootFile, s, sizeof(BootFile));
 #endif
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init();
 #endif
 
arch/sandbox/lib/board.c +1 -1
index 1fd8fa6..ae5a517 100644
@@ -250,7 +250,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
 	/* enable exceptions */
 	enable_interrupts();
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init();
 #endif
 
arch/sh/lib/board.c +1 -1
index 6148e6b..d9c0c22 100644
@@ -141,7 +141,7 @@ init_fnc_t *init_sequence[] =
 	stdio_init,
 	console_init_r,
 	interrupt_init,
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init,
 #endif
 #if defined(CONFIG_CMD_NET)
board/freescale/mx35pdk/mx35pdk.c +2 -2
index 9eefe5e..155b9ff 100644
@@ -38,8 +38,8 @@
 #include <asm/arch/sys_proto.h>
 #include <netdev.h>
 
-#ifndef BOARD_LATE_INIT
-#error "BOARD_LATE_INIT must be set for this board"
+#ifndef CONFIG_BOARD_LATE_INIT
+#error "CONFIG_BOARD_LATE_INIT must be set for this board"
 #endif
 
 #ifndef CONFIG_BOARD_EARLY_INIT_F
board/freescale/mx51evk/mx51evk.c +1 -1
index 8da1ee8..f998610 100644
@@ -409,7 +409,7 @@ int board_init(void)
 	return 0;
 }
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 #ifdef CONFIG_MXC_SPI
board/imx31_phycore/imx31_phycore.c +1 -1
index 773900e..47f1a8d 100644
@@ -74,7 +74,7 @@ int board_early_init_f(void)
 	return 0;
 }
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 #ifdef CONFIG_S6E63D6
board/st-ericsson/u8500/u8500_href.c +2 -2
index 9283fab..5f85fdc 100644
@@ -226,7 +226,7 @@ unsigned int addr_vall_arr[] = {
 	0xA03FE024, 0x00000000	/* USB */
 };
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 #ifdef CONFIG_MMC
 
 #define LDO_VAUX3_MASK		0x3
@@ -351,7 +351,7 @@ int board_late_init(void)
 
 	return 0;
 }
-#endif /* BOARD_LATE_INIT */
+#endif /* CONFIG_BOARD_LATE_INIT */
 
 static void early_gpio_setup(struct gpio_register *gpio_reg, u32 bits)
 {
include/configs/VCMA9.h +1 -1
index 183045b..8b8113d 100644
@@ -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 "> "
include/configs/cerf250.h +1 -1
index be325e8..70427da 100644
@@ -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
 
include/configs/colibri_pxa270.h +1 -1
index 011731b..8a3446e 100644
@@ -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
 
include/configs/efikamx.h +1 -1
index 54f48e4..ce96b78 100644
@@ -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
include/configs/imx31_phycore.h +1 -1
index 48bd50b..f4bfee4 100644
@@ -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
 
include/configs/jadecpu.h +1 -1
index 20e1087..a239efc 100644
@@ -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
include/configs/lubbock.h +1 -1
index bbdae3c..90c5bf8 100644
@@ -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 */
include/configs/ms7750se.h +1 -1
index 16fb0d4..03f52f3 100644
@@ -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"
include/configs/mx1ads.h +1 -1
index 0643312..9c1b255 100644
@@ -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
include/configs/mx31pdk.h +1 -1
index 8c5730a..044b766 100644
@@ -102,7 +102,7 @@
  */
 #undef CONFIG_CMD_IMLS
 
-#define BOARD_LATE_INIT
+#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_BOOTDELAY	3
 
include/configs/mx35pdk.h +1 -1
index 670e76d..6f42fc7 100644
@@ -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
include/configs/mx51evk.h +1 -1
index 0c10870..fd7f4ce 100644
@@ -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
include/configs/mx53evk.h +1 -1
index 2033492..034fa87 100644
@@ -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
include/configs/nhk8815.h +1 -1
index 13d1e66..20db397 100644
@@ -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... */
include/configs/pleb2.h +1 -1
index 7dd6246..2aeb7fb 100644
@@ -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 */
include/configs/pxa255_idp.h +1 -1
index cd95081..620d270 100644
@@ -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 */
 
include/configs/qong.h +1 -1
index b1fc80c..8c68d1e 100644
@@ -135,7 +135,7 @@
 #define CONFIG_CMD_SETEXPR
 #define CONFIG_CMD_SPI
 
-#define BOARD_LATE_INIT
+#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_BOOTDELAY	5
 
include/configs/r2dplus.h +1 -1
index a7a92f7..0ce3fa8 100644
@@ -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"
include/configs/sh7757lcr.h +1 -1
index 4a5fd0d..2d6eb33 100644
@@ -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
include/configs/trizepsiv.h +1 -1
index 6ec9b80..2d55044 100644
@@ -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 */
include/configs/tx25.h +1 -1
index 6380bb8..8cb57ff 100644
@@ -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
include/configs/u8500_href.h +1 -1
index 636922c..4747fbd 100644
@@ -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
include/configs/vision2.h +1 -1
index 3b42afc..56cbe3f 100644
@@ -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
 
include/configs/xaeniax.h +1 -1
index 8a41416..6dce8ae 100644
@@ -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 */
include/configs/zipitz2.h +1 -1
index ade40b5..9505007 100644
@@ -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
 
include/configs/zmx25.h +1 -1
index 0d5ee14..9a7a27a 100644
@@ -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
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#3 lore raw

PATCH 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

Quoted 6 lines · Helmut Raiger

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Alongside it removes some leftover
#define BOARD_LATE_INIT 1

---

Hi Helmut,

Quoted 26 lines
 arch/arm/lib/board.c                 |    2 +-
 arch/sandbox/lib/board.c             |    2 +-
 arch/sh/lib/board.c                  |    2 +-
 board/freescale/mx35pdk/mx35pdk.c    |    4 ++--
 board/freescale/mx51evk/mx51evk.c    |    2 +-
 board/imx31_phycore/imx31_phycore.c  |    2 +-
 board/st-ericsson/u8500/u8500_href.c |    4 ++--
 include/configs/VCMA9.h              |    2 +-
 include/configs/cerf250.h            |    2 +-
 include/configs/colibri_pxa270.h     |    2 +-
 include/configs/efikamx.h            |    2 +-
 include/configs/imx31_phycore.h      |    2 +-
 include/configs/jadecpu.h            |    2 +-
 include/configs/lubbock.h            |    2 +-
 include/configs/ms7750se.h           |    2 +-
 include/configs/mx1ads.h             |    2 +-
 include/configs/mx31pdk.h            |    2 +-
 include/configs/mx35pdk.h            |    2 +-
 include/configs/mx51evk.h            |    2 +-
 include/configs/mx53evk.h            |    2 +-
 include/configs/nhk8815.h            |    2 +-
 include/configs/pleb2.h              |    2 +-
 include/configs/pxa255_idp.h         |    2 +-
 include/configs/qong.h               |    2 +-
 include/configs/r2dplus.h            |    2 +-
 include/configs/sh7757lcr.h          |    2 +-
Quoted 8 lines
 include/configs/trizepsiv.h          |    2 +-
 include/configs/tx25.h               |    2 +-
 include/configs/u8500_href.h         |    2 +-
 include/configs/vision2.h            |    2 +-
 include/configs/xaeniax.h            |    2 +-
 include/configs/zipitz2.h            |    2 +-
 include/configs/zmx25.h              |    2 +-
 33 files changed, 35 insertions(+), 35 deletions(-)

I know there is not yet a description of the switch in the README file. However, we should take this occasion to add the right documentation.

Change also the README file, adding the meaning of this switch and when the board function is called.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

Quoted 5 lines · Helmut Raiger
Quoted 4 lines · Stefano Babic

I know there is not yet a description of the switch in the README file. However, we should take this occasion to add the right documentation.

Quoted 7 lines
Quoted 5 lines

Change also the README file, adding the meaning of this switch and when the board function is called.

Best regards,
Stefano Babi

Since not a single board level config is documented

Yes, also the CONFIG_BOARD_EARLY_INIT_F/R are undocumented, and are not hte only ones...

Quoted 6 lines
$ grep CONFIG_BOARD Readme
$

Could someone hint a place inside Readme where this should be located? Probably needs some sort of section ...

Feel free to add a new one (Board options, mybe ?).

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#6 lore raw

PATCH v2 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Along the way it removes some leftover

#define BOARD_LATE_INIT 1

and adds some basic documentation for board specific callbacks in README.

---
V2: added some docu in README

 README                               |   14 ++++++++++++++
 arch/arm/lib/board.c                 |    2 +-
 arch/sandbox/lib/board.c             |    2 +-
 arch/sh/lib/board.c                  |    2 +-
 board/freescale/mx35pdk/mx35pdk.c    |    4 ++--
 board/freescale/mx51evk/mx51evk.c    |    2 +-
 board/imx31_phycore/imx31_phycore.c  |    2 +-
 board/st-ericsson/u8500/u8500_href.c |    4 ++--
 include/configs/VCMA9.h              |    2 +-
 include/configs/cerf250.h            |    2 +-
 include/configs/colibri_pxa270.h     |    2 +-
 include/configs/efikamx.h            |    2 +-
 include/configs/imx31_phycore.h      |    2 +-
 include/configs/jadecpu.h            |    2 +-
 include/configs/lubbock.h            |    2 +-
 include/configs/ms7750se.h           |    2 +-
 include/configs/mx1ads.h             |    2 +-
 include/configs/mx31pdk.h            |    2 +-
 include/configs/mx35pdk.h            |    2 +-
 include/configs/mx51evk.h            |    2 +-
 include/configs/mx53evk.h            |    2 +-
 include/configs/nhk8815.h            |    2 +-
 include/configs/pleb2.h              |    2 +-
 include/configs/pxa255_idp.h         |    2 +-
 include/configs/qong.h               |    2 +-
 include/configs/r2dplus.h            |    2 +-
 include/configs/sh7757lcr.h          |    2 +-
 include/configs/trizepsiv.h          |    2 +-
 include/configs/tx25.h               |    2 +-
 include/configs/u8500_href.h         |    2 +-
 include/configs/vision2.h            |    2 +-
 include/configs/xaeniax.h            |    2 +-
 include/configs/zipitz2.h            |    2 +-
 include/configs/zmx25.h              |    2 +-
 34 files changed, 49 insertions(+), 35 deletions(-)
README +14 -0
index eb9ade9..5b36b55 100644
@@ -2388,6 +2388,20 @@ Modem Support:
 
 		See also: doc/README.Modem
 
+Board initialization settings:
+------------------------------
+
+During Initialization u-boot calls a number of board specific functions
+to allow the preparation of board specific prerequisites, e.g. pin setup
+before drivers are initialized. To enable these callbacks the
+following configuration macros have to be defined. Currently this is
+architecture specific, so please check arch/your_architecture/lib/board.c
+typically in board_init_f() and board_init_r().
+
+- CONFIG_BOARD_EARLY_INIT_F: Call board_early_init_f()
+- CONFIG_BOARD_EARLY_INIT_R: Call board_early_init_r()
+- CONFIG_BOARD_LATE_INIT: Call board_late_init()
+- CONFIG_BOARD_POSTCLK_INIT: Call board_postclk_init()
 
 Configuration Settings:
 -----------------------
arch/arm/lib/board.c +1 -1
index 1fe3751..29dd348 100644
@@ -578,7 +578,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
 		copy_filename(BootFile, s, sizeof(BootFile));
 #endif
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init();
 #endif
 
arch/sandbox/lib/board.c +1 -1
index 1fd8fa6..ae5a517 100644
@@ -250,7 +250,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
 	/* enable exceptions */
 	enable_interrupts();
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init();
 #endif
 
arch/sh/lib/board.c +1 -1
index 6148e6b..d9c0c22 100644
@@ -141,7 +141,7 @@ init_fnc_t *init_sequence[] =
 	stdio_init,
 	console_init_r,
 	interrupt_init,
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 	board_late_init,
 #endif
 #if defined(CONFIG_CMD_NET)
board/freescale/mx35pdk/mx35pdk.c +2 -2
index 9eefe5e..155b9ff 100644
@@ -38,8 +38,8 @@
 #include <asm/arch/sys_proto.h>
 #include <netdev.h>
 
-#ifndef BOARD_LATE_INIT
-#error "BOARD_LATE_INIT must be set for this board"
+#ifndef CONFIG_BOARD_LATE_INIT
+#error "CONFIG_BOARD_LATE_INIT must be set for this board"
 #endif
 
 #ifndef CONFIG_BOARD_EARLY_INIT_F
board/freescale/mx51evk/mx51evk.c +1 -1
index 8da1ee8..f998610 100644
@@ -409,7 +409,7 @@ int board_init(void)
 	return 0;
 }
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 #ifdef CONFIG_MXC_SPI
board/imx31_phycore/imx31_phycore.c +1 -1
index 773900e..47f1a8d 100644
@@ -74,7 +74,7 @@ int board_early_init_f(void)
 	return 0;
 }
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
 #ifdef CONFIG_S6E63D6
board/st-ericsson/u8500/u8500_href.c +2 -2
index 9283fab..5f85fdc 100644
@@ -226,7 +226,7 @@ unsigned int addr_vall_arr[] = {
 	0xA03FE024, 0x00000000	/* USB */
 };
 
-#ifdef BOARD_LATE_INIT
+#ifdef CONFIG_BOARD_LATE_INIT
 #ifdef CONFIG_MMC
 
 #define LDO_VAUX3_MASK		0x3
@@ -351,7 +351,7 @@ int board_late_init(void)
 
 	return 0;
 }
-#endif /* BOARD_LATE_INIT */
+#endif /* CONFIG_BOARD_LATE_INIT */
 
 static void early_gpio_setup(struct gpio_register *gpio_reg, u32 bits)
 {
include/configs/VCMA9.h +1 -1
index 183045b..8b8113d 100644
@@ -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 "> "
include/configs/cerf250.h +1 -1
index be325e8..70427da 100644
@@ -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
 
include/configs/colibri_pxa270.h +1 -1
index 011731b..8a3446e 100644
@@ -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
 
include/configs/efikamx.h +1 -1
index 54f48e4..ce96b78 100644
@@ -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
include/configs/imx31_phycore.h +1 -1
index 48bd50b..f4bfee4 100644
@@ -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
 
include/configs/jadecpu.h +1 -1
index 20e1087..a239efc 100644
@@ -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
include/configs/lubbock.h +1 -1
index bbdae3c..90c5bf8 100644
@@ -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 */
include/configs/ms7750se.h +1 -1
index 16fb0d4..03f52f3 100644
@@ -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"
include/configs/mx1ads.h +1 -1
index 0643312..9c1b255 100644
@@ -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
include/configs/mx31pdk.h +1 -1
index 8c5730a..044b766 100644
@@ -102,7 +102,7 @@
  */
 #undef CONFIG_CMD_IMLS
 
-#define BOARD_LATE_INIT
+#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_BOOTDELAY	3
 
include/configs/mx35pdk.h +1 -1
index 670e76d..6f42fc7 100644
@@ -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
include/configs/mx51evk.h +1 -1
index 0c10870..fd7f4ce 100644
@@ -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
include/configs/mx53evk.h +1 -1
index 2033492..034fa87 100644
@@ -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
include/configs/nhk8815.h +1 -1
index 13d1e66..20db397 100644
@@ -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... */
include/configs/pleb2.h +1 -1
index 7dd6246..2aeb7fb 100644
@@ -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 */
include/configs/pxa255_idp.h +1 -1
index cd95081..620d270 100644
@@ -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 */
 
include/configs/qong.h +1 -1
index b1fc80c..8c68d1e 100644
@@ -135,7 +135,7 @@
 #define CONFIG_CMD_SETEXPR
 #define CONFIG_CMD_SPI
 
-#define BOARD_LATE_INIT
+#define CONFIG_BOARD_LATE_INIT
 
 #define CONFIG_BOOTDELAY	5
 
include/configs/r2dplus.h +1 -1
index a7a92f7..0ce3fa8 100644
@@ -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"
include/configs/sh7757lcr.h +1 -1
index 4a5fd0d..2d6eb33 100644
@@ -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
include/configs/trizepsiv.h +1 -1
index 6ec9b80..2d55044 100644
@@ -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 */
include/configs/tx25.h +1 -1
index 6380bb8..8cb57ff 100644
@@ -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
include/configs/u8500_href.h +1 -1
index 636922c..4747fbd 100644
@@ -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
include/configs/vision2.h +1 -1
index 3b42afc..56cbe3f 100644
@@ -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
 
include/configs/xaeniax.h +1 -1
index 8a41416..6dce8ae 100644
@@ -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 */
include/configs/zipitz2.h +1 -1
index ade40b5..9505007 100644
@@ -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
 
include/configs/zmx25.h +1 -1
index 0d5ee14..9a7a27a 100644
@@ -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
Signature · 6 lines
1.7.4.4



--
Scanned by MailScanner.
#7 lore raw

PATCH v2 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

Quoted 12 lines · Helmut Raiger

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Along the way it removes some leftover

  #define BOARD_LATE_INIT		1

and adds some basic documentation for board specific callbacks in README.

---
V2: added some docu in README

Anything missing?
Helmut

--
Scanned by MailScanner.

#8 lore raw

PATCH v2 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

Quoted 9 lines · Helmut Raiger
Quoted 8 lines · Helmut Raiger

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Along the way it removes some leftover

  #define BOARD_LATE_INIT        1

and adds some basic documentation for board specific callbacks in README.

Quoted 6 lines
Quoted 4 lines

---
V2: added some docu in README

Anything missing?
Helmut

No, and I add here my

However, this is a cross-platform patch and I cannot (even if it is only a cosmetic change) push it into the u-boot-imx tree. IMHO it should flow directly into u-boot mainline, if accepted by Wolfgang.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#9 lore raw

PATCH v2 1/1 cosmetic: s/BOARD_LATE_INIT/CONFIG_BOARD_LATE_INIT

In reply to Helmut Raiger

Dear Helmut Raiger,

Quoted 39 lines · In message <[email protected]> you wrote:

This renames BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT. Along the way it removes some leftover

#define BOARD_LATE_INIT 1

and adds some basic documentation for board specific callbacks in README.

---
V2: added some docu in README

 README                               |   14 ++++++++++++++
 arch/arm/lib/board.c                 |    2 +-
 arch/sandbox/lib/board.c             |    2 +-
 arch/sh/lib/board.c                  |    2 +-
 board/freescale/mx35pdk/mx35pdk.c    |    4 ++--
 board/freescale/mx51evk/mx51evk.c    |    2 +-
 board/imx31_phycore/imx31_phycore.c  |    2 +-
 board/st-ericsson/u8500/u8500_href.c |    4 ++--
 include/configs/VCMA9.h              |    2 +-
 include/configs/cerf250.h            |    2 +-
 include/configs/colibri_pxa270.h     |    2 +-
 include/configs/efikamx.h            |    2 +-
 include/configs/imx31_phycore.h      |    2 +-
 include/configs/jadecpu.h            |    2 +-
 include/configs/lubbock.h            |    2 +-
 include/configs/ms7750se.h           |    2 +-
 include/configs/mx1ads.h             |    2 +-
 include/configs/mx31pdk.h            |    2 +-
 include/configs/mx35pdk.h            |    2 +-
 include/configs/mx51evk.h            |    2 +-
 include/configs/mx53evk.h            |    2 +-
 include/configs/nhk8815.h            |    2 +-
 include/configs/pleb2.h              |    2 +-
 include/configs/pxa255_idp.h         |    2 +-
 include/configs/qong.h               |    2 +-
 include/configs/r2dplus.h            |    2 +-
 include/configs/sh7757lcr.h          |    2 +-
Quoted 8 lines
 include/configs/trizepsiv.h          |    2 +-
 include/configs/tx25.h               |    2 +-
 include/configs/u8500_href.h         |    2 +-
 include/configs/vision2.h            |    2 +-
 include/configs/xaeniax.h            |    2 +-
 include/configs/zipitz2.h            |    2 +-
 include/configs/zmx25.h              |    2 +-
 34 files changed, 49 insertions(+), 35 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Real programmers can write assembly code in any language.   :-)
                      - Larry Wall in  <[email protected]>