All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL
@ 2016-08-24 18:04 Paul Kocialkowski
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 18:04 UTC (permalink / raw)
  To: u-boot

This includes the TWL6030 power driver in SPL, to allow powering up MMC
devices. This is especially relevant when the bootrom didn't power any
MMC device yet but U-Boot is to be loaded from MMC (e.g. after setting
boot mode from the SYS_BOOT pins in peripheral boot).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 include/configs/ti_omap4_common.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 5fad3c1..7e08887 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -65,9 +65,7 @@
 #define CONFIG_CONS_INDEX		3
 
 /* TWL6030 */
-#ifndef CONFIG_SPL_BUILD
 #define CONFIG_TWL6030_POWER		1
-#endif
 
 /* USB */
 #define CONFIG_USB_MUSB_UDC			1
@@ -162,11 +160,4 @@
 #define CONFIG_SPL_NAND_AM33XX_BCH	/* ELM support */
 #endif
 
-#ifdef CONFIG_SPL_BUILD
-/* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
-#undef CONFIG_SYS_I2C
-#undef CONFIG_SYS_I2C_OMAP24XX
-#undef CONFIG_SPL_I2C_SUPPORT
-#endif
-
 #endif /* __CONFIG_TI_OMAP4_COMMON_H */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 in SPL
  2016-08-24 18:04 [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
@ 2016-08-24 18:04 ` Paul Kocialkowski
  2016-08-26 21:27   ` Tom Rini
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot Paul Kocialkowski
  2016-08-26 21:27 ` [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Tom Rini
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 18:04 UTC (permalink / raw)
  To: u-boot

This adds support for initializing MMC power from TWL6030 in SPL, which
is required when the bootrom didn't power the MMC device yet and U-Boot
is to be loaded from MMC (e.g. after setting boot mode from the SYS_BOOT
pins in peripheral boot).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 board/ti/panda/panda.c        | 2 +-
 include/configs/omap4_panda.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index 13b5daf..ebab4e7 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -292,12 +292,12 @@ int board_mmc_init(bd_t *bis)
 {
 	return omap_mmc_init(0, 0, 0, -1, -1);
 }
+#endif
 
 void board_mmc_power_init(void)
 {
 	twl6030_power_mmc_init(0);
 }
-#endif
 
 #ifdef CONFIG_USB_EHCI
 
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index ffa22c3..41991e0 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -33,6 +33,8 @@
 
 #include <configs/ti_omap4_common.h>
 
+#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
+
 /* GPIO */
 
 /* ENV related config options */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot
  2016-08-24 18:04 [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
@ 2016-08-24 18:04 ` Paul Kocialkowski
  2016-08-26 21:27   ` Tom Rini
  2016-08-26 21:27 ` [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Tom Rini
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 18:04 UTC (permalink / raw)
  To: u-boot

This reworks spl_set_header_raw_uboot to allow having both os boot
(which comes with a valid header) and aborting when no valid header is
found (thus excluding raw u-boot.bin images).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 common/spl/spl.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index b7ec333..e14ec80 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -129,10 +129,8 @@ int spl_parse_image_header(const struct image_header *header)
 		 * is bad, and thus should be skipped silently.
 		 */
 		panic("** no mkimage signature but raw image not supported");
-#elif defined(CONFIG_SPL_ABORT_ON_RAW_IMAGE)
-		/* Signature not found, proceed to other boot methods. */
-		return -EINVAL;
-#else
+#endif
+
 #ifdef CONFIG_SPL_OS_BOOT
 		ulong start, end;
 
@@ -147,6 +145,11 @@ int spl_parse_image_header(const struct image_header *header)
 			return 0;
 		}
 #endif
+
+#ifdef CONFIG_SPL_ABORT_ON_RAW_IMAGE
+		/* Signature not found, proceed to other boot methods. */
+		return -EINVAL;
+#else
 		/* Signature not found - assume u-boot.bin */
 		debug("mkimage signature not found - ih_magic = %x\n",
 			header->ih_magic);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL
  2016-08-24 18:04 [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot Paul Kocialkowski
@ 2016-08-26 21:27 ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-08-26 21:27 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 24, 2016 at 08:04:40PM +0200, Paul Kocialkowski wrote:

> This includes the TWL6030 power driver in SPL, to allow powering up MMC
> devices. This is especially relevant when the bootrom didn't power any
> MMC device yet but U-Boot is to be loaded from MMC (e.g. after setting
> boot mode from the SYS_BOOT pins in peripheral boot).
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160826/1cc37dc3/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 in SPL
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
@ 2016-08-26 21:27   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-08-26 21:27 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 24, 2016 at 08:04:41PM +0200, Paul Kocialkowski wrote:

> This adds support for initializing MMC power from TWL6030 in SPL, which
> is required when the bootrom didn't power the MMC device yet and U-Boot
> is to be loaded from MMC (e.g. after setting boot mode from the SYS_BOOT
> pins in peripheral boot).
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160826/0c823bfd/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot
  2016-08-24 18:04 ` [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot Paul Kocialkowski
@ 2016-08-26 21:27   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-08-26 21:27 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 24, 2016 at 08:04:42PM +0200, Paul Kocialkowski wrote:

> This reworks spl_set_header_raw_uboot to allow having both os boot
> (which comes with a valid header) and aborting when no valid header is
> found (thus excluding raw u-boot.bin images).
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160826/8c7042a4/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-26 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 18:04 [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
2016-08-24 18:04 ` [U-Boot] [PATCH v2 2/3] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
2016-08-26 21:27   ` Tom Rini
2016-08-24 18:04 ` [U-Boot] [PATCH v2 3/3] spl: Rework image header parse to allow abort on raw image and os boot Paul Kocialkowski
2016-08-26 21:27   ` Tom Rini
2016-08-26 21:27 ` [U-Boot] [PATCH v2 1/3] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.