From c46f60ae06ce9ef5c3a4dfa3c7b3d9942c2fca66 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 14 Mar 2021 19:44:39 -0300 Subject: [PATCH] Add PCI speed control to ICS9xxx clock generators --- src/device/clock_ics9xxx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/device/clock_ics9xxx.c b/src/device/clock_ics9xxx.c index f36a7a5f1..ddca7712b 100644 --- a/src/device/clock_ics9xxx.c +++ b/src/device/clock_ics9xxx.c @@ -1050,10 +1050,11 @@ ics9xxx_set(ics9xxx_t *dev, uint8_t val) } } -#ifdef ENABLE_ICS9xxx_LOG uint16_t bus = dev->frequencies_ptr[val].bus; - ics9xxx_log("ICS9xxx: set(%d) = hw=%d bus=%d ram=%d pci=%d\n", val, hw_select, bus, bus * dev->frequencies_ptr[val].ram_mult, bus / dev->frequencies_ptr[val].pci_div); -#endif + uint32_t pci = bus / dev->frequencies_ptr[val].pci_div; + cpu_set_pci_speed(pci * 10000); + + ics9xxx_log("ICS9xxx: set(%d) = hw=%d bus=%d ram=%d pci=%d\n", val, hw_select, bus, bus * dev->frequencies_ptr[val].ram_mult, pci); }