diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/commproc.c | 37 |
1 files changed, 0 insertions, 37 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. |