1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2011 The Chromium OS Authors.
12 #include <asm/u-boot-sandbox.h>
15 * Pointer to initial global data area
17 * Here we initialize it.
21 /* Add a simple GPIO device */
22 U_BOOT_DEVICE(gpio_sandbox) = {
23 .name = "gpio_sandbox",
26 void flush_cache(unsigned long start, unsigned long size)
31 /* system timer offset in ms */
32 static unsigned long sandbox_timer_offset;
34 void sandbox_timer_add_offset(unsigned long offset)
36 sandbox_timer_offset += offset;
39 unsigned long timer_read_counter(void)
41 return os_get_nsec() / 1000 + sandbox_timer_offset * 1000;
47 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
53 if (IS_ENABLED(CONFIG_LED))
59 #ifdef CONFIG_BOARD_LATE_INIT
60 int board_late_init(void)
62 if (cros_ec_get_error()) {
63 /* Force console on */
64 gd->flags &= ~GD_FLG_SILENT;
66 printf("cros-ec communications failure %d\n",
68 puts("\nPlease reset with Power+Refresh\n\n");
69 panic("Cannot init cros-ec device");