#include <common.h>
#include <asm/io.h>
#include <asm/i8254.h>
+#include <asm/ibmpc.h>
#define TIMER1_VALUE 18 /* 15.6us */
#define BEEP_FREQUENCY_HZ 440
if (!frequency_hz)
return -EINVAL;
+ /* make sure i8254 is setup correctly before generating beeps */
+ outb(PIT_CMD_CTR2 | PIT_CMD_BOTH | PIT_CMD_MODE3,
+ PIT_BASE + PIT_COMMAND);
+
i8254_set_beep_freq(frequency_hz);
setio_8(SYSCTL_PORTB, PORTB_BEEP_ENABLE);