* [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL
@ 2016-08-24 14:40 Paul Kocialkowski
2016-08-24 14:40 ` [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
2016-08-24 15:22 ` [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support " Tom Rini
0 siblings, 2 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 14:40 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] 5+ messages in thread
* [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 in SPL
2016-08-24 14:40 [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
@ 2016-08-24 14:40 ` Paul Kocialkowski
2016-08-24 15:24 ` Tom Rini
2016-08-24 15:22 ` [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support " Tom Rini
1 sibling, 1 reply; 5+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 14:40 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 | 3 +++
2 files changed, 4 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..af9ff08 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -33,6 +33,9 @@
#include <configs/ti_omap4_common.h>
+/* MMCSD FS mode is preferred */
+#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+
/* GPIO */
/* ENV related config options */
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL
2016-08-24 14:40 [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
2016-08-24 14:40 ` [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
@ 2016-08-24 15:22 ` Tom Rini
1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-08-24 15:22 UTC (permalink / raw)
To: u-boot
On Wed, Aug 24, 2016 at 04:40:41PM +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>
> ---
> 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 */
If nothing calls these functions in SPL they should be gc'd away and we
won't get any size increase. So in that case:
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/20160824/b4115f72/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 in SPL
2016-08-24 14:40 ` [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
@ 2016-08-24 15:24 ` Tom Rini
2016-08-24 17:57 ` Paul Kocialkowski
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2016-08-24 15:24 UTC (permalink / raw)
To: u-boot
On Wed, Aug 24, 2016 at 04:40:42PM +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).
So you're loading SPL via USB? If it's via serial I'd much rather just
use the SPL Y-Modem support instead. Also:
[snip]
> +/* MMCSD FS mode is preferred */
> +#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
That's very much not true. Distro boot is usually done with raw mode
not FAT.
--
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/20160824/d7005389/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 in SPL
2016-08-24 15:24 ` Tom Rini
@ 2016-08-24 17:57 ` Paul Kocialkowski
0 siblings, 0 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2016-08-24 17:57 UTC (permalink / raw)
To: u-boot
Le mercredi 24 ao?t 2016 ? 11:24 -0400, Tom Rini a ?crit?:
> On Wed, Aug 24, 2016 at 04:40:42PM +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).
>
> So you're loading SPL via USB???If it's via serial I'd much rather just
> use the SPL Y-Modem support instead.??Also:
Right, I'm loading SPL via USB and wish to load u-boot.img via MMC, according to
the SYS_BOOT configuration.
This is useful when e.g. only UART Tx is exported from the device.
> [snip]
> >
> > +/* MMCSD FS mode is preferred */
> > +#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
>
> That's very much not true.??Distro boot is usually done with raw mode
> not FAT.
Fair enough. The problem here is that the omap-common bootcode will assume raw
mode when reading mmc boot media from SYS_BOOT pins. Raw mode is supposed to
fallback to FS mode (which is what I want), but
when?CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR is defined, it'll go ahead and try
to load the image. Even if it reads garbage (no valid header), it'll still go
ahead and assume u-boot.bin. In practice, it means that?raw mode can never fail
as long as?CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR is set.
Setting?CONFIG_SPL_ABORT_ON_RAW_IMAGE allows properly returning when no valid
header is found, but it conflicts with?CONFIG_SPL_OS_BOOT.
If setting CONFIG_SPL_ABORT_ON_RAW_IMAGE seems agreeable to you (I don't think
anyone cares about u-boot.bin anymore), I could rework the logic there so that
there is no longer a conflict with CONFIG_SPL_OS_BOOT.
What do you think?
--
Paul Kocialkowski, developer of low-level free software for embedded devices
Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160824/5536b354/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-24 17:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 14:40 [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support in SPL Paul Kocialkowski
2016-08-24 14:40 ` [U-Boot] [PATCH 2/2] panda: Initialize MMC power from TWL6030 " Paul Kocialkowski
2016-08-24 15:24 ` Tom Rini
2016-08-24 17:57 ` Paul Kocialkowski
2016-08-24 15:22 ` [U-Boot] [PATCH 1/2] configs: ti_omap4_common: Include TWL6030 power and I2C support " 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.