summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/dummy.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-09 17:38:26 +0100
commitff6383c8e4bde31036fbd31f7961539be288d6af (patch)
tree26f187f697be5f434f533d6b304bddd311cc81fd /drivers/clocksource/dummy.c
parent2af31fbc239ae40a59f926bc5e505956a1bf27ef (diff)
parent11f588be314af70e1b058aac06663f29606846cd (diff)
downloadbarebox-ff6383c8e4bde31036fbd31f7961539be288d6af.tar.gz
barebox-ff6383c8e4bde31036fbd31f7961539be288d6af.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/clocksource/dummy.c')
-rw-r--r--drivers/clocksource/dummy.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/clocksource/dummy.c b/drivers/clocksource/dummy.c
deleted file mode 100644
index 96f9b6efca..0000000000
--- a/drivers/clocksource/dummy.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2013 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * 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.
- *
- */
-
-#include <common.h>
-#include <init.h>
-#include <clock.h>
-
-static uint64_t dummy_counter;
-
-static uint64_t dummy_cs_read(void)
-{
- static int first;
-
- if (!first) {
- pr_warn("Warning: Using dummy clocksource\n");
- first = 1;
- }
-
- dummy_counter += CONFIG_CLOCKSOURCE_DUMMY_RATE;
-
- return dummy_counter;
-}
-
-static struct clocksource dummy_cs = {
- .read = dummy_cs_read,
- .mask = CLOCKSOURCE_MASK(32),
-};
-
-static int clocksource_init(void)
-{
- dummy_counter = 0;
-
- clocks_calc_mult_shift(&dummy_cs.mult, &dummy_cs.shift,
- 100000000, NSEC_PER_SEC, 10);
-
- pr_debug("clocksource_init: mult=%08x, shift=%08x\n",
- dummy_cs.mult, dummy_cs.shift);
-
- return init_clock(&dummy_cs);
-}
-pure_initcall(clocksource_init);