Deleted Added
full compact
lpc_timer.c (261410) lpc_timer.c (262534)
1/*-
2 * Copyright (c) 2011 Jakub Wojciech Klama <jceel@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2011 Jakub Wojciech Klama <jceel@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/arm/lpc/lpc_timer.c 261410 2014-02-02 19:17:28Z ian $");
28__FBSDID("$FreeBSD: head/sys/arm/lpc/lpc_timer.c 262534 2014-02-26 22:06:10Z ian $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>
36#include <sys/rman.h>

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

275
276static unsigned
277lpc_get_timecount(struct timecounter *tc)
278{
279 return timer1_read_4(timer_softc, LPC_TIMER_TC);
280}
281
282void
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/bus.h>
33#include <sys/kernel.h>
34#include <sys/module.h>
35#include <sys/malloc.h>
36#include <sys/rman.h>

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

275
276static unsigned
277lpc_get_timecount(struct timecounter *tc)
278{
279 return timer1_read_4(timer_softc, LPC_TIMER_TC);
280}
281
282void
283cpu_initclocks(void)
284{
285 cpu_initclocks_bsp();
286}
287
288void
289DELAY(int usec)
290{
291 uint32_t counter;
292 uint32_t first, last;
293 int val = (lpc_timecounter.tc_frequency / 1000000 + 1) * usec;
294
295 /* Timer is not initialized yet */
296 if (!lpc_timer_initialized) {

--- 18 unchanged lines hidden ---
283DELAY(int usec)
284{
285 uint32_t counter;
286 uint32_t first, last;
287 int val = (lpc_timecounter.tc_frequency / 1000000 + 1) * usec;
288
289 /* Timer is not initialized yet */
290 if (!lpc_timer_initialized) {

--- 18 unchanged lines hidden ---