mirror of https://github.com/thesofproject/sof.git
cavs: add mailbox_sw_reg read/write64
It will allow to simplify usage of 64bit values Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
This commit is contained in:
parent
d434dbc8e1
commit
3fa7d56960
|
@ -71,6 +71,15 @@ static inline void mailbox_sw_reg_write(size_t offset, uint32_t src)
|
|||
*ptr = src;
|
||||
}
|
||||
|
||||
static inline void mailbox_sw_reg_write64(size_t offset, uint64_t src)
|
||||
{
|
||||
volatile uint64_t *ptr;
|
||||
|
||||
ptr = (volatile uint64_t *)(MAILBOX_SW_REG_BASE + offset);
|
||||
ptr = cache_to_uncache(ptr);
|
||||
*ptr = src;
|
||||
}
|
||||
|
||||
static inline uint32_t mailbox_sw_reg_read(size_t offset)
|
||||
{
|
||||
volatile uint32_t *ptr;
|
||||
|
@ -81,6 +90,16 @@ static inline uint32_t mailbox_sw_reg_read(size_t offset)
|
|||
return *ptr;
|
||||
}
|
||||
|
||||
static inline uint64_t mailbox_sw_reg_read64(size_t offset)
|
||||
{
|
||||
volatile uint64_t *ptr;
|
||||
|
||||
ptr = (volatile uint64_t *)(MAILBOX_SW_REG_BASE + offset);
|
||||
ptr = cache_to_uncache(ptr);
|
||||
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
#endif /* __CAVS_LIB_MAILBOX_H__ */
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue