Deleted Added
sdiff udiff text old ( 215317 ) new ( 215701 )
full compact
1/*-
2 * Copyright (c) 2006-2007 Bruce M. Simpson.
3 * Copyright (c) 2003-2004 Juli Mallett.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 17 unchanged lines hidden (view full) ---

26 */
27
28/*
29 * Simple driver for the 32-bit interval counter built in to all
30 * MIPS32 CPUs.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/mips/rmi/tick.c 215701 2010-11-22 19:32:54Z dim $");
35
36#include "opt_cputype.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/sysctl.h>
41#include <sys/bus.h>
42#include <sys/kernel.h>

--- 11 unchanged lines hidden (view full) ---

54#include <machine/md_var.h>
55#include <machine/intr_machdep.h>
56#include <mips/rmi/interrupt.h>
57
58uint64_t counter_freq;
59
60struct timecounter *platform_timecounter;
61
62static DPCPU_DEFINE(uint32_t, cycles_per_tick);
63static uint32_t cycles_per_usec;
64
65static DPCPU_DEFINE(volatile uint32_t, counter_upper);
66static DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
67static DPCPU_DEFINE(uint32_t, compare_ticks);
68static DPCPU_DEFINE(uint32_t, lost_ticks);
69
70struct clock_softc {
71 int intr_rid;
72 struct resource *intr_res;
73 void *intr_handler;
74 struct timecounter tc;
75 struct eventtimer et;
76};

--- 311 unchanged lines hidden ---