Author: hailfinger
Date: 2008-10-17 02:06:50 +0200 (Fri, 17 Oct 2008)
New Revision: 3664
Modified:
trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r.h
trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
Log:
ROMCC chokes on vt8237_early_network_init(). Since that function is only
called from one target and that target is compiled with GCC, make the
function dependent on GCC.
ROMCC also chokes on the ULL suffix for integer constants. Change the
affected ones to UL for ROMCC compiled code.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Modified: trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r.h
===================================================================
--- trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r.h 2008-10-16 23:44:21 UTC (rev 3663)
+++ trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r.h 2008-10-17 00:06:50 UTC (rev 3664)
@@ -29,7 +29,11 @@
#define VT8237R_SMBUS_IO_BASE 0x400
/* 0x0 disabled, 0x2 reserved, 0xf = IRQ15 */
#define VT8237R_ACPI_IRQ 0x9
+#if defined(__GNUC__)
#define VT8237S_SPI_MEM_BASE 0xfed02000ULL
+#else
+#define VT8237S_SPI_MEM_BASE 0xfed02000UL
+#endif
#define VT8237R_HPET_ADDR 0xfed00000ULL
#define VT8237R_APIC_BASE 0xfec00000ULL
Modified: trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c
===================================================================
--- trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c 2008-10-16 23:44:21 UTC (rev 3663)
+++ trunk/coreboot-v2/src/southbridge/via/vt8237r/vt8237r_early_smbus.c 2008-10-17 00:06:50 UTC (rev 3664)
@@ -359,6 +359,11 @@
(*spireg) &= 0xff00;
}
+/* This #if is special. ROMCC chokes on the (rom == NULL) comparison.
+ * Since the whole function is only called for one target and that target
+ * is compiled with GCC, hide the function from ROMCC and be happy.
+ */
+#if defined(__GNUC__)
/*
* Offset 0x58:
* 31:20 reserved
@@ -481,3 +486,4 @@
/* We are done, config will be used after PCIRST#. */
return 1;
}
+#endif