aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/commproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/commproc.c')
-rw-r--r--arch/powerpc/sysdev/commproc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
index 428eb8c151b9..f6a63780bbde 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/commproc.c
@@ -39,12 +39,15 @@
39#include <asm/tlbflush.h> 39#include <asm/tlbflush.h>
40#include <asm/rheap.h> 40#include <asm/rheap.h>
41#include <asm/prom.h> 41#include <asm/prom.h>
42#include <asm/cpm.h>
42 43
43#include <asm/fs_pd.h> 44#include <asm/fs_pd.h>
44 45
45#define CPM_MAP_SIZE (0x4000) 46#define CPM_MAP_SIZE (0x4000)
46 47
48#ifndef CONFIG_PPC_CPM_NEW_BINDING
47static void m8xx_cpm_dpinit(void); 49static void m8xx_cpm_dpinit(void);
50#endif
48static uint host_buffer; /* One page of host buffer */ 51static uint host_buffer; /* One page of host buffer */
49static uint host_end; /* end + 1 */ 52static uint host_end; /* end + 1 */
50cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ 53cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */
@@ -193,7 +196,7 @@ end:
193 return sirq; 196 return sirq;
194} 197}
195 198
196void cpm_reset(void) 199void __init cpm_reset(void)
197{ 200{
198 sysconf8xx_t __iomem *siu_conf; 201 sysconf8xx_t __iomem *siu_conf;
199 202
@@ -229,8 +232,12 @@ void cpm_reset(void)
229 out_be32(&siu_conf->sc_sdcr, 1); 232 out_be32(&siu_conf->sc_sdcr, 1);
230 immr_unmap(siu_conf); 233 immr_unmap(siu_conf);
231 234
235#ifdef CONFIG_PPC_CPM_NEW_BINDING
236 cpm_muram_init();
237#else
232 /* Reclaim the DP memory for our use. */ 238 /* Reclaim the DP memory for our use. */
233 m8xx_cpm_dpinit(); 239 m8xx_cpm_dpinit();
240#endif
234} 241}
235 242
236/* We used to do this earlier, but have to postpone as long as possible 243/* We used to do this earlier, but have to postpone as long as possible
@@ -296,6 +303,7 @@ cpm_setbrg(uint brg, uint rate)
296 CPM_BRG_EN | CPM_BRG_DIV16); 303 CPM_BRG_EN | CPM_BRG_DIV16);
297} 304}
298 305
306#ifndef CONFIG_PPC_CPM_NEW_BINDING
299/* 307/*
300 * dpalloc / dpfree bits. 308 * dpalloc / dpfree bits.
301 */ 309 */
@@ -397,6 +405,7 @@ uint cpm_dpram_phys(u8 *addr)
397 return (dpram_pbase + (uint)(addr - dpram_vbase)); 405 return (dpram_pbase + (uint)(addr - dpram_vbase));
398} 406}
399EXPORT_SYMBOL(cpm_dpram_phys); 407EXPORT_SYMBOL(cpm_dpram_phys);
408#endif /* !CONFIG_PPC_CPM_NEW_BINDING */
400 409
401struct cpm_ioport16 { 410struct cpm_ioport16 {
402 __be16 dir, par, sor, dat, intr; 411 __be16 dir, par, sor, dat, intr;