]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/sandbox/sandbox/sandbox.c
sandbox: Convert GPIOs to use driver model
[karo-tx-uboot.git] / board / sandbox / sandbox / sandbox.c
1 /*
2  * Copyright (c) 2011 The Chromium OS Authors.
3  * SPDX-License-Identifier:     GPL-2.0+
4  */
5
6 #include <common.h>
7 #include <dm.h>
8 #include <os.h>
9
10 /*
11  * Pointer to initial global data area
12  *
13  * Here we initialize it.
14  */
15 gd_t *gd;
16
17 /* Add a simple GPIO device */
18 U_BOOT_DEVICE(gpio_sandbox) = {
19         .name = "gpio_sandbox",
20 };
21
22 void flush_cache(unsigned long start, unsigned long size)
23 {
24 }
25
26 unsigned long timer_read_counter(void)
27 {
28         return os_get_nsec() / 1000;
29 }
30
31 int dram_init(void)
32 {
33         gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
34         return 0;
35 }