From: Li Yang <leoli@freescale.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] qe_lib: Remove immrbar_virt_to_phys() function
Date: Wed, 25 Oct 2006 19:05:10 +0800 [thread overview]
Message-ID: <453F44E6.8030706@freescale.com> (raw)
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 */
next reply other threads:[~2006-10-25 11:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 11:05 Li Yang [this message]
2006-10-30 3:21 ` [PATCH] qe_lib: Remove immrbar_virt_to_phys() function 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=453F44E6.8030706@freescale.com \
--to=leoli@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.