aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/immap_qe.h2
-rw-r--r--include/asm-powerpc/qe.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/include/asm-powerpc/immap_qe.h b/include/asm-powerpc/immap_qe.h
index 82a452615097..924aefbd6a8e 100644
--- a/include/asm-powerpc/immap_qe.h
+++ b/include/asm-powerpc/immap_qe.h
@@ -468,7 +468,7 @@ struct qe_immap {
468 u8 res18[0xC0000]; /* 0x140000 - 0x200000 */ 468 u8 res18[0xC0000]; /* 0x140000 - 0x200000 */
469} __attribute__ ((packed)); 469} __attribute__ ((packed));
470 470
471extern struct qe_immap *qe_immr; 471extern struct qe_immap __iomem *qe_immr;
472extern phys_addr_t get_qe_base(void); 472extern phys_addr_t get_qe_base(void);
473 473
474static inline unsigned long immrbar_virt_to_phys(void *address) 474static inline unsigned long immrbar_virt_to_phys(void *address)
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 *