[coreboot-gerrit] Patch set updated for coreboot: 5a0e3d1 drivers/pc80: Avoid include of .c

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Wed Apr 9 08:07:11 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5480

-gerrit

commit 5a0e3d147ec2172af9b41fc4744a4ff7daa44c74
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Wed Apr 9 15:46:37 2014 +1000

    drivers/pc80: Avoid include of .c
    
    Avoid #including .c files from pc80 driver.
    
    Change-Id: Ifc2d053923ea0f5e64a95b011c27a3b8f628017e
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/drivers/pc80/Makefile.inc                   | 3 +++
 src/drivers/pc80/i8259.c                        | 4 +---
 src/include/pc80/i8254.h                        | 4 +++-
 src/include/pc80/i8259.h                        | 1 +
 src/mainboard/amd/dinar/romstage.c              | 4 ++--
 src/mainboard/amd/inagua/romstage.c             | 4 ++--
 src/mainboard/amd/olivehill/romstage.c          | 4 ++--
 src/mainboard/amd/parmer/romstage.c             | 4 ++--
 src/mainboard/amd/persimmon/romstage.c          | 4 ++--
 src/mainboard/amd/thatcher/romstage.c           | 4 ++--
 src/mainboard/amd/torpedo/romstage.c            | 4 ++--
 src/mainboard/asrock/e350m1/romstage.c          | 4 ++--
 src/mainboard/asrock/imb-a180/romstage.c        | 4 ++--
 src/mainboard/asus/f2a85-m/romstage.c           | 4 ++--
 src/mainboard/dmp/vortex86ex/romstage.c         | 2 ++
 src/mainboard/gizmosphere/gizmo/romstage.c      | 4 ++--
 src/mainboard/hp/pavilion_m6_1035dx/romstage.c  | 5 ++---
 src/mainboard/jetway/nf81-t56n-lf/romstage.c    | 5 ++---
 src/mainboard/lippert/frontrunner-af/romstage.c | 4 ++--
 src/mainboard/lippert/toucan-af/romstage.c      | 4 ++--
 src/mainboard/supermicro/h8scm/romstage.c       | 4 ++--
 src/mainboard/tyan/s8226/romstage.c             | 4 ++--
 22 files changed, 44 insertions(+), 40 deletions(-)

diff --git a/src/drivers/pc80/Makefile.inc b/src/drivers/pc80/Makefile.inc
index 4d0a280..b2f6035 100644
--- a/src/drivers/pc80/Makefile.inc
+++ b/src/drivers/pc80/Makefile.inc
@@ -6,6 +6,9 @@ ramstage-$(CONFIG_UDELAY_IO) += udelay_io.c
 ramstage-y += keyboard.c
 ramstage-$(CONFIG_SPKMODEM) += spkmodem.c
 
+romstage-y += i8254.c
+romstage-y += i8259.c
+
 romstage-$(CONFIG_USE_OPTION_TABLE) += mc146818rtc_early.c
 romstage-$(CONFIG_TPM) += tpm.c
 romstage-$(CONFIG_SPKMODEM) += spkmodem.c
diff --git a/src/drivers/pc80/i8259.c b/src/drivers/pc80/i8259.c
index 6f97c56..1525055 100644
--- a/src/drivers/pc80/i8259.c
+++ b/src/drivers/pc80/i8259.c
@@ -135,7 +135,5 @@ void i8259_configure_irq_trigger(int int_num, int is_level_triggered)
 		printk(BIOS_ERR, "%s: higher order bits are wrong: want 0x%x, got 0x%x\n",
 				__func__, (int_bits>>8), inb(ELCR2));
 	}
-#endif
+#endif /* PARANOID_IRQ_TRIGGERS */
 }
-
-
diff --git a/src/include/pc80/i8254.h b/src/include/pc80/i8254.h
index f4f0dca..22fb2e5 100644
--- a/src/include/pc80/i8254.h
+++ b/src/include/pc80/i8254.h
@@ -58,5 +58,7 @@
 #define PPCB_SPKR       0x02    /* Bit 1 */
 #define PPCB_T2GATE     0x01    /* Bit 0 */
 
+/* Initialize i8254 timers */
 void setup_i8254(void);
-#endif
+
+#endif /* PC80_I8254_H */
diff --git a/src/include/pc80/i8259.h b/src/include/pc80/i8259.h
index 7e99e4b..56a09d6 100644
--- a/src/include/pc80/i8259.h
+++ b/src/include/pc80/i8259.h
@@ -20,6 +20,7 @@
 #ifndef PC80_I8259_H
 #define PC80_I8259_H
 
+/* Initialize i8259 pic */
 void setup_i8259(void);
 
 #define IRQ_LEVEL_TRIGGERED	1
diff --git a/src/mainboard/amd/dinar/romstage.c b/src/mainboard/amd/dinar/romstage.c
index 91b385f..d5fd445 100644
--- a/src/mainboard/amd/dinar/romstage.c
+++ b/src/mainboard/amd/dinar/romstage.c
@@ -31,8 +31,8 @@
 #include "superio/smsc/sch4037/sch4037_early_init.c"
 #include "superio/smsc/sio1036/sio1036_early_init.c"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "nb_cimx.h"
 #include <sb_cimx.h>
 #include "Platform.h"
diff --git a/src/mainboard/amd/inagua/romstage.c b/src/mainboard/amd/inagua/romstage.c
index 718d2b2..db99ed3 100644
--- a/src/mainboard/amd/inagua/romstage.c
+++ b/src/mainboard/amd/inagua/romstage.c
@@ -34,8 +34,8 @@
 #include "cpu/x86/bist.h"
 #include "superio/smsc/kbc1100/kbc1100_early_init.c"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
 
diff --git a/src/mainboard/amd/olivehill/romstage.c b/src/mainboard/amd/olivehill/romstage.c
index 9431d4a..344151f 100644
--- a/src/mainboard/amd/olivehill/romstage.c
+++ b/src/mainboard/amd/olivehill/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/lapic.h"
 #include "southbridge/amd/agesa/hudson/hudson.h"
 #include "cpu/amd/agesa/s3_resume.h"
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "cbmem.h"
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
diff --git a/src/mainboard/amd/parmer/romstage.c b/src/mainboard/amd/parmer/romstage.c
index 202442c..ea11ed3 100644
--- a/src/mainboard/amd/parmer/romstage.c
+++ b/src/mainboard/amd/parmer/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/lapic.h"
 #include "southbridge/amd/agesa/hudson/hudson.h"
 #include "cpu/amd/agesa/s3_resume.h"
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "cbmem.h"
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
diff --git a/src/mainboard/amd/persimmon/romstage.c b/src/mainboard/amd/persimmon/romstage.c
index e082f60..48aec4f 100644
--- a/src/mainboard/amd/persimmon/romstage.c
+++ b/src/mainboard/amd/persimmon/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/bist.h"
 #include <superio/fintek/f81865f/f81865f.h>
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <cpu/x86/cache.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
diff --git a/src/mainboard/amd/thatcher/romstage.c b/src/mainboard/amd/thatcher/romstage.c
index 6bf8ac6..d4c5641 100644
--- a/src/mainboard/amd/thatcher/romstage.c
+++ b/src/mainboard/amd/thatcher/romstage.c
@@ -34,8 +34,8 @@
 #include "southbridge/amd/agesa/hudson/hudson.h"
 #include "src/superio/smsc/lpc47n217/early_serial.c"
 #include "cpu/amd/agesa/s3_resume.h"
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "cbmem.h"
 
 #define SERIAL_DEV PNP_DEV(0x2e, LPC47N217_SP1)
diff --git a/src/mainboard/amd/torpedo/romstage.c b/src/mainboard/amd/torpedo/romstage.c
index f6204b9..53ac5d6 100644
--- a/src/mainboard/amd/torpedo/romstage.c
+++ b/src/mainboard/amd/torpedo/romstage.c
@@ -31,8 +31,8 @@
 #include "cpu/x86/bist.h"
 #include "superio/smsc/kbc1100/kbc1100_early_init.c"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "sb_cimx.h"
 #include "SbPlatform.h"
 #include <arch/cpu.h>
diff --git a/src/mainboard/asrock/e350m1/romstage.c b/src/mainboard/asrock/e350m1/romstage.c
index bf850a3..c3905d0 100644
--- a/src/mainboard/asrock/e350m1/romstage.c
+++ b/src/mainboard/asrock/e350m1/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/bist.h"
 #include "superio/winbond/w83627hf/early_serial.c"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
 
diff --git a/src/mainboard/asrock/imb-a180/romstage.c b/src/mainboard/asrock/imb-a180/romstage.c
index 9b069b7..9ab07f2 100644
--- a/src/mainboard/asrock/imb-a180/romstage.c
+++ b/src/mainboard/asrock/imb-a180/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/lapic.h"
 #include "southbridge/amd/agesa/hudson/hudson.h"
 #include "cpu/amd/agesa/s3_resume.h"
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "cbmem.h"
 #include "superio/winbond/w83627uhg/early_serial.c"
 
diff --git a/src/mainboard/asus/f2a85-m/romstage.c b/src/mainboard/asus/f2a85-m/romstage.c
index bc7546c..bac9453 100644
--- a/src/mainboard/asus/f2a85-m/romstage.c
+++ b/src/mainboard/asus/f2a85-m/romstage.c
@@ -35,9 +35,9 @@
 #include <southbridge/amd/agesa/hudson/smbus.h>
 #include <stdint.h>
 #include <string.h>
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 /* TODO: remove .c includes */
-#include <drivers/pc80/i8254.c>
-#include <drivers/pc80/i8259.c>
 #include <superio/ite/it8712f/early_serial.c>
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
diff --git a/src/mainboard/dmp/vortex86ex/romstage.c b/src/mainboard/dmp/vortex86ex/romstage.c
index 8889015..bfc8869 100644
--- a/src/mainboard/dmp/vortex86ex/romstage.c
+++ b/src/mainboard/dmp/vortex86ex/romstage.c
@@ -23,7 +23,9 @@
 #include <stdlib.h>
 #include <console/console.h>
 #include <cpu/x86/cache.h>
+/* FIXME: ROMCC board */
 #include "drivers/pc80/i8254.c"
+/* #include <pc80/i8254.h> */
 #include "northbridge/dmp/vortex86ex/northbridge.h"
 #include "southbridge/dmp/vortex86ex/southbridge.h"
 #include "northbridge/dmp/vortex86ex/raminit.c"
diff --git a/src/mainboard/gizmosphere/gizmo/romstage.c b/src/mainboard/gizmosphere/gizmo/romstage.c
index 705d429..52fc7d9 100755
--- a/src/mainboard/gizmosphere/gizmo/romstage.c
+++ b/src/mainboard/gizmosphere/gizmo/romstage.c
@@ -32,8 +32,8 @@
 #include <cpu/x86/mtrr.h>
 #include "agesawrapper.h"
 #include "cpu/x86/bist.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <cpu/x86/cache.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/romstage.c b/src/mainboard/hp/pavilion_m6_1035dx/romstage.c
index dd19679..9869803 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/romstage.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/romstage.c
@@ -33,9 +33,8 @@
 #include <string.h>
 #include <southbridge/amd/agesa/hudson/hudson.h>
 
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
-
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
 void disable_cache_as_ram(void);
diff --git a/src/mainboard/jetway/nf81-t56n-lf/romstage.c b/src/mainboard/jetway/nf81-t56n-lf/romstage.c
index 846d5c7..aa0b9fb 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/romstage.c
+++ b/src/mainboard/jetway/nf81-t56n-lf/romstage.c
@@ -42,9 +42,8 @@
 #include <southbridge/amd/cimx/sb800/SBPLATFORM.h>
 #include "superio/fintek/f71869ad/f71869ad.h"
 
-/* FIXME: should not include .c files */
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 
 void disable_cache_as_ram(void); /* cache_as_ram.inc */
 void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx);
diff --git a/src/mainboard/lippert/frontrunner-af/romstage.c b/src/mainboard/lippert/frontrunner-af/romstage.c
index 9ecd087..748b1e0 100644
--- a/src/mainboard/lippert/frontrunner-af/romstage.c
+++ b/src/mainboard/lippert/frontrunner-af/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/bist.h"
 #include "superio/smsc/smscsuperio/early_serial.c"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <cpu/x86/cache.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
diff --git a/src/mainboard/lippert/toucan-af/romstage.c b/src/mainboard/lippert/toucan-af/romstage.c
index 4f62268..ef4588f 100644
--- a/src/mainboard/lippert/toucan-af/romstage.c
+++ b/src/mainboard/lippert/toucan-af/romstage.c
@@ -33,8 +33,8 @@
 #include "cpu/x86/bist.h"
 #include "superio/winbond/w83627dhg/w83627dhg.h"
 #include "cpu/x86/lapic.h"
-#include "drivers/pc80/i8254.c"
-#include "drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include <cpu/x86/cache.h>
 #include <sb_cimx.h>
 #include "SBPLATFORM.h"
diff --git a/src/mainboard/supermicro/h8scm/romstage.c b/src/mainboard/supermicro/h8scm/romstage.c
index 9ee1dfa..cb0939a 100644
--- a/src/mainboard/supermicro/h8scm/romstage.c
+++ b/src/mainboard/supermicro/h8scm/romstage.c
@@ -30,8 +30,8 @@
 #include "northbridge/amd/agesa/family10/reset_test.h"
 #include <nb_cimx.h>
 #include <sb_cimx.h>
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 #include "superio/nuvoton/wpcm450/wpcm450.h"
 #include "superio/winbond/w83627dhg/w83627dhg.h"
 
diff --git a/src/mainboard/tyan/s8226/romstage.c b/src/mainboard/tyan/s8226/romstage.c
index a6c33e8..42596ff 100644
--- a/src/mainboard/tyan/s8226/romstage.c
+++ b/src/mainboard/tyan/s8226/romstage.c
@@ -32,8 +32,8 @@
 #include <sb_cimx.h>
 #include "superio/nuvoton/wpcm450/wpcm450.h"
 #include "superio/winbond/w83627dhg/w83627dhg.h"
-#include "src/drivers/pc80/i8254.c"
-#include "src/drivers/pc80/i8259.c"
+#include <pc80/i8254.h>
+#include <pc80/i8259.h>
 
 extern void disable_cache_as_ram(void); /* cache_as_ram.inc */
 



More information about the coreboot-gerrit mailing list