diff mbox

[U-Boot,2/2] ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

Message ID 1336498172-14063-2-git-send-email-trini@ti.com
State Accepted
Commit 49175c49bae743a80c9fa2e264ccee7befa0b7a4
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini May 8, 2012, 5:29 p.m. UTC
As originally reported against beagleboard we currently have the
following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

The reason for above message is that when booting from MMC, I2C needs to
be initialized to talk with the TWL4030.  On OMAP3 I2C is only
initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

Cc: Thomas Weber <weber@corscience.de>
Cc: Steve Sakoman <sakoman@gmail.com>

Original patch for Beagleboard is:
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>

Extended to cover all other boards:
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/omap3_beagle.h     |    1 +
 include/configs/omap3_evm_common.h |    1 +
 include/configs/omap3_overo.h      |    1 +
 include/configs/tricorder.h        |    1 +
 4 files changed, 4 insertions(+)

Comments

Thomas Weber May 9, 2012, 7:44 a.m. UTC | #1
Hello Tom & Peter,

On 05/08/12 19:29, Tom Rini wrote:
> As originally reported against beagleboard we currently have the
> following error message reported in SPL:
>
> U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57)
> Texas Instruments Revision detection unimplemented
> OMAP SD/MMC: 0
> timed out in wait_for_bb: I2C_STAT=1000
> reading u-boot.img
> ....
>
> The reason for above message is that when booting from MMC, I2C needs to
> be initialized to talk with the TWL4030.  On OMAP3 I2C is only
> initalized in SPL if CONFIG_SPL_BOARD_INIT is set.
On Tricorder there is no such message. I thought the I2C to TWL4030 is 
initialized by the ROM code.
And why can the SPL read the u-boot.img in the  next step?

Thomas
> Cc: Thomas Weber<weber@corscience.de>
> Cc: Steve Sakoman<sakoman@gmail.com>
>
> Original patch for Beagleboard is:
> Signed-off-by: Peter Meerwald<p.meerwald@bct-electronic.com>
>
> Extended to cover all other boards:
> Signed-off-by: Tom Rini<trini@ti.com>
> ---
>   include/configs/omap3_beagle.h     |    1 +
>   include/configs/omap3_evm_common.h |    1 +
>   include/configs/omap3_overo.h      |    1 +
>   include/configs/tricorder.h        |    1 +
>   4 files changed, 4 insertions(+)
>
> diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
> index 6bdc2c3..b891ee4 100644
> --- a/include/configs/omap3_beagle.h
> +++ b/include/configs/omap3_beagle.h
> @@ -410,6 +410,7 @@
>   #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
>   #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
>
> +#define CONFIG_SPL_BOARD_INIT
>   #define CONFIG_SPL_LIBCOMMON_SUPPORT
>   #define CONFIG_SPL_LIBDISK_SUPPORT
>   #define CONFIG_SPL_I2C_SUPPORT
> diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
> index 47ebbef..7b21a5c 100644
> --- a/include/configs/omap3_evm_common.h
> +++ b/include/configs/omap3_evm_common.h
> @@ -288,6 +288,7 @@
>   #define CONFIG_SPL_BSS_START_ADDR	0x80000000
>   #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
>
> +#define CONFIG_SPL_BOARD_INIT
>   #define CONFIG_SPL_LIBCOMMON_SUPPORT
>   #define CONFIG_SPL_LIBDISK_SUPPORT
>   #define CONFIG_SPL_I2C_SUPPORT
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index b0d144f..a0a7a1c 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -317,6 +317,7 @@
>   #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
>   #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
>
> +#define CONFIG_SPL_BOARD_INIT
>   #define CONFIG_SPL_LIBCOMMON_SUPPORT
>   #define CONFIG_SPL_LIBDISK_SUPPORT
>   #define CONFIG_SPL_I2C_SUPPORT
> diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
> index ab911aa..9955fca 100644
> --- a/include/configs/tricorder.h
> +++ b/include/configs/tricorder.h
> @@ -278,6 +278,7 @@
>   #define CONFIG_SPL
>   #define CONFIG_SPL_NAND_SIMPLE
>
> +#define CONFIG_SPL_BOARD_INIT
>   #define CONFIG_SPL_LIBCOMMON_SUPPORT
>   #define CONFIG_SPL_LIBDISK_SUPPORT
>   #define CONFIG_SPL_I2C_SUPPORT
Tom Rini May 9, 2012, 2:13 p.m. UTC | #2
On 05/09/2012 12:44 AM, Thomas Weber wrote:
> Hello Tom & Peter,
>
> On 05/08/12 19:29, Tom Rini wrote:
>> As originally reported against beagleboard we currently have the
>> following error message reported in SPL:
>>
>> U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57)
>> Texas Instruments Revision detection unimplemented
>> OMAP SD/MMC: 0
>> timed out in wait_for_bb: I2C_STAT=1000
>> reading u-boot.img
>> ....
>>
>> The reason for above message is that when booting from MMC, I2C needs to
>> be initialized to talk with the TWL4030. On OMAP3 I2C is only
>> initalized in SPL if CONFIG_SPL_BOARD_INIT is set.
> On Tricorder there is no such message. I thought the I2C to TWL4030 is
> initialized by the ROM code.
> And why can the SPL read the u-boot.img in the next step?

Things must be setup to a certain extent or we couldn't have been loaded 
by ROM, yes.  Since am35x parts are a different family from the omap3 
boards, I'll double check what the am3517 evm I have says here as well. 
  For correctness however, we currently are turning on the i2c support 
in SPL and then not using it.  So something should be changed :)
Tom Rini May 9, 2012, 6:54 p.m. UTC | #3
On 05/09/2012 12:44 AM, Thomas Weber wrote:
> Hello Tom & Peter,
>
> On 05/08/12 19:29, Tom Rini wrote:
>> As originally reported against beagleboard we currently have the
>> following error message reported in SPL:
>>
>> U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57)
>> Texas Instruments Revision detection unimplemented
>> OMAP SD/MMC: 0
>> timed out in wait_for_bb: I2C_STAT=1000
>> reading u-boot.img
>> ....
>>
>> The reason for above message is that when booting from MMC, I2C needs to
>> be initialized to talk with the TWL4030. On OMAP3 I2C is only
>> initalized in SPL if CONFIG_SPL_BOARD_INIT is set.
> On Tricorder there is no such message. I thought the I2C to TWL4030 is
> initialized by the ROM code.
> And why can the SPL read the u-boot.img in the next step?

I think we need this still, on correctness grounds.  We include the i2c 
code (and twl4030 code) to have the MMC driver link and behave as in 
full U-Boot.  I don't see this timed out message on my am3517 evm nor my 
"omap3evm" with an am37x SOM (iirc anyhow).  I do see it on cold power 
on, on my beagle however, but not warm (which might be why I missed this 
before).
diff mbox

Patch

diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 6bdc2c3..b891ee4 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -410,6 +410,7 @@ 
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index 47ebbef..7b21a5c 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -288,6 +288,7 @@ 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index b0d144f..a0a7a1c 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -317,6 +317,7 @@ 
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index ab911aa..9955fca 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -278,6 +278,7 @@ 
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT