mirror of https://github.com/thesofproject/sof.git
io: Add support for 16bit register IO
Enable IO with 16 bit HW. Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
This commit is contained in:
parent
2b5507232e
commit
a86d2d7ae2
|
@ -48,4 +48,14 @@ static inline void io_reg_update_bits(uint32_t reg, uint32_t mask, uint32_t valu
|
|||
io_reg_write(reg, (io_reg_read(reg) & (~mask)) | (value & mask));
|
||||
}
|
||||
|
||||
static inline uint16_t io_reg_read16(uint32_t reg)
|
||||
{
|
||||
return *((volatile uint16_t*)reg);
|
||||
}
|
||||
|
||||
static inline void io_reg_write16(uint32_t reg, uint16_t val)
|
||||
{
|
||||
*((volatile uint16_t*)reg) = val;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue