dbdma: support optinal CommandPtrHi register.

It's written with zero in OS X. This dummy implementation
is meant to reduce log warnings.
This commit is contained in:
Maxim Poliakovski 2023-09-19 14:15:59 +02:00
parent 278799795c
commit 04acf120d6
2 changed files with 4 additions and 0 deletions

View File

@ -263,6 +263,9 @@ void DMAChannel::reg_write(uint32_t offset, uint32_t value, int size) {
break;
case DMAReg::CH_STAT:
break; // ingore writes to ChannelStatus
case DMAReg::CMD_PTR_HI: // Mac OS X writes this optional register with zero
LOG_F(9, "CommandPtrHi set to 0x%X", value);
break;
case DMAReg::CMD_PTR_LO:
if (!(this->ch_stat & CH_STAT_RUN) && !(this->ch_stat & CH_STAT_ACTIVE)) {
this->cmd_ptr = value;

View File

@ -39,6 +39,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
enum DMAReg : uint32_t {
CH_CTRL = 0,
CH_STAT = 4,
CMD_PTR_HI = 8,
CMD_PTR_LO = 12,
INT_SELECT = 16,
BRANCH_SELECT = 20,