diff options
-rw-r--r-- | arch/arm/mm/proc-xsc3.S | 2 | ||||
-rw-r--r-- | arch/arm/plat-iop/time.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 2028f3702881..fab134e29826 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -396,7 +396,7 @@ __xsc3_setup: | |||
396 | orr r4, r4, #0x18 @ cache the page table in L2 | 396 | orr r4, r4, #0x18 @ cache the page table in L2 |
397 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer | 397 | mcr p15, 0, r4, c2, c0, 0 @ load page table pointer |
398 | 398 | ||
399 | mov r0, #0 @ don't allow CP access | 399 | mov r0, #1 << 6 @ cp6 access for early sched_clock |
400 | mcr p15, 0, r0, c15, c1, 0 @ write CP access register | 400 | mcr p15, 0, r0, c15, c1, 0 @ write CP access register |
401 | 401 | ||
402 | mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg | 402 | mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg |
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index aaaef3b4bc65..6c8a02ad98e3 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -66,6 +66,17 @@ static void __init iop_clocksource_set_hz(struct clocksource *cs, unsigned int h | |||
66 | } | 66 | } |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * IOP sched_clock() implementation via its clocksource. | ||
70 | */ | ||
71 | unsigned long long sched_clock(void) | ||
72 | { | ||
73 | cycle_t cyc = iop_clocksource_read(NULL); | ||
74 | struct clocksource *cs = &iop_clocksource; | ||
75 | |||
76 | return clocksource_cyc2ns(cyc, cs->mult, cs->shift); | ||
77 | } | ||
78 | |||
79 | /* | ||
69 | * IOP clockevents (interrupting timer 0). | 80 | * IOP clockevents (interrupting timer 0). |
70 | */ | 81 | */ |
71 | static int iop_set_next_event(unsigned long delta, | 82 | static int iop_set_next_event(unsigned long delta, |