@@ -98,27 +98,27 @@ struct mailbox_msg {
9898static void mailbox_reg_write (struct mailbox_channel * mb_chann , u32 mbox_reg , u32 data )
9999{
100100 struct xdna_mailbox_res * mb_res = & mb_chann -> mb -> res ;
101- u64 ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
101+ void __iomem * ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
102102
103- writel (data , ( void * ) ringbuf_addr );
103+ writel (data , ringbuf_addr );
104104}
105105
106106static u32 mailbox_reg_read (struct mailbox_channel * mb_chann , u32 mbox_reg )
107107{
108108 struct xdna_mailbox_res * mb_res = & mb_chann -> mb -> res ;
109- u64 ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
109+ void __iomem * ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
110110
111- return readl (( void * ) ringbuf_addr );
111+ return readl (ringbuf_addr );
112112}
113113
114114static int mailbox_reg_read_non_zero (struct mailbox_channel * mb_chann , u32 mbox_reg , u32 * val )
115115{
116116 struct xdna_mailbox_res * mb_res = & mb_chann -> mb -> res ;
117- u64 ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
117+ void __iomem * ringbuf_addr = mb_res -> mbox_base + mbox_reg ;
118118 int ret , value ;
119119
120120 /* Poll till value is not zero */
121- ret = readx_poll_timeout (readl , ( void * ) ringbuf_addr , value ,
121+ ret = readx_poll_timeout (readl , ringbuf_addr , value ,
122122 value , 1 /* us */ , 100 );
123123 if (ret < 0 )
124124 return ret ;
@@ -200,10 +200,10 @@ static void mailbox_release_msg(struct mailbox_channel *mb_chann,
200200static int
201201mailbox_send_msg (struct mailbox_channel * mb_chann , struct mailbox_msg * mb_msg )
202202{
203+ void __iomem * write_addr ;
203204 u32 ringbuf_size ;
204205 u32 head , tail ;
205206 u32 start_addr ;
206- u64 write_addr ;
207207 u32 tmp_tail ;
208208
209209 head = mailbox_get_headptr (mb_chann , CHAN_RES_X2I );
@@ -221,14 +221,14 @@ mailbox_send_msg(struct mailbox_channel *mb_chann, struct mailbox_msg *mb_msg)
221221
222222 if (tail >= head && tmp_tail > ringbuf_size - sizeof (u32 )) {
223223 write_addr = mb_chann -> mb -> res .ringbuf_base + start_addr + tail ;
224- writel (TOMBSTONE , ( void * ) write_addr );
224+ writel (TOMBSTONE , write_addr );
225225
226226 /* tombstone is set. Write from the start of the ringbuf */
227227 tail = 0 ;
228228 }
229229
230230 write_addr = mb_chann -> mb -> res .ringbuf_base + start_addr + tail ;
231- memcpy_toio (( void * ) write_addr , & mb_msg -> pkg , mb_msg -> pkg_size );
231+ memcpy_toio (write_addr , & mb_msg -> pkg , mb_msg -> pkg_size );
232232 mailbox_set_tailptr (mb_chann , tail + mb_msg -> pkg_size );
233233
234234 trace_mbox_set_tail (MAILBOX_NAME , mb_chann -> msix_irq ,
@@ -275,11 +275,11 @@ mailbox_get_resp(struct mailbox_channel *mb_chann, struct xdna_msg_header *heade
275275static int mailbox_get_msg (struct mailbox_channel * mb_chann )
276276{
277277 struct xdna_msg_header header ;
278+ void __iomem * read_addr ;
278279 u32 msg_size , rest ;
279280 u32 ringbuf_size ;
280281 u32 head , tail ;
281282 u32 start_addr ;
282- u64 read_addr ;
283283 int ret ;
284284
285285 if (mailbox_reg_read_non_zero (mb_chann , mb_chann -> res [CHAN_RES_I2X ].mb_tail_ptr_reg , & tail ))
@@ -302,7 +302,7 @@ static int mailbox_get_msg(struct mailbox_channel *mb_chann)
302302
303303 /* Peek size of the message or TOMBSTONE */
304304 read_addr = mb_chann -> mb -> res .ringbuf_base + start_addr + head ;
305- header .total_size = readl (( void * ) read_addr );
305+ header .total_size = readl (read_addr );
306306 /* size is TOMBSTONE, set next read from 0 */
307307 if (header .total_size == TOMBSTONE ) {
308308 if (head < tail ) {
@@ -328,7 +328,7 @@ static int mailbox_get_msg(struct mailbox_channel *mb_chann)
328328
329329 rest = sizeof (header ) - sizeof (u32 );
330330 read_addr += sizeof (u32 );
331- memcpy_fromio ((u32 * )& header + 1 , ( void * ) read_addr , rest );
331+ memcpy_fromio ((u32 * )& header + 1 , read_addr , rest );
332332 read_addr += rest ;
333333
334334 ret = mailbox_get_resp (mb_chann , & header , (u32 * )read_addr );
0 commit comments