timer.c (261410) | timer.c (262534) |
---|---|
1/*- 2 * Copyright (c) 2006 Benno Rice. 3 * Copyright (C) 2007-2008 MARVELL INTERNATIONAL LTD. 4 * All rights reserved. 5 * 6 * Adapted to Marvell SoC by Semihalf. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * from: FreeBSD: //depot/projects/arm/src/sys/arm/xscale/pxa2x0/pxa2x0_timer.c, rev 1 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 Benno Rice. 3 * Copyright (C) 2007-2008 MARVELL INTERNATIONAL LTD. 4 * All rights reserved. 5 * 6 * Adapted to Marvell SoC by Semihalf. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * from: FreeBSD: //depot/projects/arm/src/sys/arm/xscale/pxa2x0/pxa2x0_timer.c, rev 1 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/arm/mv/timer.c 261410 2014-02-02 19:17:28Z ian $"); | 32__FBSDID("$FreeBSD: head/sys/arm/mv/timer.c 262534 2014-02-26 22:06:10Z ian $"); |
33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/module.h> 39#include <sys/malloc.h> 40#include <sys/rman.h> --- 178 unchanged lines hidden (view full) --- 219static unsigned 220mv_timer_get_timecount(struct timecounter *tc) 221{ 222 223 return (INITIAL_TIMECOUNTER - mv_get_timer(1)); 224} 225 226void | 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/module.h> 39#include <sys/malloc.h> 40#include <sys/rman.h> --- 178 unchanged lines hidden (view full) --- 219static unsigned 220mv_timer_get_timecount(struct timecounter *tc) 221{ 222 223 return (INITIAL_TIMECOUNTER - mv_get_timer(1)); 224} 225 226void |
227cpu_initclocks(void) 228{ 229 230 cpu_initclocks_bsp(); 231} 232 233void | |
234DELAY(int usec) 235{ 236 uint32_t val, val_temp; 237 int32_t nticks; 238 239 if (!timers_initialized) { 240 for (; usec > 0; usec--) 241 for (val = 100; val > 0; val--) --- 213 unchanged lines hidden --- | 227DELAY(int usec) 228{ 229 uint32_t val, val_temp; 230 int32_t nticks; 231 232 if (!timers_initialized) { 233 for (; usec > 0; usec--) 234 for (val = 100; val > 0; val--) --- 213 unchanged lines hidden --- |