[PATCH 2/5] [POWERPC] cpm_uart: OF-related fix for arch/powerpc

Paul Mackerras paulus at samba.org
Mon Jan 22 21:02:11 EST 2007


Vitaly Bordug writes:

>  		mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8));
> +#ifdef CONFIG_PPC_MERGE
> +		dma_addr = (u32)cpm_dpram_phys(mem_addr);
> +#else
>  		dma_addr = (u32)mem_addr;
> +#endif

Please define a cpm_dpram_phys() function in include/asm-ppc/fs_pd.h
rather than having ifdefs in code.  And please also try to avoid
unnecessary casts.

Actually, I notice that cpm_dpram_phys doesn't currently appear
anywhere in the kernel tree, and your patch sequence doesn't create
it.  So how come this change won't cause a compile error?

Paul.



More information about the Linuxppc-dev mailing list