This commit replaces legacy timer code with usage of arc timer driver. It removes arch/arc/lib/time.c file and selects CONFIG_CLK, CONFIG_TIMER and CONFIG_ARC_TIMER options for all ARC boards by default. Therefore we remove CONFIG_CLK option from less common axs101 and axs103 defconfigs. Also it removes legacy CONFIG_SYS_TIMER_RATE config symbol from axs10x.h, tb100.h and nsim.h configs files as it is no longer required. Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org>master
parent
0c77092e81
commit
3daa7c7b83
@ -1,24 +0,0 @@ |
||||
/*
|
||||
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <asm/arcregs.h> |
||||
|
||||
#define NH_MODE (1 << 1) /* Disable timer if CPU is halted */ |
||||
|
||||
int timer_init(void) |
||||
{ |
||||
write_aux_reg(ARC_AUX_TIMER0_CTRL, NH_MODE); |
||||
/* Set max value for counter/timer */ |
||||
write_aux_reg(ARC_AUX_TIMER0_LIMIT, 0xffffffff); |
||||
/* Set initial count value and restart counter/timer */ |
||||
write_aux_reg(ARC_AUX_TIMER0_CNT, 0); |
||||
return 0; |
||||
} |
||||
|
||||
unsigned long timer_read_counter(void) |
||||
{ |
||||
return read_aux_reg(ARC_AUX_TIMER0_CNT); |
||||
} |
Loading…
Reference in new issue