diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-14 20:31:54 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-10-14 20:31:54 -0400 |
commit | 6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch) | |
tree | 06a5a9a08519950575505273eabced331ed51405 /drivers/media/video/cx18/cx18-scb.c | |
parent | ee673eaa72d8d185012b1027a05e25aba18c267f (diff) | |
parent | 8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff) |
Merge commit 'origin'
Manual fixup of conflicts on:
arch/powerpc/include/asm/dcr-regs.h
drivers/net/ibm_newemac/core.h
Diffstat (limited to 'drivers/media/video/cx18/cx18-scb.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-scb.c | 131 |
1 files changed, 66 insertions, 65 deletions
diff --git a/drivers/media/video/cx18/cx18-scb.c b/drivers/media/video/cx18/cx18-scb.c index 30bc803e30da..f56d3772aa67 100644 --- a/drivers/media/video/cx18/cx18-scb.c +++ b/drivers/media/video/cx18/cx18-scb.c | |||
@@ -20,102 +20,103 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include "cx18-driver.h" | 22 | #include "cx18-driver.h" |
23 | #include "cx18-io.h" | ||
23 | #include "cx18-scb.h" | 24 | #include "cx18-scb.h" |
24 | 25 | ||
25 | void cx18_init_scb(struct cx18 *cx) | 26 | void cx18_init_scb(struct cx18 *cx) |
26 | { | 27 | { |
27 | setup_page(SCB_OFFSET); | 28 | cx18_setup_page(cx, SCB_OFFSET); |
28 | memset_io(cx->scb, 0, 0x10000); | 29 | cx18_memset_io(cx, cx->scb, 0, 0x10000); |
29 | 30 | ||
30 | writel(IRQ_APU_TO_CPU, &cx->scb->apu2cpu_irq); | 31 | cx18_writel(cx, IRQ_APU_TO_CPU, &cx->scb->apu2cpu_irq); |
31 | writel(IRQ_CPU_TO_APU_ACK, &cx->scb->cpu2apu_irq_ack); | 32 | cx18_writel(cx, IRQ_CPU_TO_APU_ACK, &cx->scb->cpu2apu_irq_ack); |
32 | writel(IRQ_HPU_TO_CPU, &cx->scb->hpu2cpu_irq); | 33 | cx18_writel(cx, IRQ_HPU_TO_CPU, &cx->scb->hpu2cpu_irq); |
33 | writel(IRQ_CPU_TO_HPU_ACK, &cx->scb->cpu2hpu_irq_ack); | 34 | cx18_writel(cx, IRQ_CPU_TO_HPU_ACK, &cx->scb->cpu2hpu_irq_ack); |
34 | writel(IRQ_PPU_TO_CPU, &cx->scb->ppu2cpu_irq); | 35 | cx18_writel(cx, IRQ_PPU_TO_CPU, &cx->scb->ppu2cpu_irq); |
35 | writel(IRQ_CPU_TO_PPU_ACK, &cx->scb->cpu2ppu_irq_ack); | 36 | cx18_writel(cx, IRQ_CPU_TO_PPU_ACK, &cx->scb->cpu2ppu_irq_ack); |
36 | writel(IRQ_EPU_TO_CPU, &cx->scb->epu2cpu_irq); | 37 | cx18_writel(cx, IRQ_EPU_TO_CPU, &cx->scb->epu2cpu_irq); |
37 | writel(IRQ_CPU_TO_EPU_ACK, &cx->scb->cpu2epu_irq_ack); | 38 | cx18_writel(cx, IRQ_CPU_TO_EPU_ACK, &cx->scb->cpu2epu_irq_ack); |
38 | 39 | ||
39 | writel(IRQ_CPU_TO_APU, &cx->scb->cpu2apu_irq); | 40 | cx18_writel(cx, IRQ_CPU_TO_APU, &cx->scb->cpu2apu_irq); |
40 | writel(IRQ_APU_TO_CPU_ACK, &cx->scb->apu2cpu_irq_ack); | 41 | cx18_writel(cx, IRQ_APU_TO_CPU_ACK, &cx->scb->apu2cpu_irq_ack); |
41 | writel(IRQ_HPU_TO_APU, &cx->scb->hpu2apu_irq); | 42 | cx18_writel(cx, IRQ_HPU_TO_APU, &cx->scb->hpu2apu_irq); |
42 | writel(IRQ_APU_TO_HPU_ACK, &cx->scb->apu2hpu_irq_ack); | 43 | cx18_writel(cx, IRQ_APU_TO_HPU_ACK, &cx->scb->apu2hpu_irq_ack); |
43 | writel(IRQ_PPU_TO_APU, &cx->scb->ppu2apu_irq); | 44 | cx18_writel(cx, IRQ_PPU_TO_APU, &cx->scb->ppu2apu_irq); |
44 | writel(IRQ_APU_TO_PPU_ACK, &cx->scb->apu2ppu_irq_ack); | 45 | cx18_writel(cx, IRQ_APU_TO_PPU_ACK, &cx->scb->apu2ppu_irq_ack); |
45 | writel(IRQ_EPU_TO_APU, &cx->scb->epu2apu_irq); | 46 | cx18_writel(cx, IRQ_EPU_TO_APU, &cx->scb->epu2apu_irq); |
46 | writel(IRQ_APU_TO_EPU_ACK, &cx->scb->apu2epu_irq_ack); | 47 | cx18_writel(cx, IRQ_APU_TO_EPU_ACK, &cx->scb->apu2epu_irq_ack); |
47 | 48 | ||
48 | writel(IRQ_CPU_TO_HPU, &cx->scb->cpu2hpu_irq); | 49 | cx18_writel(cx, IRQ_CPU_TO_HPU, &cx->scb->cpu2hpu_irq); |
49 | writel(IRQ_HPU_TO_CPU_ACK, &cx->scb->hpu2cpu_irq_ack); | 50 | cx18_writel(cx, IRQ_HPU_TO_CPU_ACK, &cx->scb->hpu2cpu_irq_ack); |
50 | writel(IRQ_APU_TO_HPU, &cx->scb->apu2hpu_irq); | 51 | cx18_writel(cx, IRQ_APU_TO_HPU, &cx->scb->apu2hpu_irq); |
51 | writel(IRQ_HPU_TO_APU_ACK, &cx->scb->hpu2apu_irq_ack); | 52 | cx18_writel(cx, IRQ_HPU_TO_APU_ACK, &cx->scb->hpu2apu_irq_ack); |
52 | writel(IRQ_PPU_TO_HPU, &cx->scb->ppu2hpu_irq); | 53 | cx18_writel(cx, IRQ_PPU_TO_HPU, &cx->scb->ppu2hpu_irq); |
53 | writel(IRQ_HPU_TO_PPU_ACK, &cx->scb->hpu2ppu_irq_ack); | 54 | cx18_writel(cx, IRQ_HPU_TO_PPU_ACK, &cx->scb->hpu2ppu_irq_ack); |
54 | writel(IRQ_EPU_TO_HPU, &cx->scb->epu2hpu_irq); | 55 | cx18_writel(cx, IRQ_EPU_TO_HPU, &cx->scb->epu2hpu_irq); |
55 | writel(IRQ_HPU_TO_EPU_ACK, &cx->scb->hpu2epu_irq_ack); | 56 | cx18_writel(cx, IRQ_HPU_TO_EPU_ACK, &cx->scb->hpu2epu_irq_ack); |
56 | 57 | ||
57 | writel(IRQ_CPU_TO_PPU, &cx->scb->cpu2ppu_irq); | 58 | cx18_writel(cx, IRQ_CPU_TO_PPU, &cx->scb->cpu2ppu_irq); |
58 | writel(IRQ_PPU_TO_CPU_ACK, &cx->scb->ppu2cpu_irq_ack); | 59 | cx18_writel(cx, IRQ_PPU_TO_CPU_ACK, &cx->scb->ppu2cpu_irq_ack); |
59 | writel(IRQ_APU_TO_PPU, &cx->scb->apu2ppu_irq); | 60 | cx18_writel(cx, IRQ_APU_TO_PPU, &cx->scb->apu2ppu_irq); |
60 | writel(IRQ_PPU_TO_APU_ACK, &cx->scb->ppu2apu_irq_ack); | 61 | cx18_writel(cx, IRQ_PPU_TO_APU_ACK, &cx->scb->ppu2apu_irq_ack); |
61 | writel(IRQ_HPU_TO_PPU, &cx->scb->hpu2ppu_irq); | 62 | cx18_writel(cx, IRQ_HPU_TO_PPU, &cx->scb->hpu2ppu_irq); |
62 | writel(IRQ_PPU_TO_HPU_ACK, &cx->scb->ppu2hpu_irq_ack); | 63 | cx18_writel(cx, IRQ_PPU_TO_HPU_ACK, &cx->scb->ppu2hpu_irq_ack); |
63 | writel(IRQ_EPU_TO_PPU, &cx->scb->epu2ppu_irq); | 64 | cx18_writel(cx, IRQ_EPU_TO_PPU, &cx->scb->epu2ppu_irq); |
64 | writel(IRQ_PPU_TO_EPU_ACK, &cx->scb->ppu2epu_irq_ack); | 65 | cx18_writel(cx, IRQ_PPU_TO_EPU_ACK, &cx->scb->ppu2epu_irq_ack); |
65 | 66 | ||
66 | writel(IRQ_CPU_TO_EPU, &cx->scb->cpu2epu_irq); | 67 | cx18_writel(cx, IRQ_CPU_TO_EPU, &cx->scb->cpu2epu_irq); |
67 | writel(IRQ_EPU_TO_CPU_ACK, &cx->scb->epu2cpu_irq_ack); | 68 | cx18_writel(cx, IRQ_EPU_TO_CPU_ACK, &cx->scb->epu2cpu_irq_ack); |
68 | writel(IRQ_APU_TO_EPU, &cx->scb->apu2epu_irq); | 69 | cx18_writel(cx, IRQ_APU_TO_EPU, &cx->scb->apu2epu_irq); |
69 | writel(IRQ_EPU_TO_APU_ACK, &cx->scb->epu2apu_irq_ack); | 70 | cx18_writel(cx, IRQ_EPU_TO_APU_ACK, &cx->scb->epu2apu_irq_ack); |
70 | writel(IRQ_HPU_TO_EPU, &cx->scb->hpu2epu_irq); | 71 | cx18_writel(cx, IRQ_HPU_TO_EPU, &cx->scb->hpu2epu_irq); |
71 | writel(IRQ_EPU_TO_HPU_ACK, &cx->scb->epu2hpu_irq_ack); | 72 | cx18_writel(cx, IRQ_EPU_TO_HPU_ACK, &cx->scb->epu2hpu_irq_ack); |
72 | writel(IRQ_PPU_TO_EPU, &cx->scb->ppu2epu_irq); | 73 | cx18_writel(cx, IRQ_PPU_TO_EPU, &cx->scb->ppu2epu_irq); |
73 | writel(IRQ_EPU_TO_PPU_ACK, &cx->scb->epu2ppu_irq_ack); | 74 | cx18_writel(cx, IRQ_EPU_TO_PPU_ACK, &cx->scb->epu2ppu_irq_ack); |
74 | 75 | ||
75 | writel(SCB_OFFSET + offsetof(struct cx18_scb, apu2cpu_mb), | 76 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2cpu_mb), |
76 | &cx->scb->apu2cpu_mb_offset); | 77 | &cx->scb->apu2cpu_mb_offset); |
77 | writel(SCB_OFFSET + offsetof(struct cx18_scb, hpu2cpu_mb), | 78 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2cpu_mb), |
78 | &cx->scb->hpu2cpu_mb_offset); | 79 | &cx->scb->hpu2cpu_mb_offset); |
79 | writel(SCB_OFFSET + offsetof(struct cx18_scb, ppu2cpu_mb), | 80 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2cpu_mb), |
80 | &cx->scb->ppu2cpu_mb_offset); | 81 | &cx->scb->ppu2cpu_mb_offset); |
81 | writel(SCB_OFFSET + offsetof(struct cx18_scb, epu2cpu_mb), | 82 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2cpu_mb), |
82 | &cx->scb->epu2cpu_mb_offset); | 83 | &cx->scb->epu2cpu_mb_offset); |
83 | writel(SCB_OFFSET + offsetof(struct cx18_scb, cpu2apu_mb), | 84 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2apu_mb), |
84 | &cx->scb->cpu2apu_mb_offset); | 85 | &cx->scb->cpu2apu_mb_offset); |
85 | writel(SCB_OFFSET + offsetof(struct cx18_scb, hpu2apu_mb), | 86 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2apu_mb), |
86 | &cx->scb->hpu2apu_mb_offset); | 87 | &cx->scb->hpu2apu_mb_offset); |
87 | writel(SCB_OFFSET + offsetof(struct cx18_scb, ppu2apu_mb), | 88 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2apu_mb), |
88 | &cx->scb->ppu2apu_mb_offset); | 89 | &cx->scb->ppu2apu_mb_offset); |
89 | writel(SCB_OFFSET + offsetof(struct cx18_scb, epu2apu_mb), | 90 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2apu_mb), |
90 | &cx->scb->epu2apu_mb_offset); | 91 | &cx->scb->epu2apu_mb_offset); |
91 | writel(SCB_OFFSET + offsetof(struct cx18_scb, cpu2hpu_mb), | 92 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2hpu_mb), |
92 | &cx->scb->cpu2hpu_mb_offset); | 93 | &cx->scb->cpu2hpu_mb_offset); |
93 | writel(SCB_OFFSET + offsetof(struct cx18_scb, apu2hpu_mb), | 94 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2hpu_mb), |
94 | &cx->scb->apu2hpu_mb_offset); | 95 | &cx->scb->apu2hpu_mb_offset); |
95 | writel(SCB_OFFSET + offsetof(struct cx18_scb, ppu2hpu_mb), | 96 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2hpu_mb), |
96 | &cx->scb->ppu2hpu_mb_offset); | 97 | &cx->scb->ppu2hpu_mb_offset); |
97 | writel(SCB_OFFSET + offsetof(struct cx18_scb, epu2hpu_mb), | 98 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2hpu_mb), |
98 | &cx->scb->epu2hpu_mb_offset); | 99 | &cx->scb->epu2hpu_mb_offset); |
99 | writel(SCB_OFFSET + offsetof(struct cx18_scb, cpu2ppu_mb), | 100 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2ppu_mb), |
100 | &cx->scb->cpu2ppu_mb_offset); | 101 | &cx->scb->cpu2ppu_mb_offset); |
101 | writel(SCB_OFFSET + offsetof(struct cx18_scb, apu2ppu_mb), | 102 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2ppu_mb), |
102 | &cx->scb->apu2ppu_mb_offset); | 103 | &cx->scb->apu2ppu_mb_offset); |
103 | writel(SCB_OFFSET + offsetof(struct cx18_scb, hpu2ppu_mb), | 104 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2ppu_mb), |
104 | &cx->scb->hpu2ppu_mb_offset); | 105 | &cx->scb->hpu2ppu_mb_offset); |
105 | writel(SCB_OFFSET + offsetof(struct cx18_scb, epu2ppu_mb), | 106 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, epu2ppu_mb), |
106 | &cx->scb->epu2ppu_mb_offset); | 107 | &cx->scb->epu2ppu_mb_offset); |
107 | writel(SCB_OFFSET + offsetof(struct cx18_scb, cpu2epu_mb), | 108 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu2epu_mb), |
108 | &cx->scb->cpu2epu_mb_offset); | 109 | &cx->scb->cpu2epu_mb_offset); |
109 | writel(SCB_OFFSET + offsetof(struct cx18_scb, apu2epu_mb), | 110 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, apu2epu_mb), |
110 | &cx->scb->apu2epu_mb_offset); | 111 | &cx->scb->apu2epu_mb_offset); |
111 | writel(SCB_OFFSET + offsetof(struct cx18_scb, hpu2epu_mb), | 112 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, hpu2epu_mb), |
112 | &cx->scb->hpu2epu_mb_offset); | 113 | &cx->scb->hpu2epu_mb_offset); |
113 | writel(SCB_OFFSET + offsetof(struct cx18_scb, ppu2epu_mb), | 114 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, ppu2epu_mb), |
114 | &cx->scb->ppu2epu_mb_offset); | 115 | &cx->scb->ppu2epu_mb_offset); |
115 | 116 | ||
116 | writel(SCB_OFFSET + offsetof(struct cx18_scb, cpu_state), | 117 | cx18_writel(cx, SCB_OFFSET + offsetof(struct cx18_scb, cpu_state), |
117 | &cx->scb->ipc_offset); | 118 | &cx->scb->ipc_offset); |
118 | 119 | ||
119 | writel(1, &cx->scb->hpu_state); | 120 | cx18_writel(cx, 1, &cx->scb->hpu_state); |
120 | writel(1, &cx->scb->epu_state); | 121 | cx18_writel(cx, 1, &cx->scb->epu_state); |
121 | } | 122 | } |