From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v3] omap3: overo: Select fdtfile for expansion board
Date: Tue, 10 Jun 2014 21:29:00 +0200 [thread overview]
Message-ID: <53975C7C.1050202@herbrechtsmeier.net> (raw)
In-Reply-To: <1402426956-21108-1-git-send-email-ashcharles@gmail.com>
Am 10.06.2014 21:02, schrieb Ash Charles:
> 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 | 14 ++++++++++++++
> include/configs/omap3_overo.h | 10 +++++-----
> 2 files changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index 62b50a8..13220c5 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -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");
You should add an additional case (0x0) above GUMSTIX_NO_EEPROM but an
un-programmed eeprom returns GUMSTIX_NO_EEPROM (0xffffffff).
> 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;
> }
>
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 1a13633..f7483a0 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -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" \
> @@ -152,10 +151,11 @@
> "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;" \
next prev parent reply other threads:[~2014-06-10 19:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 18:37 [U-Boot] [PATCH] omap3: overo: Select fdtfile for expansion board Ash Charles
2014-06-07 14:29 ` Stefan Herbrechtsmeier
2014-06-07 17:48 ` Tom Rini
2014-06-07 20:11 ` Ash Charles
2014-06-08 7:57 ` Stefan Herbrechtsmeier
2014-06-09 20:47 ` Ash Charles
2014-06-09 20:47 ` [U-Boot] [Patch v2] " Ash Charles
2014-06-10 7:30 ` Stefan Herbrechtsmeier
2014-06-10 17:17 ` Ash Charles
2014-06-10 18:06 ` Stefan Herbrechtsmeier
2014-06-10 19:00 ` Ash Charles
2014-06-10 19:02 ` [U-Boot] [Patch v3] " Ash Charles
2014-06-10 19:29 ` Stefan Herbrechtsmeier [this message]
2014-06-10 20:28 ` Ash Charles
2014-06-19 22:02 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53975C7C.1050202@herbrechtsmeier.net \
--to=stefan@herbrechtsmeier.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox