linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qe_lib: Remove immrbar_virt_to_phys() function
@ 2006-10-25 11:05 Li Yang
  2006-10-30  3:21 ` Paul Mackerras
  0 siblings, 1 reply; 11+ messages in thread
From: Li Yang @ 2006-10-25 11:05 UTC (permalink / raw)
  To: linuxppc-dev

Remove private physical address mapping routine in qe_lib.  Users
of qe_lib should use generic functions like iopa().
The change also addresses a bug found by Timur Tabi that cmd_input
got mapped in qe_issue_cmd().  It should be written to CECDR
unmodified.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Timur Tabi <timur@freescale.com>

---
 arch/powerpc/sysdev/qe_lib/qe.c |    3 +--
 include/asm-powerpc/immap_qe.h  |    9 ---------
 2 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 2bae632..e422322 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -122,8 +122,7 @@ int qe_issue_cmd(u32 cmd, u32 device, u8
 				mcn_shift = QE_CR_MCN_NORMAL_SHIFT;
 		}
 
-		out_be32(&qe_immr->cp.cecdr,
-			 immrbar_virt_to_phys((void *)cmd_input));
+		out_be32(&qe_immr->cp.cecdr, cmd_input);
 		out_be32(&qe_immr->cp.cecr,
 			 (cmd | QE_CR_FLG | ((u32) device << dev_shift) | (u32)
 			  mcn_protocol << mcn_shift));
diff --git a/include/asm-powerpc/immap_qe.h b/include/asm-powerpc/immap_qe.h
index ce12f85..7cccd16 100644
--- a/include/asm-powerpc/immap_qe.h
+++ b/include/asm-powerpc/immap_qe.h
@@ -464,14 +464,5 @@ struct qe_immap {
 extern struct qe_immap *qe_immr;
 extern phys_addr_t get_qe_base(void);
 
-static inline unsigned long immrbar_virt_to_phys(volatile void * address)
-{
-	if ( ((u32)address >= (u32)qe_immr) &&
-			((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) )
-		return (unsigned long)(address - (u32)qe_immr +
-				(u32)get_qe_base());
-	return (unsigned long)virt_to_phys(address);
-}
-
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_IMMAP_QE_H */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-10-31  5:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-25 11:05 [PATCH] qe_lib: Remove immrbar_virt_to_phys() function Li Yang
2006-10-30  3:21 ` Paul Mackerras
2006-10-30  6:22   ` Li Yang-r58472
2006-10-30 22:15     ` Kumar Gala
2006-10-31  2:28       ` Li Yang-r58472
2006-10-31  2:46         ` Kumar Gala
2006-10-31  2:56           ` Li Yang-r58472
2006-10-31  5:05             ` Kumar Gala
2006-10-31  5:25               ` Li Yang-r58472
2006-10-31  5:30                 ` Kumar Gala
2006-10-31  5:34                   ` Li Yang-r58472

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).