platinum: Add register _4B.

This commit is contained in:
joevt 2024-02-18 17:46:47 -08:00 committed by dingusdev
parent d4922beefe
commit 6e4544450e
2 changed files with 8 additions and 0 deletions

View File

@ -186,6 +186,9 @@ uint32_t PlatinumCtrl::read(uint32_t rgn_start, uint32_t offset, int size) {
case PlatinumReg::IRIDIUM_CONFIG:
value = this->iridium_cfg;
break;
case PlatinumReg::_4B:
value = this->_4b;
break;
default:
LOG_F(WARNING, "%s: unknown register read at offset 0x%X", this->name.c_str(),
offset);
@ -325,6 +328,9 @@ void PlatinumCtrl::write(uint32_t rgn_start, uint32_t offset, uint32_t value, in
LOG_F(ERROR, "%s: little-endian system bus is not implemented", this->name.c_str());
this->iridium_cfg = (this->iridium_cfg & ~7) | (value & 7);
break;
case PlatinumReg::_4B:
this->_4b = value;
break;
default:
LOG_F(WARNING, "%s: unknown register write at offset 0x%X", this->name.c_str(),
offset);

View File

@ -167,6 +167,7 @@ enum PlatinumReg : uint32_t {
// Iridium datapath registers
IRIDIUM_CONFIG = 0x4A, // write 4
_4B = 0x4B, // read ; write 1
};
#define REG_TO_INDEX(reg) ((reg) - FIRST_SWATCH)
@ -258,6 +259,7 @@ private:
uint32_t swatch_config = 0xFFD;
uint32_t swatch_params[17] = {};
uint32_t timing_adjust = 0;
uint32_t _4b = 0;
// interrupt related state
uint32_t swatch_int_mask = 0;