summaryrefslogtreecommitdiff
path: root/board/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'board/sandbox')
-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 0e87674826a..397e7561d4d 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;