mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 06:29:38 +00:00
heathrow: add Ethernet DBDMA channels.
This commit is contained in:
parent
ae97d7bcc7
commit
f4f7edcc28
@ -96,6 +96,8 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow"), InterruptCtrl()
|
||||
|
||||
// connect Ethernet HW
|
||||
this->bmac = dynamic_cast<BigMac*>(gMachineObj->get_comp_by_type(HWCompType::ETHER_MAC));
|
||||
this->enet_xmit_dma = std::unique_ptr<DMAChannel> (new DMAChannel());
|
||||
this->enet_rcv_dma = std::unique_ptr<DMAChannel> (new DMAChannel());
|
||||
|
||||
// set EMMO pin status (active low)
|
||||
this->emmo_pin = GET_BIN_PROP("emmo") ^ 1;
|
||||
@ -122,6 +124,10 @@ uint32_t HeathrowIC::dma_read(uint32_t offset, int size) {
|
||||
return this->scsi_dma->reg_read(offset & 0xFF, size);
|
||||
case MIO_OHARE_DMA_FLOPPY:
|
||||
return this->floppy_dma->reg_read(offset & 0xFF, size);
|
||||
case MIO_OHARE_DMA_ETH_XMIT:
|
||||
return this->enet_xmit_dma->reg_read(offset & 0xFF, size);
|
||||
case MIO_OHARE_DMA_ETH_RCV:
|
||||
return this->enet_rcv_dma->reg_read(offset & 0xFF, size);
|
||||
case MIO_OHARE_DMA_AUDIO_OUT:
|
||||
return this->snd_out_dma->reg_read(offset & 0xFF, size);
|
||||
default:
|
||||
@ -139,6 +145,12 @@ void HeathrowIC::dma_write(uint32_t offset, uint32_t value, int size) {
|
||||
case MIO_OHARE_DMA_FLOPPY:
|
||||
this->floppy_dma->reg_write(offset & 0xFF, value, size);
|
||||
break;
|
||||
case MIO_OHARE_DMA_ETH_XMIT:
|
||||
this->enet_xmit_dma->reg_write(offset & 0xFF, value, size);
|
||||
break;
|
||||
case MIO_OHARE_DMA_ETH_RCV:
|
||||
this->enet_rcv_dma->reg_write(offset & 0xFF, value, size);
|
||||
break;
|
||||
case MIO_OHARE_DMA_AUDIO_OUT:
|
||||
this->snd_out_dma->reg_write(offset & 0xFF, value, size);
|
||||
break;
|
||||
|
@ -299,8 +299,10 @@ private:
|
||||
|
||||
// DMA channels
|
||||
std::unique_ptr<DMAChannel> scsi_dma;
|
||||
std::unique_ptr<DMAChannel> snd_out_dma;
|
||||
std::unique_ptr<DMAChannel> floppy_dma;
|
||||
std::unique_ptr<DMAChannel> enet_xmit_dma;
|
||||
std::unique_ptr<DMAChannel> enet_rcv_dma;
|
||||
std::unique_ptr<DMAChannel> snd_out_dma;
|
||||
};
|
||||
|
||||
#endif /* MACIO_H */
|
||||
|
Loading…
Reference in New Issue
Block a user