aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/qe.h
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-03-11 13:24:13 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-04-17 02:01:39 -0400
commit0b51b02edff2417deff98d8bbf294fa56b765bc6 (patch)
tree709358fd88085a368795b8d7be068073b5b16180 /include/asm-powerpc/qe.h
parentacaa7aa30a8cdf7276945629f56d6daf30beb157 (diff)
[POWERPC] QE: implement qe_muram_offset
qe_muram_offset is the reverse of the qe_muram_addr, will be used for the Freescale QE USB Host Controller driver. This patch also moves qe_muram_addr into the qe.h header, plus adds __iomem hints to use with sparse. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/qe.h')
-rw-r--r--include/asm-powerpc/qe.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 430dc77b35fc..398534c15cc7 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -92,7 +92,16 @@ unsigned long qe_muram_alloc(int size, int align);
92int qe_muram_free(unsigned long offset); 92int qe_muram_free(unsigned long offset);
93unsigned long qe_muram_alloc_fixed(unsigned long offset, int size); 93unsigned long qe_muram_alloc_fixed(unsigned long offset, int size);
94void qe_muram_dump(void); 94void qe_muram_dump(void);
95void *qe_muram_addr(unsigned long offset); 95
96static inline void __iomem *qe_muram_addr(unsigned long offset)
97{
98 return (void __iomem *)&qe_immr->muram[offset];
99}
100
101static inline unsigned long qe_muram_offset(void __iomem *addr)
102{
103 return addr - (void __iomem *)qe_immr->muram;
104}
96 105
97/* Structure that defines QE firmware binary files. 106/* Structure that defines QE firmware binary files.
98 * 107 *