mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-23 21:29:28 +00:00
macio: self-registration with the device registry.
This commit is contained in:
parent
ca51c34157
commit
9056d53474
@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/scsi/sc53c94.h>
|
||||
#include <devices/ethernet/mace.h>
|
||||
#include <devices/floppy/swim3.h>
|
||||
@ -270,3 +271,13 @@ void GrandCentral::ack_dma_int(uint32_t irq_id, uint8_t irq_line_state)
|
||||
{
|
||||
ABORT_F("GC: ack_dma_int() not implemened");
|
||||
}
|
||||
|
||||
static const vector<string> GCSubdevices = {
|
||||
"Swim3", "Escc"
|
||||
};
|
||||
|
||||
static const DeviceDescription GC_Descriptor = {
|
||||
GrandCentral::create, GCSubdevices, {}
|
||||
};
|
||||
|
||||
REGISTER_DEVICE(GrandCentral, GC_Descriptor);
|
||||
|
@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <cpu/ppc/ppcemu.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/common/dbdma.h>
|
||||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/viacuda.h>
|
||||
@ -356,3 +357,13 @@ void HeathrowIC::ack_int(uint32_t irq_id, uint8_t irq_line_state)
|
||||
void HeathrowIC::ack_dma_int(uint32_t irq_id, uint8_t irq_line_state)
|
||||
{
|
||||
}
|
||||
|
||||
static const vector<string> Heathrow_Subdevices = {
|
||||
"Swim3", "Escc"
|
||||
};
|
||||
|
||||
static const DeviceDescription Heathrow_Descriptor = {
|
||||
HeathrowIC::create, Heathrow_Subdevices, {}
|
||||
};
|
||||
|
||||
REGISTER_DEVICE(Heathrow, Heathrow_Descriptor);
|
||||
|
@ -89,6 +89,10 @@ public:
|
||||
GrandCentral();
|
||||
~GrandCentral() = default;
|
||||
|
||||
static std::unique_ptr<HWComponent> create() {
|
||||
return std::unique_ptr<GrandCentral>(new GrandCentral());
|
||||
}
|
||||
|
||||
// MMIO device methods
|
||||
uint32_t read(uint32_t reg_start, uint32_t offset, int size);
|
||||
void write(uint32_t reg_start, uint32_t offset, uint32_t value, int size);
|
||||
@ -153,6 +157,10 @@ public:
|
||||
HeathrowIC();
|
||||
~HeathrowIC() = default;
|
||||
|
||||
static std::unique_ptr<HWComponent> create() {
|
||||
return std::unique_ptr<HeathrowIC>(new HeathrowIC());
|
||||
}
|
||||
|
||||
// MMIO device methods
|
||||
uint32_t read(uint32_t reg_start, uint32_t offset, int size);
|
||||
void write(uint32_t reg_start, uint32_t offset, uint32_t value, int size);
|
||||
|
Loading…
Reference in New Issue
Block a user