From eecb5a0f42bf6952f0f39d8c6ea18d72698ed4a1 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Thu, 11 Aug 2022 01:45:32 +0200 Subject: [PATCH] machinegossamer: add Athens I2C device. --- machines/machinegossamer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/machines/machinegossamer.cpp b/machines/machinegossamer.cpp index a7dbb50..453855d 100644 --- a/machines/machinegossamer.cpp +++ b/machines/machinegossamer.cpp @@ -25,6 +25,7 @@ along with this program. If not, see . */ #include +#include #include #include #include @@ -89,6 +90,11 @@ int initialize_gossamer(std::string& id) grackle_obj->pci_register_device( 18, dynamic_cast(gMachineObj->get_comp_by_name(gpu_name))); + // add Athens clock generator device and register it with the I2C host + gMachineObj->add_device("Athens", std::unique_ptr(new AthensClocks(0x28))); + I2CBus* i2c_bus = dynamic_cast(gMachineObj->get_comp_by_type(HWCompType::I2C_HOST)); + i2c_bus->register_device(0x28, dynamic_cast(gMachineObj->get_comp_by_name("Athens"))); + // initialize virtual CPU and request MPC750 CPU aka G3 ppc_cpu_init(grackle_obj, PPC_VER::MPC750, 16705000ULL); @@ -111,7 +117,7 @@ static vector pmg3_devices = { }; static const MachineDescription pmg3dt_descriptor = { - .name = "pmg3", + .name = "pmg3dt", .description = "Power Macintosh G3 (Beige) Desktop", .devices = pmg3_devices, .settings = gossamer_settings,