1
2
3
4
5
6
7
8#include <linux/linkage.h>
9
10#include <asm/assembler.h>
11
12#include <mach/hardware.h>
13
14#include "iomap.h"
15
16 .text
17
18
19
20
21 .align 3
22ENTRY(omap1_sram_reprogram_clock)
23 stmfd sp!, {r0 - r12, lr} @ save registers on stack
24
25 mov r2,
26 orr r2, r2,
27 orr r2, r2,
28
29 mov r3,
30 orr r3, r3,
31 orr r3, r3,
32
33 tst r0,
34 beq newck @ nope
35 bic r0, r0,
36 strh r0, [r2] @ set dpll into bypass mode
37 orr r0, r0,
38
39newck:
40 strh r1, [r3] @ write new ckctl value
41 strh r0, [r2] @ write new dpll value
42
43 mov r4,
44 orr r4, r4,
45delay: sub r4, r4,
46 cmp r4,
47 bne delay
48
49lock: ldrh r4, [r2],
50 tst r0,
51 beq out @ nope
52 tst r4,
53 beq lock @ try again
54
55out:
56 ldmfd sp!, {r0 - r12, pc} @ restore regs and return
57ENTRY(omap1_sram_reprogram_clock_sz)
58 .word . - omap1_sram_reprogram_clock
59