aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/pc80/i8254.h5
-rw-r--r--src/pc80/Makefile.inc1
-rw-r--r--src/pc80/i8254.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/include/pc80/i8254.h b/src/include/pc80/i8254.h
index 82f31e6ff3..4c5e7039ce 100644
--- a/src/include/pc80/i8254.h
+++ b/src/include/pc80/i8254.h
@@ -20,8 +20,6 @@
#ifndef PC80_I8254_H
#define PC80_I8254_H
-void setup_i8254(void);
-
/* Ports for the 8254 timer chip */
#define TIMER0_PORT 0x40
#define TIMER1_PORT 0x41
@@ -60,4 +58,7 @@ void setup_i8254(void);
#define PPCB_SPKR 0x02 /* Bit 1 */
#define PPCB_T2GATE 0x01 /* Bit 0 */
+#ifndef __ROMCC__
+void setup_i8254(void);
+#endif
#endif
diff --git a/src/pc80/Makefile.inc b/src/pc80/Makefile.inc
index 4f126f681d..2c8a80ee15 100644
--- a/src/pc80/Makefile.inc
+++ b/src/pc80/Makefile.inc
@@ -1,5 +1,6 @@
ramstage-y += mc146818rtc.c
ramstage-y += isa-dma.c
+ramstage-y += i8254.c
ramstage-y += i8259.c
ramstage-$(CONFIG_UDELAY_IO) += udelay_io.c
ramstage-y += keyboard.c
diff --git a/src/pc80/i8254.c b/src/pc80/i8254.c
index ca993f494c..f75216da47 100644
--- a/src/pc80/i8254.c
+++ b/src/pc80/i8254.c
@@ -35,7 +35,7 @@ void setup_i8254(void)
outb(0x12, TIMER1_PORT);
}
-#if CONFIG_UDELAY_TIMER2
+#if defined(CONFIG_UDELAY_TIMER2) && CONFIG_UDELAY_TIMER2
static void load_timer2(unsigned int ticks)
{
/* Set up the timer gate, turn off the speaker */