Revert "exynos5250/snow: deprecate time.h"
This reverts commit 2fde9668b4
Somehow this got merged before its dependencies. 3190 must be merged first, followed by 3176. However 3190 will fail while this patch is in. So the situation can't correct itself.
Reverting this until the other two go in.
Change-Id: I176f37c12711849c96f1889eacad38c00a8142c4
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/3195
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
cc76d7e011
commit
ab98cfe110
|
@ -585,7 +585,6 @@ int clock_get_mem_selection(enum ddr_mode *mem_type,
|
|||
unsigned *frequency_mhz, unsigned *arm_freq,
|
||||
enum mem_manuf *mem_manuf);
|
||||
|
||||
void mct_start(void);
|
||||
uint64_t mct_raw_value(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <arch/io.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <time.h>
|
||||
#include "clk.h"
|
||||
|
||||
struct __attribute__((packed)) mct_regs
|
||||
|
@ -101,8 +101,16 @@ uint64_t mct_raw_value(void)
|
|||
return (upper << 32) | lower;
|
||||
}
|
||||
|
||||
void mct_start(void)
|
||||
void timer_start(void)
|
||||
{
|
||||
writel(readl(&mct->g_tcon) | (0x1 << 8), &mct->g_tcon);
|
||||
enabled = 1;
|
||||
}
|
||||
|
||||
u32 timer_us(void)
|
||||
{
|
||||
uint64_t raw = mct_raw_value();
|
||||
static uint32_t ticks_per_microsecond = MCT_HZ/1000000;
|
||||
uint32_t usec = raw / ticks_per_microsecond;
|
||||
return usec;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <stdint.h>
|
||||
#include <delay.h>
|
||||
#include <timer.h>
|
||||
#include <time.h> /* TODO: deprecate in favor of monotonic timer stuff */
|
||||
|
||||
#include "clk.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2013 Google, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef TIME_H
|
||||
#define TIME_H
|
||||
|
||||
void timer_start(void);
|
||||
u32 timer_us(void);
|
||||
|
||||
#endif /* TIME_H */
|
|
@ -21,8 +21,8 @@
|
|||
#include <arch/io.h>
|
||||
#include <cbfs.h>
|
||||
#include <uart.h>
|
||||
#include <time.h>
|
||||
#include <console/console.h>
|
||||
#include <cpu/samsung/exynos5250/clk.h>
|
||||
#include <cpu/samsung/exynos5250/periph.h>
|
||||
#include <cpu/samsung/exynos5250/pinmux.h>
|
||||
#include "mainboard.h"
|
||||
|
@ -30,10 +30,10 @@
|
|||
void bootblock_mainboard_init(void);
|
||||
void bootblock_mainboard_init(void)
|
||||
{
|
||||
/* kick off the multi-core timer.
|
||||
/* kick off the microsecond timer.
|
||||
* We want to do this as early as we can.
|
||||
*/
|
||||
mct_start();
|
||||
timer_start();
|
||||
|
||||
if (snow_get_wakeup_state() == SNOW_WAKEUP_DIRECT) {
|
||||
snow_wakeup();
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <cpu/samsung/exynos5250/clock_init.h>
|
||||
#include <console/console.h>
|
||||
#include <arch/stages.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <drivers/maxim/max77686/max77686.h>
|
||||
#include <device/i2c.h>
|
||||
|
|
Loading…
Reference in New Issue