1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2011 The Chromium OS Authors.
14 #include <asm/u-boot-sandbox.h>
17 * Pointer to initial global data area
19 * Here we initialize it.
23 /* Add a simple GPIO device */
24 U_BOOT_DEVICE(gpio_sandbox) = {
25 .name = "gpio_sandbox",
28 void flush_cache(unsigned long start, unsigned long size)
33 /* system timer offset in ms */
34 static unsigned long sandbox_timer_offset;
36 void timer_test_add_offset(unsigned long offset)
38 sandbox_timer_offset += offset;
41 unsigned long timer_read_counter(void)
43 return os_get_nsec() / 1000 + sandbox_timer_offset * 1000;
49 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
55 if (IS_ENABLED(CONFIG_LED))
61 #ifdef CONFIG_BOARD_LATE_INIT
62 int board_late_init(void)
67 ret = uclass_first_device_err(UCLASS_CROS_EC, &dev);
68 if (ret && ret != -ENODEV) {
69 /* Force console on */
70 gd->flags &= ~GD_FLG_SILENT;
72 printf("cros-ec communications failure %d\n", ret);
73 puts("\nPlease reset with Power+Refresh\n\n");
74 panic("Cannot init cros-ec device");