aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/cpm2_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/cpm2_common.c')
-rw-r--r--arch/powerpc/sysdev/cpm2_common.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
index ec265995d5d8..924412974795 100644
--- a/arch/powerpc/sysdev/cpm2_common.c
+++ b/arch/powerpc/sysdev/cpm2_common.c
@@ -248,15 +248,14 @@ static void cpm2_dpinit(void)
248 * varies with the processor and the microcode patches activated. 248 * varies with the processor and the microcode patches activated.
249 * But the following should be at least safe. 249 * But the following should be at least safe.
250 */ 250 */
251 rh_attach_region(&cpm_dpmem_info, (void *)CPM_DATAONLY_BASE, 251 rh_attach_region(&cpm_dpmem_info, CPM_DATAONLY_BASE, CPM_DATAONLY_SIZE);
252 CPM_DATAONLY_SIZE);
253} 252}
254 253
255/* This function returns an index into the DPRAM area. 254/* This function returns an index into the DPRAM area.
256 */ 255 */
257uint cpm_dpalloc(uint size, uint align) 256unsigned long cpm_dpalloc(uint size, uint align)
258{ 257{
259 void *start; 258 unsigned long start;
260 unsigned long flags; 259 unsigned long flags;
261 260
262 spin_lock_irqsave(&cpm_dpmem_lock, flags); 261 spin_lock_irqsave(&cpm_dpmem_lock, flags);
@@ -268,13 +267,13 @@ uint cpm_dpalloc(uint size, uint align)
268} 267}
269EXPORT_SYMBOL(cpm_dpalloc); 268EXPORT_SYMBOL(cpm_dpalloc);
270 269
271int cpm_dpfree(uint offset) 270int cpm_dpfree(unsigned long offset)
272{ 271{
273 int ret; 272 int ret;
274 unsigned long flags; 273 unsigned long flags;
275 274
276 spin_lock_irqsave(&cpm_dpmem_lock, flags); 275 spin_lock_irqsave(&cpm_dpmem_lock, flags);
277 ret = rh_free(&cpm_dpmem_info, (void *)offset); 276 ret = rh_free(&cpm_dpmem_info, offset);
278 spin_unlock_irqrestore(&cpm_dpmem_lock, flags); 277 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
279 278
280 return ret; 279 return ret;
@@ -282,17 +281,17 @@ int cpm_dpfree(uint offset)
282EXPORT_SYMBOL(cpm_dpfree); 281EXPORT_SYMBOL(cpm_dpfree);
283 282
284/* not sure if this is ever needed */ 283/* not sure if this is ever needed */
285uint cpm_dpalloc_fixed(uint offset, uint size, uint align) 284unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align)
286{ 285{
287 void *start; 286 unsigned long start;
288 unsigned long flags; 287 unsigned long flags;
289 288
290 spin_lock_irqsave(&cpm_dpmem_lock, flags); 289 spin_lock_irqsave(&cpm_dpmem_lock, flags);
291 cpm_dpmem_info.alignment = align; 290 cpm_dpmem_info.alignment = align;
292 start = rh_alloc_fixed(&cpm_dpmem_info, (void *)offset, size, "commproc"); 291 start = rh_alloc_fixed(&cpm_dpmem_info, offset, size, "commproc");
293 spin_unlock_irqrestore(&cpm_dpmem_lock, flags); 292 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
294 293
295 return (uint)start; 294 return start;
296} 295}
297EXPORT_SYMBOL(cpm_dpalloc_fixed); 296EXPORT_SYMBOL(cpm_dpalloc_fixed);
298 297
@@ -302,7 +301,7 @@ void cpm_dpdump(void)
302} 301}
303EXPORT_SYMBOL(cpm_dpdump); 302EXPORT_SYMBOL(cpm_dpdump);
304 303
305void *cpm_dpram_addr(uint offset) 304void *cpm_dpram_addr(unsigned long offset)
306{ 305{
307 return (void *)(im_dprambase + offset); 306 return (void *)(im_dprambase + offset);
308} 307}