1 #ifndef _IPXE_PIT8254_H 2 #define _IPXE_PIT8254_H 13 #define PIT8254_CH_IRQ0 0 16 #define PIT8254_CH_SPKR 2 19 #define PIT8254_HZ 1193182UL 22 #define PIT8254_DATA(channel) ( 0x40 + (channel) ) 25 #define PIT8254_CMD 0x43 28 #define PIT8254_CMD_CHANNEL(channel) ( (channel) << 6 ) 31 #define PIT8254_CMD_ACCESS_LATCH 0x00 32 #define PIT8254_CMD_ACCESS_LO 0x10 33 #define PIT8254_CMD_ACCESS_HI 0x20 34 #define PIT8254_CMD_ACCESS_LOHI 0x30 37 #define PIT8254_CMD_OP_TERMINAL 0x00 38 #define PIT8254_CMD_OP_ONESHOT 0x02 39 #define PIT8254_CMD_OP_RATE 0x04 40 #define PIT8254_CMD_OP_SQUARE 0x06 41 #define PIT8254_CMD_OP_SWSTROBE 0x08 42 #define PIT8254_CMD_OP_HWSTROBE 0x0a 43 #define PIT8254_CMD_OP_RATE2 0x0c 44 #define PIT8254_CMD_OP_SQUARE2 0x0e 47 #define PIT8254_CMD_BINARY 0x00 50 #define PIT8254_CMD_BCD 0x01 53 #define PIT8254_SPKR 0x61 56 #define PIT8254_SPKR_GATE 0x01 59 #define PIT8254_SPKR_ENABLE 0x02 62 #define PIT8254_SPKR_OUT 0x20 72 pit8254_udelay (
unsigned long usecs ) {
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define PIT8254_HZ
Timer frequency (1.193182MHz)
static __attribute__((always_inline)) void pit8254_udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
void pit8254_speaker_delay(unsigned int ticks)
Delay for a fixed number of timer ticks using the speaker channel.