From: Nishanth Menon <nm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 7/7] board: ti: AM57xx: Add detection logic for AM57xx-evm
Date: Mon, 9 Nov 2015 18:15:15 -0600 [thread overview]
Message-ID: <20151110001515.GA2195@kahuna> (raw)
In-Reply-To: <1446770376-8205-7-git-send-email-s-kipisz2@ti.com>
On 18:39-20151105, Steve Kipisz wrote:
[...]
> diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
> index 042f9ab1965a..15da8e66fee5 100644
> --- a/board/ti/am57xx/board.c
> +++ b/board/ti/am57xx/board.c
[...]
> +static void setup_board_eeprom_env(void)
> +{
> + char *name = "beagle_x15";
> + int rc;
> + struct ti_am_eeprom_printable p;
> +
> + rc = ti_i2c_eeprom_am_get_print(CONFIG_EEPROM_BUS_ADDRESS,
> + CONFIG_EEPROM_CHIP_ADDRESS, &p);
> + if (rc) {
> + printf("Invalid EEPROM data(@0x%p). Default to X15\n",
> + TI_AM_EEPROM_DATA);
> + goto invalid_eeprom;
> + }
> +
> + if (board_is_am572x_evm())
> + name = "am57xx_evm";
I suggest adding:
else if (board_is_x15())
name = "beagle_x15";
If we dont do that, we end up with the "Unidentified board claim"
print even if we have a valid eeprom.
Also, at this point, we can reasonably detect and update our prints (to
prevent folks from being confused :))
How about squashing the following to this patch?
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 4ae484140608..30d358885fe0 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define GPIO_DDR_VTT_EN 203
const struct omap_sysinfo sysinfo = {
- "Board: BeagleBoard x15\n"
+ "Board: UNKNOWN(BeagleBoard X15?)\n"
};
static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
@@ -262,6 +262,27 @@ void do_board_detect(void)
#else /* CONFIG_SPL_BUILD */
+void do_board_detect(void)
+{
+ struct ti_am_eeprom *ep;
+ char *bname = NULL;
+ int rc;
+
+ rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
+ CONFIG_EEPROM_CHIP_ADDRESS, &ep);
+ if (rc)
+ printf("ti_i2c_eeprom_init failed %d\n", rc);
+
+ if (board_is_x15())
+ bname = "BeagleBoard X15";
+ else if (board_is_am572x_evm())
+ bname = "AM572x EVM";
+
+ if (bname)
+ snprintf(sysinfo.board_string, sizeof(sysinfo.board_string),
+ "Board: %s\n", bname);
+}
+
static void setup_board_eeprom_env(void)
{
char *name = "beagle_x15";
--
Regards,
Nishanth Menon
prev parent reply other threads:[~2015-11-10 0:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 0:39 [U-Boot] [PATCH v4 1/7] ARM: OMAP4/5: Centralize early clock initialization Steve Kipisz
2015-11-06 0:39 ` [U-Boot] [PATCH v4 2/7] ARM: OMAP4/5: Centralize gpi2c_init Steve Kipisz
2015-11-06 0:39 ` [U-Boot] [PATCH v4 3/7] ARM: omap-common: Add standard access for board description EEPROM Steve Kipisz
2015-11-06 9:29 ` Igor Grinberg
2015-11-08 13:34 ` Tom Rini
2015-11-09 22:19 ` Nishanth Menon
2015-11-09 23:47 ` Nishanth Menon
2015-11-06 0:39 ` [U-Boot] [PATCH v4 4/7] ti: am335x: Use generic EEPROM detection logic Steve Kipisz
2015-11-06 3:48 ` Lokesh Vutla
2015-11-08 13:35 ` Tom Rini
2015-11-06 0:39 ` [U-Boot] [PATCH v4 5/7] ti: AM437x: " Steve Kipisz
2015-11-06 3:49 ` Lokesh Vutla
2015-11-08 13:36 ` Tom Rini
2015-11-06 0:39 ` [U-Boot] [PATCH v4 6/7] ARM: OMAP4/5: Add generic board detection hook Steve Kipisz
2015-11-06 3:49 ` Lokesh Vutla
2015-11-06 0:39 ` [U-Boot] [PATCH v4 7/7] board: ti: AM57xx: Add detection logic for AM57xx-evm Steve Kipisz
2015-11-06 9:35 ` Igor Grinberg
2015-11-08 13:36 ` Tom Rini
2015-11-10 0:15 ` Nishanth Menon [this message]
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=20151110001515.GA2195@kahuna \
--to=nm@ti.com \
--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