diff mbox

[U-Boot,2/2] overo: u-boot breaks for the Overo boards after v2014.10

Message ID 1429660593-6410-3-git-send-email-arun@gumstix.com
State Deferred
Delegated to: Tom Rini
Headers show

Commit Message

Arun Bharadwaj April 21, 2015, 11:56 p.m. UTC
u-boot breaks for the Overo boards since the following
commit: a6b541b09022acb6f7c2754100ae26bd44eed1d9

This is because the gd pointer is not set early enough anymore,
such that the i2c_set_bus_num in get_board_revision can safely
execute. This results in a console hang at SPL and the boot does
not proceed.

This piece of code is anyway necessary only for really old Overo
boards with revision numbers <= 2410 and not required for the newer
boards. For these older boards, u-boot v2014.10 still works fine.

Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
---
 board/overo/spl.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Ash Charles April 22, 2015, 4:37 p.m. UTC | #1
Hi Arun,

I gave this patch a whirl and it works for me.  As such:
Tested-by: Ash Charles <ashcharles@gmail.com>

--Ash

On Tue, Apr 21, 2015 at 4:56 PM, Arun Bharadwaj <arun@gumstix.com> wrote:
> u-boot breaks for the Overo boards since the following
> commit: a6b541b09022acb6f7c2754100ae26bd44eed1d9
>
> This is because the gd pointer is not set early enough anymore,
> such that the i2c_set_bus_num in get_board_revision can safely
> execute. This results in a console hang at SPL and the boot does
> not proceed.
>
> This piece of code is anyway necessary only for really old Overo
> boards with revision numbers <= 2410 and not required for the newer
> boards. For these older boards, u-boot v2014.10 still works fine.
>
> Signed-off-by: Arun Bharadwaj <arun@gumstix.com>
> ---
>  board/overo/spl.c | 14 --------------
>  1 file changed, 14 deletions(-)
>
> diff --git a/board/overo/spl.c b/board/overo/spl.c
> index d101c68..e1652c3 100644
> --- a/board/overo/spl.c
> +++ b/board/overo/spl.c
> @@ -29,20 +29,6 @@ int get_board_revision(void)
>  {
>          int revision;
>
> -#ifdef CONFIG_SYS_I2C_OMAP34XX
> -        unsigned char data;
> -
> -        /* board revisions <= R2410 connect 4030 irq_1 to gpio112             */
> -        /* these boards should return a revision number of 0                  */
> -        /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */
> -        i2c_set_bus_num(TWL4030_I2C_BUS);
> -        data = 0x01;
> -        i2c_write(0x4B, 0x29, 1, &data, 1);
> -        data = 0x0c;
> -        i2c_write(0x4B, 0x2b, 1, &data, 1);
> -        i2c_read(0x4B, 0x2a, 1, &data, 1);
> -#endif
> -
>          if (!gpio_request(112, "") &&
>              !gpio_request(113, "") &&
>              !gpio_request(115, "")) {
> --
> 1.9.1
>
diff mbox

Patch

diff --git a/board/overo/spl.c b/board/overo/spl.c
index d101c68..e1652c3 100644
--- a/board/overo/spl.c
+++ b/board/overo/spl.c
@@ -29,20 +29,6 @@  int get_board_revision(void)
 {
         int revision;
 
-#ifdef CONFIG_SYS_I2C_OMAP34XX
-        unsigned char data;
-
-        /* board revisions <= R2410 connect 4030 irq_1 to gpio112             */
-        /* these boards should return a revision number of 0                  */
-        /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */
-        i2c_set_bus_num(TWL4030_I2C_BUS);
-        data = 0x01;
-        i2c_write(0x4B, 0x29, 1, &data, 1);
-        data = 0x0c;
-        i2c_write(0x4B, 0x2b, 1, &data, 1);
-        i2c_read(0x4B, 0x2a, 1, &data, 1);
-#endif
-
         if (!gpio_request(112, "") &&
             !gpio_request(113, "") &&
             !gpio_request(115, "")) {