mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-12 11:31:16 +00:00
platinum: use meaningful name for 'register _4B'.
This commit is contained in:
parent
6e4544450e
commit
2d68b72dbd
@ -186,8 +186,8 @@ uint32_t PlatinumCtrl::read(uint32_t rgn_start, uint32_t offset, int size) {
|
|||||||
case PlatinumReg::IRIDIUM_CONFIG:
|
case PlatinumReg::IRIDIUM_CONFIG:
|
||||||
value = this->iridium_cfg;
|
value = this->iridium_cfg;
|
||||||
break;
|
break;
|
||||||
case PlatinumReg::_4B:
|
case PlatinumReg::POWER_DOWN_CTRL:
|
||||||
value = this->_4b;
|
value = this->power_down_ctrl;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_F(WARNING, "%s: unknown register read at offset 0x%X", this->name.c_str(),
|
LOG_F(WARNING, "%s: unknown register read at offset 0x%X", this->name.c_str(),
|
||||||
@ -328,8 +328,10 @@ 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());
|
LOG_F(ERROR, "%s: little-endian system bus is not implemented", this->name.c_str());
|
||||||
this->iridium_cfg = (this->iridium_cfg & ~7) | (value & 7);
|
this->iridium_cfg = (this->iridium_cfg & ~7) | (value & 7);
|
||||||
break;
|
break;
|
||||||
case PlatinumReg::_4B:
|
case PlatinumReg::POWER_DOWN_CTRL:
|
||||||
this->_4b = value;
|
this->power_down_ctrl = value;
|
||||||
|
if (value & 1)
|
||||||
|
LOG_F(INFO, "%s: power down mode enabled", this->name.c_str());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_F(WARNING, "%s: unknown register write at offset 0x%X", this->name.c_str(),
|
LOG_F(WARNING, "%s: unknown register write at offset 0x%X", this->name.c_str(),
|
||||||
|
@ -167,7 +167,7 @@ enum PlatinumReg : uint32_t {
|
|||||||
|
|
||||||
// Iridium datapath registers
|
// Iridium datapath registers
|
||||||
IRIDIUM_CONFIG = 0x4A, // write 4
|
IRIDIUM_CONFIG = 0x4A, // write 4
|
||||||
_4B = 0x4B, // read ; write 1
|
POWER_DOWN_CTRL = 0x4B, // 1-bit register, writing "1" enables power down mode
|
||||||
};
|
};
|
||||||
|
|
||||||
#define REG_TO_INDEX(reg) ((reg) - FIRST_SWATCH)
|
#define REG_TO_INDEX(reg) ((reg) - FIRST_SWATCH)
|
||||||
@ -259,7 +259,7 @@ private:
|
|||||||
uint32_t swatch_config = 0xFFD;
|
uint32_t swatch_config = 0xFFD;
|
||||||
uint32_t swatch_params[17] = {};
|
uint32_t swatch_params[17] = {};
|
||||||
uint32_t timing_adjust = 0;
|
uint32_t timing_adjust = 0;
|
||||||
uint32_t _4b = 0;
|
uint32_t power_down_ctrl = 0;
|
||||||
|
|
||||||
// interrupt related state
|
// interrupt related state
|
||||||
uint32_t swatch_int_mask = 0;
|
uint32_t swatch_int_mask = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user