808x machines with >= 8 MHz CPU speed now default to fast PIT, fixes #3776.
This commit is contained in:
@@ -168,13 +168,15 @@ pit_irq0_timer(int new_out, int old_out)
|
|||||||
void
|
void
|
||||||
machine_common_init(UNUSED(const machine_t *model))
|
machine_common_init(UNUSED(const machine_t *model))
|
||||||
{
|
{
|
||||||
|
uint8_t cpu_requires_fast_pit = is486 || (is8086 && (cpu_s->rspeed >= 8000000));
|
||||||
|
|
||||||
/* System devices first. */
|
/* System devices first. */
|
||||||
pic_init();
|
pic_init();
|
||||||
dma_init();
|
dma_init();
|
||||||
|
|
||||||
int pit_type = IS_AT(machine) ? PIT_8254 : PIT_8253;
|
int pit_type = IS_AT(machine) ? PIT_8254 : PIT_8253;
|
||||||
/* Select fast PIT if needed */
|
/* Select fast PIT if needed */
|
||||||
if (((pit_mode == -1) && is486) || (pit_mode == 1))
|
if (((pit_mode == -1) && cpu_requires_fast_pit) || (pit_mode == 1))
|
||||||
pit_type += 2;
|
pit_type += 2;
|
||||||
|
|
||||||
pit_common_init(pit_type, pit_irq0_timer, NULL);
|
pit_common_init(pit_type, pit_irq0_timer, NULL);
|
||||||
|
Reference in New Issue
Block a user