diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-11-01 10:45:51 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-11-05 14:38:52 +0000 |
commit | 00f0de3e145c34f524ab5ae403b65bfcc9493c30 (patch) | |
tree | a5aa273deebef915a99ff098e075472581eec8da /src/drivers/pc80/pc/i8254.c | |
parent | 385ea8219d2f09d3f9d2d194392cf696d4e2aed7 (diff) |
drivers/pc80: Remove UDELAY_TIMER2
Change-Id: Ibc0a5f6e7be78be15f56b252be45a288b925183a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36534
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pc80/pc/i8254.c')
-rw-r--r-- | src/drivers/pc80/pc/i8254.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/drivers/pc80/pc/i8254.c b/src/drivers/pc80/pc/i8254.c index 654f84a6d7..5090f0c85b 100644 --- a/src/drivers/pc80/pc/i8254.c +++ b/src/drivers/pc80/pc/i8254.c @@ -32,24 +32,6 @@ void setup_i8254(void) outb(0x12, TIMER1_PORT); } -#if CONFIG(UDELAY_TIMER2) -static void load_timer2(unsigned int ticks) -{ - /* Set up the timer gate, turn off the speaker */ - outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); - outb(TIMER2_SEL | WORD_ACCESS | MODE0 | BINARY_COUNT, TIMER_MODE_PORT); - outb(ticks & 0xFF, TIMER2_PORT); - outb(ticks >> 8, TIMER2_PORT); -} - -void udelay(int usecs) -{ - load_timer2((usecs * TICKS_PER_MS) / 1000); - while ((inb(PPC_PORTB) & PPCB_T2OUT) == 0) - ; -} -#endif - #define CLOCK_TICK_RATE 1193180U /* Underlying HZ */ /* ------ Calibrate the TSC ------- |