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

Vitaly Bordug vbordug at ru.mvista.com
Tue Jan 23 00:55:43 EST 2007


On Mon, 22 Jan 2007 21:02:11 +1100
Paul Mackerras wrote:

> 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?
> 

Well, CONFIG_PPC_MERGE && CPM1 is always false as of now  - it will play with 8xx series that are forthcoming. So that it 
won't lead to a hardly-detected confusion, I did it here, though now I think  better option will be to move this particular hunk to 8xx series.

--
Thanks, Vitaly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070122/c56b7407/attachment.pgp>


More information about the Linuxppc-dev mailing list