summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/ide/pdc202xx_new.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/ide/pdc202xx_new.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/ide/pdc202xx_new.c')
-rw-r--r--kernel/drivers/ide/pdc202xx_new.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/drivers/ide/pdc202xx_new.c b/kernel/drivers/ide/pdc202xx_new.c
index df73cbd93..9ad014a7a 100644
--- a/kernel/drivers/ide/pdc202xx_new.c
+++ b/kernel/drivers/ide/pdc202xx_new.c
@@ -22,6 +22,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/ide.h>
+#include <linux/ktime.h>
#include <asm/io.h>
@@ -243,13 +244,13 @@ static long read_counter(u32 dma_base)
*/
static long detect_pll_input_clock(unsigned long dma_base)
{
- struct timeval start_time, end_time;
+ ktime_t start_time, end_time;
long start_count, end_count;
long pll_input, usec_elapsed;
u8 scr1;
start_count = read_counter(dma_base);
- do_gettimeofday(&start_time);
+ start_time = ktime_get();
/* Start the test mode */
outb(0x01, dma_base + 0x01);
@@ -261,7 +262,7 @@ static long detect_pll_input_clock(unsigned long dma_base)
mdelay(10);
end_count = read_counter(dma_base);
- do_gettimeofday(&end_time);
+ end_time = ktime_get();
/* Stop the test mode */
outb(0x01, dma_base + 0x01);
@@ -273,8 +274,7 @@ static long detect_pll_input_clock(unsigned long dma_base)
* Calculate the input clock in Hz
* (the clock counter is 30 bit wide and counts down)
*/
- usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
- (end_time.tv_usec - start_time.tv_usec);
+ usec_elapsed = ktime_us_delta(end_time, start_time);
pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
(10000000 / usec_elapsed);