aboutsummaryrefslogtreecommitdiff
path: root/board/sandbox/sandbox.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-11-23 17:25:27 -0500
committerTom Rini <trini@konsulko.com>2018-11-23 17:25:27 -0500
commit5830791d91d1200854ef78fcb32f808c8080f0f0 (patch)
treec9ec3c59244371d8ad9992a2ba332a7b50d33950 /board/sandbox/sandbox.c
parenta3e1653ddeb02f39481eba572275016171e9670c (diff)
parenta58986ca8b53d8c7a441397082f84edc7f47d19f (diff)
Merge tag 'pull-tg18' of git://git.denx.de/u-boot-dm
Various minor sandbox improvements Better buildman warning handling Misc other things
Diffstat (limited to 'board/sandbox/sandbox.c')
-rw-r--r--board/sandbox/sandbox.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 0e87674826..397e7561d4 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -59,12 +59,15 @@ int board_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
- if (cros_ec_get_error()) {
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
+ if (ret && ret != -ENODEV) {
/* Force console on */
gd->flags &= ~GD_FLG_SILENT;
- printf("cros-ec communications failure %d\n",
- cros_ec_get_error());
+ printf("cros-ec communications failure %d\n", ret);
puts("\nPlease reset with Power+Refresh\n\n");
panic("Cannot init cros-ec device");
return -1;