| 1 |
|
| 2 |
|
| 3 |
#include <device/mmio.h> |
| 4 |
#include <intelblocks/ioc.h> |
| 5 |
#include <soc/iomap.h> |
| 6 |
|
| 7 |
void ioc_reg_write32(uint32_t offset, uint32_t value) |
| 8 |
{ |
| 9 |
write32p(MCH_BASE_ADDRESS + offset, value); |
| 10 |
} |
| 11 |
|
| 12 |
uint32_t ioc_reg_read32(uint32_t offset) |
| 13 |
{ |
| 14 |
return read32p(MCH_BASE_ADDRESS + offset); |
| 15 |
} |
| 16 |
|
| 17 |
void ioc_reg_or32(uint32_t offset, uint32_t ordata) |
| 18 |
{ |
| 19 |
uint32_t data32; |
| 20 |
|
| 21 |
data32 = read32p(MCH_BASE_ADDRESS + offset); |
| 22 |
data32 |= ordata; |
| 23 |
write32p(MCH_BASE_ADDRESS + offset, data32); |
| 24 |
} |