* [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support
@ 2013-04-05 16:21 Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-05 16:21 UTC (permalink / raw)
To: u-boot
Today, the eMMC on the omap5_uevm cannot be booted from, due to a bug in
the save_boot_params function that tests for a range of XIP to MMC2.
But in the case of OMAP5, MMC2 is eMMC boot partition and MMC2_2 is eMMC
(main), and uEVM can only boot from MMC2_2. We cannot just update the
test as-is because other platforms define away MMC2_2 to 0xFF as they
cannot be passed that value. I've fixed this by making it clearer in
the comments what we do, and use a platform definable variable to say
where we must check the range for. This part has been tested on some
relevant platforms for each case. While doing this, the question arose
of how to partition eMMC (since u-boot must be written RAW and not put
on FAT), so I've added GPT support for this. Finally, while in here I
see we weren't using the fallbacks baud rate table, so I changed to
that. This series will mildly conflict (mainly over the rename) with
Sricharan's current series of fixes, so I shall resolve that.
--
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
@ 2013-04-05 16:21 ` Tom Rini
2013-04-08 10:44 ` Sricharan R
2013-04-09 14:52 ` Peter Korsgaard
2013-04-05 16:21 ` [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h Tom Rini
` (3 subsequent siblings)
4 siblings, 2 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-05 16:21 UTC (permalink / raw)
To: u-boot
In the case of booting from certain peripherals, such as UART, we must
not see what the device descriptor says for RAW or FAT mode because in
addition to being nonsensical, it leads to a hang. This is why we have
a test currently for the boot mode being within range. The problem
however is that on some platforms we get MMC2_2 as the boot mode and not
the defined value for MMC2, and in others we get the value for MMC2_2.
This is required to fix eMMC booting on omap5_uevm.
Tested on am335x_evm (UART, NAND, SD), omap3_beagle (NAND, SD on
classic, SD only on xM rev C5) and omap5_uevm (SD, eMMC).
Signed-off-by: Tom Rini <trini@ti.com>
---
arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 10 +++++++---
arch/arm/include/asm/arch-am33xx/spl.h | 3 +++
arch/arm/include/asm/arch-omap3/spl.h | 3 +++
arch/arm/include/asm/arch-omap4/spl.h | 2 ++
arch/arm/include/asm/arch-omap5/spl.h | 2 ++
5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
index b933fe8..90b3c8a 100644
--- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
+++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
@@ -60,10 +60,14 @@ ENTRY(save_boot_params)
ldr r3, =boot_params
strb r2, [r3, #BOOT_DEVICE_OFFSET] @ spl_boot_device <- r1
- /* boot mode is passed only for devices that can raw/fat mode */
- cmp r2, #BOOT_DEVICE_XIP
+ /*
+ * boot mode is only valid for device that can be raw or FAT booted.
+ * in other cases it may be fatal to look. While platforms differ
+ * in the values used for each MMC slot, they are contiguous.
+ */
+ cmp r2, #MMC_BOOT_DEVICES_START
blt 2f
- cmp r2, #BOOT_DEVICE_MMC2
+ cmp r2, #MMC_BOOT_DEVICES_END
bgt 2f
/* Store the boot mode (raw/FAT) in omap_bootmode */
ldr r2, [r0, #DEV_DESC_PTR_OFFSET] @ get the device descriptor ptr
diff --git a/arch/arm/include/asm/arch-am33xx/spl.h b/arch/arm/include/asm/arch-am33xx/spl.h
index f60b086..14a2c7c 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -37,4 +37,7 @@
#define BOOT_DEVICE_USBETH 68
#define BOOT_DEVICE_CPGMAC 70
#define BOOT_DEVICE_MMC2_2 0xFF
+
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
#endif
diff --git a/arch/arm/include/asm/arch-omap3/spl.h b/arch/arm/include/asm/arch-omap3/spl.h
index dec4dac..84e6d7b 100644
--- a/arch/arm/include/asm/arch-omap3/spl.h
+++ b/arch/arm/include/asm/arch-omap3/spl.h
@@ -31,4 +31,7 @@
#define BOOT_DEVICE_MMC1 6
#define BOOT_DEVICE_XIPWAIT 7
#define BOOT_DEVICE_MMC2_2 0xFF
+
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
+#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC1
#endif
diff --git a/arch/arm/include/asm/arch-omap4/spl.h b/arch/arm/include/asm/arch-omap4/spl.h
index 4e094f9..f61627f 100644
--- a/arch/arm/include/asm/arch-omap4/spl.h
+++ b/arch/arm/include/asm/arch-omap4/spl.h
@@ -32,4 +32,6 @@
#define BOOT_DEVICE_MMC2 6
#define BOOT_DEVICE_MMC2_2 0xFF
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
#endif
diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h
index 323cd63..d4d353c 100644
--- a/arch/arm/include/asm/arch-omap5/spl.h
+++ b/arch/arm/include/asm/arch-omap5/spl.h
@@ -32,4 +32,6 @@
#define BOOT_DEVICE_MMC2 6
#define BOOT_DEVICE_MMC2_2 7
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2_2
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
@ 2013-04-05 16:21 ` Tom Rini
2013-04-08 16:34 ` Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 3/3] omap5_common.h: Use fallback CONFIG_SYS_BAUDRATE_TABLE Tom Rini
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2013-04-05 16:21 UTC (permalink / raw)
To: u-boot
The omap5_uevm platform has eMMC, and it makes sense to say that our
default env storage shall reside there. Other platforms may not, so
move this choice to the EVM config. In addition, we should provide some
way to partition the flash for later usage, so take advantage of the GPT
partition table support code and allow that to be setup with some
reasonable defaults.
Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
include/configs/omap5_common.h | 13 +++++--------
include/configs/omap5_evm.h | 18 ++++++++++++++++++
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index af97564..6ba5022 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -94,19 +94,12 @@
#define CONFIG_DRIVER_OMAP34XX_I2C
#define CONFIG_I2C_MULTI_BUS
-
/* MMC */
#define CONFIG_GENERIC_MMC
#define CONFIG_MMC
#define CONFIG_OMAP_HSMMC
#define CONFIG_DOS_PARTITION
-/* MMC ENV related defines */
-#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
-#define CONFIG_ENV_OFFSET 0xE0000
-#define CONFIG_CMD_SAVEENV
-
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
/* Flash */
@@ -124,7 +117,6 @@
#define CONFIG_CMD_FAT /* FAT support */
#define CONFIG_CMD_I2C /* I2C serial bus support */
#define CONFIG_CMD_MMC /* MMC support */
-#define CONFIG_CMD_SAVEENV
/* Disabled commands */
#undef CONFIG_CMD_NET
@@ -140,11 +132,16 @@
#define CONFIG_ENV_OVERWRITE
+#ifndef PARTS_DEFAULT
+#define PARTS_DEFAULT
+#endif
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x82000000\0" \
"console=ttyO2,115200n8\0" \
"usbtty=cdc_acm\0" \
"vram=16M\0" \
+ "partitions=" PARTS_DEFAULT "\0" \
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 rw\0" \
"mmcrootfstype=ext3 rootwait\0" \
diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h
index 22a8e13..e490523 100644
--- a/include/configs/omap5_evm.h
+++ b/include/configs/omap5_evm.h
@@ -28,6 +28,12 @@
#ifndef __CONFIG_OMAP5_EVM_H
#define __CONFIG_OMAP5_EVM_H
+/* Define the default GPT table for eMMC */
+#define PARTS_DEFAULT \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=u-boot,size=1792KiB,uuid=${uuid_gpt_u-boot};" \
+ "name=rootfs,size=-,uuid=${uuid_gpt_rootfs}"
+
#include <configs/omap5_common.h>
/* TWL6035 */
@@ -35,6 +41,18 @@
#define CONFIG_TWL6035_POWER
#endif
+/* MMC ENV related defines */
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
+#define CONFIG_ENV_OFFSET 0xE0000
+#define CONFIG_CMD_SAVEENV
+
+/* Enhance our eMMC support / experience. */
+#define CONFIG_CMD_GPT
+#define CONFIG_EFI_PARTITION
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_CMD_PART
+
#define CONFIG_SYS_PROMPT "OMAP5430 EVM # "
#endif /* __CONFIG_OMAP5_EVM_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] omap5_common.h: Use fallback CONFIG_SYS_BAUDRATE_TABLE
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h Tom Rini
@ 2013-04-05 16:21 ` Tom Rini
2013-04-08 16:35 ` [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
2013-04-08 16:55 ` Tom Rini
4 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-05 16:21 UTC (permalink / raw)
To: u-boot
Cc: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
include/configs/omap5_common.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index 6ba5022..a6348a6 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -85,8 +85,7 @@
#define CONFIG_SYS_NS16550_COM3 UART3_BASE
#define CONFIG_BAUDRATE 115200
-#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
- 115200}
+
/* I2C */
#define CONFIG_HARD_I2C
#define CONFIG_SYS_I2C_SPEED 100000
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
@ 2013-04-08 10:44 ` Sricharan R
2013-04-09 14:52 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Sricharan R @ 2013-04-08 10:44 UTC (permalink / raw)
To: u-boot
Hi Tom,
On Friday 05 April 2013 09:51 PM, Tom Rini wrote:
> In the case of booting from certain peripherals, such as UART, we must
> not see what the device descriptor says for RAW or FAT mode because in
> addition to being nonsensical, it leads to a hang. This is why we have
> a test currently for the boot mode being within range. The problem
> however is that on some platforms we get MMC2_2 as the boot mode and not
> the defined value for MMC2, and in others we get the value for MMC2_2.
> This is required to fix eMMC booting on omap5_uevm.
>
> Tested on am335x_evm (UART, NAND, SD), omap3_beagle (NAND, SD on
> classic, SD only on xM rev C5) and omap5_uevm (SD, eMMC).
>
> Signed-off-by: Tom Rini <trini@ti.com>
> ---
> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 10 +++++++---
> arch/arm/include/asm/arch-am33xx/spl.h | 3 +++
> arch/arm/include/asm/arch-omap3/spl.h | 3 +++
> arch/arm/include/asm/arch-omap4/spl.h | 2 ++
> arch/arm/include/asm/arch-omap5/spl.h | 2 ++
> 5 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> index b933fe8..90b3c8a 100644
> --- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> @@ -60,10 +60,14 @@ ENTRY(save_boot_params)
> ldr r3, =boot_params
> strb r2, [r3, #BOOT_DEVICE_OFFSET] @ spl_boot_device <- r1
>
> - /* boot mode is passed only for devices that can raw/fat mode */
> - cmp r2, #BOOT_DEVICE_XIP
> + /*
> + * boot mode is only valid for device that can be raw or FAT booted.
> + * in other cases it may be fatal to look. While platforms differ
> + * in the values used for each MMC slot, they are contiguous.
> + */
> + cmp r2, #MMC_BOOT_DEVICES_START
> blt 2f
> - cmp r2, #BOOT_DEVICE_MMC2
> + cmp r2, #MMC_BOOT_DEVICES_END
> bgt 2f
> /* Store the boot mode (raw/FAT) in omap_bootmode */
> ldr r2, [r0, #DEV_DESC_PTR_OFFSET] @ get the device descriptor ptr
> diff --git a/arch/arm/include/asm/arch-am33xx/spl.h b/arch/arm/include/asm/arch-am33xx/spl.h
> index f60b086..14a2c7c 100644
> --- a/arch/arm/include/asm/arch-am33xx/spl.h
> +++ b/arch/arm/include/asm/arch-am33xx/spl.h
> @@ -37,4 +37,7 @@
> #define BOOT_DEVICE_USBETH 68
> #define BOOT_DEVICE_CPGMAC 70
> #define BOOT_DEVICE_MMC2_2 0xFF
> +
> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
> #endif
> diff --git a/arch/arm/include/asm/arch-omap3/spl.h b/arch/arm/include/asm/arch-omap3/spl.h
> index dec4dac..84e6d7b 100644
> --- a/arch/arm/include/asm/arch-omap3/spl.h
> +++ b/arch/arm/include/asm/arch-omap3/spl.h
> @@ -31,4 +31,7 @@
> #define BOOT_DEVICE_MMC1 6
> #define BOOT_DEVICE_XIPWAIT 7
> #define BOOT_DEVICE_MMC2_2 0xFF
> +
> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC1
> #endif
> diff --git a/arch/arm/include/asm/arch-omap4/spl.h b/arch/arm/include/asm/arch-omap4/spl.h
> index 4e094f9..f61627f 100644
> --- a/arch/arm/include/asm/arch-omap4/spl.h
> +++ b/arch/arm/include/asm/arch-omap4/spl.h
> @@ -32,4 +32,6 @@
> #define BOOT_DEVICE_MMC2 6
> #define BOOT_DEVICE_MMC2_2 0xFF
>
> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
> #endif
> diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h
> index 323cd63..d4d353c 100644
> --- a/arch/arm/include/asm/arch-omap5/spl.h
> +++ b/arch/arm/include/asm/arch-omap5/spl.h
> @@ -32,4 +32,6 @@
> #define BOOT_DEVICE_MMC2 6
> #define BOOT_DEVICE_MMC2_2 7
>
> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2_2
> #endif
Acked-by: R Sricharan <r.sricharan@ti.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h
2013-04-05 16:21 ` [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h Tom Rini
@ 2013-04-08 16:34 ` Tom Rini
0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-08 16:34 UTC (permalink / raw)
To: u-boot
On Fri, Apr 05, 2013 at 12:21:45PM -0400, Tom Rini wrote:
> The omap5_uevm platform has eMMC, and it makes sense to say that our
> default env storage shall reside there. Other platforms may not, so
> move this choice to the EVM config. In addition, we should provide some
> way to partition the flash for later usage, so take advantage of the GPT
> partition table support code and allow that to be setup with some
> reasonable defaults.
>
> Cc: Sricharan R <r.sricharan@ti.com>
> Signed-off-by: Tom Rini <trini@ti.com>
With the following change (in addition to _evm.h -> _uevm.h):
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 10a4939..28a306b 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -28,6 +28,8 @@
#ifndef __CONFIG_DRA7XX_EVM_H
#define __CONFIG_DRA7XX_EVM_H
+#define CONFIG_ENV_IS_NOWHERE /* For now. */
+
#include <configs/omap5_common.h>
#define CONFIG_DRA7XX /* in a TI DRA7XX core */
Applied to u-boot-ti/master. And the "for now" comment is about waiting
until the platform is in some peoples hands and we can better evaluate
defaults and so forth for it.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130408/281248f8/attachment.pgp>
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
` (2 preceding siblings ...)
2013-04-05 16:21 ` [U-Boot] [PATCH 3/3] omap5_common.h: Use fallback CONFIG_SYS_BAUDRATE_TABLE Tom Rini
@ 2013-04-08 16:35 ` Tom Rini
2013-04-08 16:55 ` Tom Rini
4 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-08 16:35 UTC (permalink / raw)
To: u-boot
On Fri, Apr 05, 2013 at 12:21:43PM -0400, Tom Rini wrote:
> Today, the eMMC on the omap5_uevm cannot be booted from, due to a bug in
> the save_boot_params function that tests for a range of XIP to MMC2.
> But in the case of OMAP5, MMC2 is eMMC boot partition and MMC2_2 is eMMC
> (main), and uEVM can only boot from MMC2_2. We cannot just update the
> test as-is because other platforms define away MMC2_2 to 0xFF as they
> cannot be passed that value. I've fixed this by making it clearer in
> the comments what we do, and use a platform definable variable to say
> where we must check the range for. This part has been tested on some
> relevant platforms for each case. While doing this, the question arose
> of how to partition eMMC (since u-boot must be written RAW and not put
> on FAT), so I've added GPT support for this. Finally, while in here I
> see we weren't using the fallbacks baud rate table, so I changed to
> that. This series will mildly conflict (mainly over the rename) with
> Sricharan's current series of fixes, so I shall resolve that.
With the small change to 2/3, applied to u-boot-ti/master.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130408/3305f21b/attachment.pgp>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
` (3 preceding siblings ...)
2013-04-08 16:35 ` [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
@ 2013-04-08 16:55 ` Tom Rini
4 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-08 16:55 UTC (permalink / raw)
To: u-boot
On Fri, Apr 05, 2013 at 12:21:43PM -0400, Tom Rini wrote:
> Today, the eMMC on the omap5_uevm cannot be booted from, due to a bug in
> the save_boot_params function that tests for a range of XIP to MMC2.
> But in the case of OMAP5, MMC2 is eMMC boot partition and MMC2_2 is eMMC
> (main), and uEVM can only boot from MMC2_2. We cannot just update the
> test as-is because other platforms define away MMC2_2 to 0xFF as they
> cannot be passed that value. I've fixed this by making it clearer in
> the comments what we do, and use a platform definable variable to say
> where we must check the range for. This part has been tested on some
> relevant platforms for each case. While doing this, the question arose
> of how to partition eMMC (since u-boot must be written RAW and not put
> on FAT), so I've added GPT support for this. Finally, while in here I
> see we weren't using the fallbacks baud rate table, so I changed to
> that. This series will mildly conflict (mainly over the rename) with
> Sricharan's current series of fixes, so I shall resolve that.
With the change to 2/3, applied to u-boot-ti/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130408/3e17d3f4/attachment.pgp>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
2013-04-08 10:44 ` Sricharan R
@ 2013-04-09 14:52 ` Peter Korsgaard
2013-04-09 15:39 ` Tom Rini
1 sibling, 1 reply; 10+ messages in thread
From: Peter Korsgaard @ 2013-04-09 14:52 UTC (permalink / raw)
To: u-boot
>>>>> "Tom" == Tom Rini <trini@ti.com> writes:
Tom> In the case of booting from certain peripherals, such as UART, we must
Tom> not see what the device descriptor says for RAW or FAT mode because in
Tom> addition to being nonsensical, it leads to a hang. This is why we have
Tom> a test currently for the boot mode being within range. The problem
Tom> however is that on some platforms we get MMC2_2 as the boot mode and not
Tom> the defined value for MMC2, and in others we get the value for MMC2_2.
Tom> This is required to fix eMMC booting on omap5_uevm.
Tom> Tested on am335x_evm (UART, NAND, SD), omap3_beagle (NAND, SD on
Tom> classic, SD only on xM rev C5) and omap5_uevm (SD, eMMC).
Tom> Signed-off-by: Tom Rini <trini@ti.com>
Tom> ---
Tom> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 10 +++++++---
Tom> arch/arm/include/asm/arch-am33xx/spl.h | 3 +++
Tom> arch/arm/include/asm/arch-omap3/spl.h | 3 +++
Tom> arch/arm/include/asm/arch-omap4/spl.h | 2 ++
Tom> arch/arm/include/asm/arch-omap5/spl.h | 2 ++
Tom> 5 files changed, 17 insertions(+), 3 deletions(-)
Tom> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
Tom> index b933fe8..90b3c8a 100644
Tom> --- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
Tom> +++ b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
Tom> @@ -60,10 +60,14 @@ ENTRY(save_boot_params)
Tom> ldr r3, =boot_params
Tom> strb r2, [r3, #BOOT_DEVICE_OFFSET] @ spl_boot_device <- r1
Tom> - /* boot mode is passed only for devices that can raw/fat mode */
Tom> - cmp r2, #BOOT_DEVICE_XIP
Tom> + /*
Tom> + * boot mode is only valid for device that can be raw or FAT booted.
Tom> + * in other cases it may be fatal to look. While platforms differ
Tom> + * in the values used for each MMC slot, they are contiguous.
Tom> + */
Tom> + cmp r2, #MMC_BOOT_DEVICES_START
Tom> blt 2f
Tom> - cmp r2, #BOOT_DEVICE_MMC2
Tom> + cmp r2, #MMC_BOOT_DEVICES_END
Tom> bgt 2f
Tom> /* Store the boot mode (raw/FAT) in omap_bootmode */
Tom> ldr r2, [r0, #DEV_DESC_PTR_OFFSET] @ get the device descriptor ptr
Tom> diff --git a/arch/arm/include/asm/arch-am33xx/spl.h b/arch/arm/include/asm/arch-am33xx/spl.h
Tom> index f60b086..14a2c7c 100644
Tom> --- a/arch/arm/include/asm/arch-am33xx/spl.h
Tom> +++ b/arch/arm/include/asm/arch-am33xx/spl.h
Tom> @@ -37,4 +37,7 @@
Tom> #define BOOT_DEVICE_USBETH 68
Tom> #define BOOT_DEVICE_CPGMAC 70
Tom> #define BOOT_DEVICE_MMC2_2 0xFF
Tom> +
Tom> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
Tom> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
Doesn't this break ti814x with the funky inverted mmc1/mmc2?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC
2013-04-09 14:52 ` Peter Korsgaard
@ 2013-04-09 15:39 ` Tom Rini
0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-04-09 15:39 UTC (permalink / raw)
To: u-boot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/09/2013 10:52 AM, Peter Korsgaard wrote:
>>>>>> "Tom" == Tom Rini <trini@ti.com> writes:
>
> Tom> In the case of booting from certain peripherals, such as UART,
> we must Tom> not see what the device descriptor says for RAW or FAT
> mode because in Tom> addition to being nonsensical, it leads to a
> hang. This is why we have Tom> a test currently for the boot mode
> being within range. The problem Tom> however is that on some
> platforms we get MMC2_2 as the boot mode and not Tom> the defined
> value for MMC2, and in others we get the value for MMC2_2. Tom>
> This is required to fix eMMC booting on omap5_uevm.
>
> Tom> Tested on am335x_evm (UART, NAND, SD), omap3_beagle (NAND, SD
> on Tom> classic, SD only on xM rev C5) and omap5_uevm (SD, eMMC).
>
> Tom> Signed-off-by: Tom Rini <trini@ti.com> Tom> --- Tom>
> arch/arm/cpu/armv7/omap-common/lowlevel_init.S | 10 +++++++---
> Tom> arch/arm/include/asm/arch-am33xx/spl.h | 3 +++
> Tom> arch/arm/include/asm/arch-omap3/spl.h | 3 +++
> Tom> arch/arm/include/asm/arch-omap4/spl.h | 2 ++ Tom>
> arch/arm/include/asm/arch-omap5/spl.h | 2 ++ Tom> 5
> files changed, 17 insertions(+), 3 deletions(-)
>
> Tom> diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
> b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S Tom> index
> b933fe8..90b3c8a 100644 Tom> ---
> a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S Tom> +++
> b/arch/arm/cpu/armv7/omap-common/lowlevel_init.S Tom> @@ -60,10
> +60,14 @@ ENTRY(save_boot_params) Tom> ldr r3, =boot_params Tom>
> strb r2, [r3, #BOOT_DEVICE_OFFSET] @ spl_boot_device <- r1
>
> Tom> - /* boot mode is passed only for devices that can raw/fat
> mode */ Tom> - cmp r2, #BOOT_DEVICE_XIP Tom> + /* Tom> + * boot
> mode is only valid for device that can be raw or FAT booted. Tom> +
> * in other cases it may be fatal to look. While platforms differ
> Tom> + * in the values used for each MMC slot, they are
> contiguous. Tom> + */ Tom> + cmp r2, #MMC_BOOT_DEVICES_START Tom>
> blt 2f Tom> - cmp r2, #BOOT_DEVICE_MMC2 Tom> + cmp r2,
> #MMC_BOOT_DEVICES_END Tom> bgt 2f Tom> /* Store the boot mode
> (raw/FAT) in omap_bootmode */ Tom> ldr r2, [r0,
> #DEV_DESC_PTR_OFFSET] @ get the device descriptor ptr Tom> diff
> --git a/arch/arm/include/asm/arch-am33xx/spl.h
> b/arch/arm/include/asm/arch-am33xx/spl.h Tom> index
> f60b086..14a2c7c 100644 Tom> ---
> a/arch/arm/include/asm/arch-am33xx/spl.h Tom> +++
> b/arch/arm/include/asm/arch-am33xx/spl.h Tom> @@ -37,4 +37,7 @@
> Tom> #define BOOT_DEVICE_USBETH 68 Tom> #define
> BOOT_DEVICE_CPGMAC 70 Tom> #define BOOT_DEVICE_MMC2_2 0xFF
> Tom> + Tom> +#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1 Tom>
> +#define MMC_BOOT_DEVICES_END BOOT_DEVICE_MMC2
>
> Doesn't this break ti814x with the funky inverted mmc1/mmc2?
That's probably true, dang. I knew OMAP3 also had them swapped,
number-wise but didn't recall until you said this that it doesn't use
that code at all. I'll V2 this part. Thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRZDY4AAoJENk4IS6UOR1WUBoP/1wPoJ5C0ZCSpEDmm7YFs5b2
XaafK0dIJ/aw7K264vYY8tHBj/ku6mbgNOvfRUL9rxGAPPStESMQynkwF/H7llbd
7GkFlsWpLAgotPnCSwHGqQnApCeUeu0BGCAGvaB8NK0uFlU+D0bsWBdgRe/sML+m
LjF0/2eQmm2rTo8ifkDTvCdldaeyGqUo0amefEvfW2cLMxPlYGWcfPh/MW1X35ib
RnnBUhdVM38XPKmktjSQMQ4IBkLnd2Hu64KFkZl3ejyMPDjr/uOkm+1UawL34IPH
wgSC5Y1+w7HvnxM+D3pre4yrpRSYq+dcg3m9CLb7HcrGFCjLxtTEEcy6DOCF3RG0
aK62JQ0itrXcGCnwMYO6t/w7JlNj/flqCTQW4qU4HJ/ixaICRrg30IePqqcJ0Rj0
69EA4BjgR8JhRZOWRuCkwirz0LQpg7DY43Ioax7EmZ6qjve7/ryEnPxdfSEWTPgr
ZcqhsYCwoc0wkADW894UveUW49qXhQCBR0C1eXbynfbpdWSu0ObHX4ErAH1JP4x/
ihtuMZAoTcpYTM0b/Fg+A9t45QhIZBMRKLWar4h5zFrMGyfIODPUjXLqJRSI6Lef
kTcUZY9Fy837Vok1NlllTMFxGd8Ot5mRgDehvZiZlTjzbRUfPdC212NUQQ/px7C8
7KPGRHhQds5Fsur7bnXJ
=2NME
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-04-09 15:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 16:21 [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 1/3] OMAP3/4/5/AM33xx: Correct logic for checking FAT or RAW MMC Tom Rini
2013-04-08 10:44 ` Sricharan R
2013-04-09 14:52 ` Peter Korsgaard
2013-04-09 15:39 ` Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 2/3] omap5_evm.h: Move uEVM-specific choices to omap5_evm.h Tom Rini
2013-04-08 16:34 ` Tom Rini
2013-04-05 16:21 ` [U-Boot] [PATCH 3/3] omap5_common.h: Use fallback CONFIG_SYS_BAUDRATE_TABLE Tom Rini
2013-04-08 16:35 ` [U-Boot] [PATCH 0/3] OMAP5: Improve uEVM support Tom Rini
2013-04-08 16:55 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox