]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
omap3: overo: Select fdtfile for expansion board
authorAsh Charles <ashcharles@gmail.com>
Tue, 10 Jun 2014 19:02:36 +0000 (12:02 -0700)
committerTom Rini <trini@ti.com>
Thu, 19 Jun 2014 21:53:59 +0000 (17:53 -0400)
The u-boot Overo board actually supports both Overo (OMAP35xx)
and Overo Storm (AM/DM37xx) COMs with a range of different expansion
boards.  This provides a mechanism to select the an appropriate device
tree file based on the processor version and, if available, the
expansion board ID written on the expansion board EEPROM. To match the
3.15+ kernels, fdtfile names have this format:
 "omap3-overo[-storm]-<expansion board name>.dtb"

By default, we use "omap3-overo-storm-tobi.dtb".

Signed-off-by: Ash Charles <ashcharles@gmail.com>
Conflicts:
include/configs/omap3_overo.h

board/overo/overo.c
include/configs/omap3_overo.h

index 62b50a8a0bb62a651ab9b61baab00888c263c413..13220c56dd0634dc8a1cee9538fda0dafae2302c 100644 (file)
@@ -267,12 +267,14 @@ int misc_init_r(void)
                        expansion_config.revision,
                        expansion_config.fab_revision);
                setenv("defaultdisplay", "dvi");
+               setenv("expansionname", "summit");
                break;
        case GUMSTIX_TOBI:
                printf("Recognized Tobi expansion board (rev %d %s)\n",
                        expansion_config.revision,
                        expansion_config.fab_revision);
                setenv("defaultdisplay", "dvi");
+               setenv("expansionname", "tobi");
                break;
        case GUMSTIX_TOBI_DUO:
                printf("Recognized Tobi Duo expansion board (rev %d %s)\n",
@@ -293,12 +295,14 @@ int misc_init_r(void)
                        expansion_config.revision,
                        expansion_config.fab_revision);
                setenv("defaultdisplay", "lcd43");
+               setenv("expansionname", "palo43");
                break;
        case GUMSTIX_CHESTNUT43:
                printf("Recognized Chestnut43 expansion board (rev %d %s)\n",
                        expansion_config.revision,
                        expansion_config.fab_revision);
                setenv("defaultdisplay", "lcd43");
+               setenv("expansionname", "chestnut43");
                break;
        case GUMSTIX_PINTO:
                printf("Recognized Pinto expansion board (rev %d %s)\n",
@@ -310,6 +314,7 @@ int misc_init_r(void)
                        expansion_config.revision,
                        expansion_config.fab_revision);
                setenv("defaultdisplay", "lcd43");
+               setenv("expansionname", "gallop43");
                break;
        case GUMSTIX_ALTO35:
                printf("Recognized Alto35 expansion board (rev %d %s)\n",
@@ -317,6 +322,7 @@ int misc_init_r(void)
                        expansion_config.fab_revision);
                MUX_ALTO35();
                setenv("defaultdisplay", "lcd35");
+               setenv("expansionname", "alto35");
                break;
        case GUMSTIX_STAGECOACH:
                printf("Recognized Stagecoach expansion board (rev %d %s)\n",
@@ -349,8 +355,11 @@ int misc_init_r(void)
                break;
        case GUMSTIX_NO_EEPROM:
                puts("No EEPROM on expansion board\n");
+               setenv("expansionname", "tobi");
                break;
        default:
+               if (expansion_id == 0x0)
+                       setenv("expansionname", "tobi");
                printf("Unrecognized expansion board 0x%08x\n", expansion_id);
                break;
        }
@@ -360,6 +369,11 @@ int misc_init_r(void)
 
        dieid_num_r();
 
+       if (get_cpu_family() == CPU_OMAP34XX)
+               setenv("boardname", "overo");
+       else
+               setenv("boardname", "overo-storm");
+
        return 0;
 }
 
index 1a136339493e28556b101249e3b2d93ff8d31cee..f7483a082784b90b8d93320ed3a9df6672e5b553 100644 (file)
@@ -83,7 +83,6 @@
 /* Environment information */
 #define CONFIG_EXTRA_ENV_SETTINGS \
        DEFAULT_LINUX_BOOT_ENV \
-       "fdtfile=overo.dtb\0" \
        "bootdir=/boot\0" \
        "bootfile=zImage\0" \
        "usbtty=cdc_acm\0" \
                        "run mmcboot;" \
                "fi;" \
                "if run loadzimage; then " \
-                       "if test -n $fdtfile; then " \
-                               "if run loadfdt; then " \
-                                       "run mmcbootfdt;" \
-                               "fi;" \
+                       "if test $fdtfile; then " \
+                               "setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \
+                       "fi;" \
+                       "if run loadfdt; then " \
+                               "run mmcbootfdt;" \
                        "fi;" \
                "fi;" \
        "fi;" \