blob: f471cb72125648d341d8003c8c1ca4a0cf78c53a [file] [log] [blame]
Simon Glass43bd1942011-10-07 13:53:38 +00001/*
2 * Copyright (c) 2011 The Chromium OS Authors.
Wolfgang Denk1a459662013-07-08 09:37:19 +02003 * SPDX-License-Identifier: GPL-2.0+
Simon Glass43bd1942011-10-07 13:53:38 +00004 */
5
6#include <common.h>
7
Matthias Weisserd99a6872011-11-29 12:16:40 +01008#include <os.h>
9
Simon Glass43bd1942011-10-07 13:53:38 +000010/*
11 * Pointer to initial global data area
12 *
13 * Here we initialize it.
14 */
15gd_t *gd;
16
17void flush_cache(unsigned long start, unsigned long size)
18{
19}
20
Mike Frysinger6994ccf2012-02-21 00:21:17 -050021ulong get_tbclk(void)
22{
23 return CONFIG_SYS_HZ;
24}
25
26unsigned long long get_ticks(void)
27{
28 return get_timer(0);
29}
30
Simon Glass43bd1942011-10-07 13:53:38 +000031ulong get_timer(ulong base)
32{
Matthias Weisserd99a6872011-11-29 12:16:40 +010033 return (os_get_nsec() / 1000000) - base;
Simon Glass43bd1942011-10-07 13:53:38 +000034}
35
36int timer_init(void)
37{
38 return 0;
39}
40
41int dram_init(void)
42{
Simon Glassa733b062013-04-26 02:53:43 +000043 gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
Simon Glass43bd1942011-10-07 13:53:38 +000044 return 0;
45}