diff options
-rw-r--r-- | arch/powerpc/sysdev/commproc.c | 37 | ||||
-rw-r--r-- | arch/ppc/8xx_io/commproc.c | 38 | ||||
-rw-r--r-- | include/asm-powerpc/commproc.h | 4 | ||||
-rw-r--r-- | include/asm-ppc/commproc.h | 4 |
4 files changed, 0 insertions, 83 deletions
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c index 621bc6c1d408..818d4b03f4e3 100644 --- a/arch/powerpc/sysdev/commproc.c +++ b/arch/powerpc/sysdev/commproc.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #ifndef CONFIG_PPC_CPM_NEW_BINDING | 48 | #ifndef CONFIG_PPC_CPM_NEW_BINDING |
49 | static void m8xx_cpm_dpinit(void); | 49 | static void m8xx_cpm_dpinit(void); |
50 | #endif | 50 | #endif |
51 | static uint host_buffer; /* One page of host buffer */ | ||
52 | static uint host_end; /* end + 1 */ | ||
53 | cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ | 51 | cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ |
54 | immap_t __iomem *mpc8xx_immr; | 52 | immap_t __iomem *mpc8xx_immr; |
55 | static cpic8xx_t __iomem *cpic_reg; | 53 | static cpic8xx_t __iomem *cpic_reg; |
@@ -268,41 +266,6 @@ out: | |||
268 | } | 266 | } |
269 | EXPORT_SYMBOL(cpm_command); | 267 | EXPORT_SYMBOL(cpm_command); |
270 | 268 | ||
271 | /* We used to do this earlier, but have to postpone as long as possible | ||
272 | * to ensure the kernel VM is now running. | ||
273 | */ | ||
274 | static void | ||
275 | alloc_host_memory(void) | ||
276 | { | ||
277 | dma_addr_t physaddr; | ||
278 | |||
279 | /* Set the host page for allocation. | ||
280 | */ | ||
281 | host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr, | ||
282 | GFP_KERNEL); | ||
283 | host_end = host_buffer + PAGE_SIZE; | ||
284 | } | ||
285 | |||
286 | /* We also own one page of host buffer space for the allocation of | ||
287 | * UART "fifos" and the like. | ||
288 | */ | ||
289 | uint | ||
290 | m8xx_cpm_hostalloc(uint size) | ||
291 | { | ||
292 | uint retloc; | ||
293 | |||
294 | if (host_buffer == 0) | ||
295 | alloc_host_memory(); | ||
296 | |||
297 | if ((host_buffer + size) >= host_end) | ||
298 | return(0); | ||
299 | |||
300 | retloc = host_buffer; | ||
301 | host_buffer += size; | ||
302 | |||
303 | return(retloc); | ||
304 | } | ||
305 | |||
306 | /* Set a baud rate generator. This needs lots of work. There are | 269 | /* Set a baud rate generator. This needs lots of work. There are |
307 | * four BRGs, any of which can be wired to any channel. | 270 | * four BRGs, any of which can be wired to any channel. |
308 | * The internal baud rate clock is the system clock divided by 16. | 271 | * The internal baud rate clock is the system clock divided by 16. |
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 9da880be4dc0..3f93af83b514 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -55,8 +55,6 @@ | |||
55 | }) | 55 | }) |
56 | 56 | ||
57 | static void m8xx_cpm_dpinit(void); | 57 | static void m8xx_cpm_dpinit(void); |
58 | static uint host_buffer; /* One page of host buffer */ | ||
59 | static uint host_end; /* end + 1 */ | ||
60 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ | 58 | cpm8xx_t *cpmp; /* Pointer to comm processor space */ |
61 | 59 | ||
62 | /* CPM interrupt vector functions. | 60 | /* CPM interrupt vector functions. |
@@ -68,7 +66,6 @@ struct cpm_action { | |||
68 | static struct cpm_action cpm_vecs[CPMVEC_NR]; | 66 | static struct cpm_action cpm_vecs[CPMVEC_NR]; |
69 | static irqreturn_t cpm_interrupt(int irq, void * dev); | 67 | static irqreturn_t cpm_interrupt(int irq, void * dev); |
70 | static irqreturn_t cpm_error_interrupt(int irq, void *dev); | 68 | static irqreturn_t cpm_error_interrupt(int irq, void *dev); |
71 | static void alloc_host_memory(void); | ||
72 | /* Define a table of names to identify CPM interrupt handlers in | 69 | /* Define a table of names to identify CPM interrupt handlers in |
73 | * /proc/interrupts. | 70 | * /proc/interrupts. |
74 | */ | 71 | */ |
@@ -158,21 +155,6 @@ m8xx_cpm_reset(void) | |||
158 | cpmp = (cpm8xx_t *)commproc; | 155 | cpmp = (cpm8xx_t *)commproc; |
159 | } | 156 | } |
160 | 157 | ||
161 | /* We used to do this earlier, but have to postpone as long as possible | ||
162 | * to ensure the kernel VM is now running. | ||
163 | */ | ||
164 | static void | ||
165 | alloc_host_memory(void) | ||
166 | { | ||
167 | dma_addr_t physaddr; | ||
168 | |||
169 | /* Set the host page for allocation. | ||
170 | */ | ||
171 | host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr, | ||
172 | GFP_KERNEL); | ||
173 | host_end = host_buffer + PAGE_SIZE; | ||
174 | } | ||
175 | |||
176 | /* This is called during init_IRQ. We used to do it above, but this | 158 | /* This is called during init_IRQ. We used to do it above, but this |
177 | * was too early since init_IRQ was not yet called. | 159 | * was too early since init_IRQ was not yet called. |
178 | */ | 160 | */ |
@@ -319,26 +301,6 @@ cpm_free_handler(int cpm_vec) | |||
319 | cpm_vecs[cpm_vec].dev_id = NULL; | 301 | cpm_vecs[cpm_vec].dev_id = NULL; |
320 | } | 302 | } |
321 | 303 | ||
322 | /* We also own one page of host buffer space for the allocation of | ||
323 | * UART "fifos" and the like. | ||
324 | */ | ||
325 | uint | ||
326 | m8xx_cpm_hostalloc(uint size) | ||
327 | { | ||
328 | uint retloc; | ||
329 | |||
330 | if (host_buffer == 0) | ||
331 | alloc_host_memory(); | ||
332 | |||
333 | if ((host_buffer + size) >= host_end) | ||
334 | return(0); | ||
335 | |||
336 | retloc = host_buffer; | ||
337 | host_buffer += size; | ||
338 | |||
339 | return(retloc); | ||
340 | } | ||
341 | |||
342 | /* Set a baud rate generator. This needs lots of work. There are | 304 | /* Set a baud rate generator. This needs lots of work. There are |
343 | * four BRGs, any of which can be wired to any channel. | 305 | * four BRGs, any of which can be wired to any channel. |
344 | * The internal baud rate clock is the system clock divided by 16. | 306 | * The internal baud rate clock is the system clock divided by 16. |
diff --git a/include/asm-powerpc/commproc.h b/include/asm-powerpc/commproc.h index 9e3b8648648c..97575219ea8b 100644 --- a/include/asm-powerpc/commproc.h +++ b/include/asm-powerpc/commproc.h | |||
@@ -87,10 +87,6 @@ extern uint cpm_dpram_phys(u8* addr); | |||
87 | 87 | ||
88 | extern void cpm_setbrg(uint brg, uint rate); | 88 | extern void cpm_setbrg(uint brg, uint rate); |
89 | 89 | ||
90 | extern uint m8xx_cpm_hostalloc(uint size); | ||
91 | extern int m8xx_cpm_hostfree(uint start); | ||
92 | extern void m8xx_cpm_hostdump(void); | ||
93 | |||
94 | extern void cpm_load_patch(cpm8xx_t *cp); | 90 | extern void cpm_load_patch(cpm8xx_t *cp); |
95 | 91 | ||
96 | /* Buffer descriptors used by many of the CPM protocols. | 92 | /* Buffer descriptors used by many of the CPM protocols. |
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 462abb185f07..5418d6de1737 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h | |||
@@ -75,10 +75,6 @@ extern void *cpm_dpram_addr(unsigned long offset); | |||
75 | extern uint cpm_dpram_phys(u8* addr); | 75 | extern uint cpm_dpram_phys(u8* addr); |
76 | extern void cpm_setbrg(uint brg, uint rate); | 76 | extern void cpm_setbrg(uint brg, uint rate); |
77 | 77 | ||
78 | extern uint m8xx_cpm_hostalloc(uint size); | ||
79 | extern int m8xx_cpm_hostfree(uint start); | ||
80 | extern void m8xx_cpm_hostdump(void); | ||
81 | |||
82 | extern void cpm_load_patch(volatile immap_t *immr); | 78 | extern void cpm_load_patch(volatile immap_t *immr); |
83 | 79 | ||
84 | /* Buffer descriptors used by many of the CPM protocols. | 80 | /* Buffer descriptors used by many of the CPM protocols. |