Patchwork [U-Boot,2/5] am33xx: support for booting via usbeth

login
register
mail settings
Submitter Ilya Yanok
Date Dec. 31, 2012, 4:32 p.m.
Message ID <1356971563-23478-3-git-send-email-ilya.yanok@cogentembedded.com>
Download mbox | patch
Permalink /patch/208882/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Ilya Yanok - Dec. 31, 2012, 4:32 p.m.
This patch adds BOOT_DEVICE define for USB booting and fixes
spl_board_init function to call arch_misc_init (this is the place there
musb is initialized).

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
---
 arch/arm/cpu/armv7/omap-common/boot-common.c | 3 +++
 arch/arm/include/asm/arch-am33xx/spl.h       | 1 +
 2 files changed, 4 insertions(+)
Tom Rini - Jan. 2, 2013, 3:15 p.m.
On Mon, Dec 31, 2012 at 08:32:40PM +0400, Ilya Yanok wrote:

> This patch adds BOOT_DEVICE define for USB booting and fixes
> spl_board_init function to call arch_misc_init (this is the place there
> musb is initialized).
[snip]
> @@ -54,6 +54,9 @@ void spl_board_init(void)
>  #ifdef CONFIG_SPL_NAND_SUPPORT
>  	gpmc_init();
>  #endif
> +#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
> +	arch_misc_init();
> +#endif

I don't think we need both tests here.  As I said in the DFU thread,
arch_misc_init is where everyone should be doing the "just register
things" side of gadget USB hook-up.  Clocking and pinmux are elsewhere
anyhow.
Tom Rini - Feb. 5, 2013, 4:25 p.m.
On Mon, Dec 31, 2012 at 06:32:40AM -0000, Ilya Yanok wrote:

> This patch adds BOOT_DEVICE define for USB booting and fixes
> spl_board_init function to call arch_misc_init (this is the place there
> musb is initialized).
> 
> Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>

On further review, I drop my previous objection.

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c
index 0f19141..99dc9d8 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/cpu/armv7/omap-common/boot-common.c
@@ -54,6 +54,9 @@  void spl_board_init(void)
 #ifdef CONFIG_SPL_NAND_SUPPORT
 	gpmc_init();
 #endif
+#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
+	arch_misc_init();
+#endif
 }
 
 int board_mmc_init(bd_t *bis)
diff --git a/arch/arm/include/asm/arch-am33xx/spl.h b/arch/arm/include/asm/arch-am33xx/spl.h
index 644ff35..e961ce0 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -29,6 +29,7 @@ 
 #define BOOT_DEVICE_MMC2	9	/* eMMC or daughter card */
 #define BOOT_DEVICE_SPI		11
 #define BOOT_DEVICE_UART	65
+#define BOOT_DEVICE_USBETH	68
 #define BOOT_DEVICE_CPGMAC	70
 #define BOOT_DEVICE_MMC2_2      0xFF
 #endif