Thread (17 messages) flat view 17 messages, 3 authors, 2007-01-24

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

From: Vitaly Bordug <hidden>
Date: 2007-01-22 14:05:48

On Mon, 22 Jan 2007 21:02:11 +1100
Paul Mackerras wrote:
Vitaly Bordug writes:
quoted
 		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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help