OMAP4 U-Boot Notes

From Crashcourse Wiki

Jump to: navigation, search

Contents

[edit] Overview

This page is a grab-bag of observations about the OMAP4-related parts of the U-Boot source tree that could be explained more clearly, or that look weird or confusing. For this page, I'll work off of mainline U-Boot, even though the Linaro tree is more up-to-date with respect to OMAP content.

[edit] Speaking of the Linaro tree ...

The Linaro U-Boot tree has a number of new features that should be pushed upstream, such as support for uEnv.txt. It would be nice to see this done fairly soon.

Also, the Linaro tree deals with an alleged cache issue by defining:

#define CONFIG_SYS_DCACHE_OFF

[edit] Where is doc/README.omap4?

Since there's a doc/README.omap3 doc file, there should be one for OMAP4 as well, just for consistency.

[edit] What is CONFIG_PANDA used for?

The header file omap4_panda.h defines:

#define CONFIG_PANDA            1       /* working with Panda */

but nothing in the entire U-Boot tree appears to test that macro, so what's it for?

[edit] Distinguish between 4430 and 4460?

The header file omap4_common.h contains the following defines:

#define CONFIG_ARMV7            1       /* This is an ARM V7 CPU core */
#define CONFIG_OMAP             1       /* in a TI OMAP core */
#define CONFIG_OMAP44XX         1       /* which is a 44XX */
#define CONFIG_OMAP4430         1       /* which is in a 4430 */

However, the regular PandaBoard has a 4430, while the PandaBoard ES uses a 4460. I realize the two are virtually identical, but is there any value in distinguishing between the two? Will there be any situation in which the two types of PandaBoard will need to be configured differently?

In any case, at the very least, it might be worth adding some extra commentary stating that the 4430 case includes the 4460 as well, just so that's clear for someone reading that header file.

[edit] drivers/usb/musb/omap3.c has OMAP4 code

It's just a bit confusing that a source file named omap3.c has OMAP4-related content:

/* OMAP4430 has an internal PHY, use it */
#ifdef CONFIG_OMAP4430
#define OMAP3_OTG_INTERFSEL_OMAP                        0x0000
#else
#define OMAP3_OTG_INTERFSEL_OMAP                        0x0001
#endif

In fact, this appears to be the only place that the macro CONFIG_OMAP4430 is tested.

[edit] Lot of apparent redundancy related to OMAP4460 checking

Notice:

$ grep -r OMAP4460_ES1_0 *
arch/arm/cpu/armv7/omap4/clocks.c:	else if (omap_rev < OMAP4460_ES1_0)
arch/arm/cpu/armv7/omap4/clocks.c:	if (omap_rev >= OMAP4460_ES1_0) {
arch/arm/cpu/armv7/omap4/clocks.c:	if (omap_rev < OMAP4460_ES1_0) {
arch/arm/cpu/armv7/omap4/clocks.c:	if (omap_rev < OMAP4460_ES1_0) {
arch/arm/cpu/armv7/omap4/hwinit.c:	if ((omap4_rev < OMAP4460_ES1_0) || !readl(&ctrl->control_efuse_2))
arch/arm/cpu/armv7/omap4/hwinit.c:			*omap4_revision = OMAP4460_ES1_0;
arch/arm/cpu/armv7/omap-common/emif-common.c:	} else if (omap_revision() >= OMAP4460_ES1_0) {
arch/arm/cpu/armv7/omap-common/emif-common.c:	if (omap_revision() >= OMAP4460_ES1_0) {
arch/arm/cpu/armv7/omap-common/clocks-common.c:	if ((omap_rev >= OMAP4460_ES1_0) && (omap_rev < OMAP5430_ES1_0)) {
arch/arm/include/asm/arch-omap5/omap.h:#define OMAP4460_ES1_0	0x44600100
arch/arm/include/asm/omap_common.h:#define OMAP4460_ES1_0	0x44600100
board/ti/panda/panda.c:	if (omap_revision() >= OMAP4460_ES1_0)
board/ti/panda/panda.c:	if (omap_revision() < OMAP4460_ES1_0)
board/ti/panda/panda.c:	if (omap_revision() < OMAP4460_ES1_0)
board/ti/sdp4430/sdp.c:	if (omap_revision() >= OMAP4460_ES1_0)
board/ti/sdp4430/sdp.c:	if (omap_revision() < OMAP4460_ES1_0) {
$

A number of things to be said about the above:

  • Why are revision identifiers being defined in two different places (the two different header files)?
  • How many different checks are there for checking OMAP revision? omap_rev, omap4_rev, omap_revision().
  • Perhaps there could be a more concise test for checking if something is a 4460 than some of the above, rather than if (omap_revision() >= OMAP4460_ES1_0).
Personal tools