]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/sandbox/sandbox.c
2 * Copyright (c) 2011 The Chromium OS Authors.
3 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/u-boot-sandbox.h>
14 * Pointer to initial global data area
16 * Here we initialize it.
20 /* Add a simple GPIO device */
21 U_BOOT_DEVICE(gpio_sandbox
) = {
22 .name
= "gpio_sandbox",
25 void flush_cache(unsigned long start
, unsigned long size
)
30 /* system timer offset in ms */
31 static unsigned long sandbox_timer_offset
;
33 void sandbox_timer_add_offset(unsigned long offset
)
35 sandbox_timer_offset
+= offset
;
38 unsigned long timer_read_counter(void)
40 return os_get_nsec() / 1000 + sandbox_timer_offset
* 1000;
46 gd
->ram_size
= CONFIG_SYS_SDRAM_SIZE
;
50 #ifdef CONFIG_BOARD_LATE_INIT
51 int board_late_init(void)
53 if (cros_ec_get_error()) {
54 /* Force console on */
55 gd
->flags
&= ~GD_FLG_SILENT
;
57 printf("cros-ec communications failure %d\n",
59 puts("\nPlease reset with Power+Refresh\n\n");
60 panic("Cannot init cros-ec device");