[coreboot-gerrit] Change in coreboot[master]: northbridge/via/cn700: Get rid of #include raminit.c
Martin Roth (Code Review)
gerrit at coreboot.org
Thu Apr 6 05:10:01 CEST 2017
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/19081 )
Change subject: northbridge/via/cn700: Get rid of #include raminit.c
......................................................................
northbridge/via/cn700: Get rid of #include raminit.c
Using linker instead of '#include *.c'.
Change-Id: Ie1bc538aa29c4f18dd6f31a83d3da58f196f2078
Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
Reviewed-on: https://review.coreboot.org/19081
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/mainboard/bcom/winnetp680/romstage.c
M src/mainboard/jetway/j7f2/romstage.c
M src/mainboard/via/epia-cn/romstage.c
M src/mainboard/via/pc2500e/romstage.c
M src/northbridge/via/cn700/Makefile.inc
M src/northbridge/via/cn700/raminit.c
M src/northbridge/via/cn700/raminit.h
7 files changed, 15 insertions(+), 13 deletions(-)
Approvals:
Arthur Heymans: Looks good to me, approved
Paul Menzel: Looks good to me, but someone else must approve
build bot (Jenkins): Verified
diff --git a/src/mainboard/bcom/winnetp680/romstage.c b/src/mainboard/bcom/winnetp680/romstage.c
index 5f6f29a..0c56074 100644
--- a/src/mainboard/bcom/winnetp680/romstage.c
+++ b/src/mainboard/bcom/winnetp680/romstage.c
@@ -33,12 +33,10 @@
#define SERIAL_DEV PNP_DEV(0x2e, W83697HF_SP1)
-static inline int spd_read_byte(unsigned device, unsigned address)
+int spd_read_byte(unsigned device, unsigned address)
{
return smbus_read_byte(device, address);
}
-
-#include "northbridge/via/cn700/raminit.c"
static void enable_mainboard_devices(void)
{
diff --git a/src/mainboard/jetway/j7f2/romstage.c b/src/mainboard/jetway/j7f2/romstage.c
index d479072..393f5e6 100644
--- a/src/mainboard/jetway/j7f2/romstage.c
+++ b/src/mainboard/jetway/j7f2/romstage.c
@@ -37,12 +37,10 @@
#define SERIAL_DEV PNP_DEV(0x2e, F71805F_SP1)
#endif
-static inline int spd_read_byte(unsigned device, unsigned address)
+int spd_read_byte(unsigned device, unsigned address)
{
return smbus_read_byte(device, address);
}
-
-#include "northbridge/via/cn700/raminit.c"
static void enable_mainboard_devices(void)
{
diff --git a/src/mainboard/via/epia-cn/romstage.c b/src/mainboard/via/epia-cn/romstage.c
index 3ecb97b..5293aa6 100644
--- a/src/mainboard/via/epia-cn/romstage.c
+++ b/src/mainboard/via/epia-cn/romstage.c
@@ -30,12 +30,10 @@
#include "southbridge/via/vt8237r/early_serial.c"
#include <spd.h>
-static inline int spd_read_byte(unsigned device, unsigned address)
+int spd_read_byte(unsigned device, unsigned address)
{
return smbus_read_byte(device, address);
}
-
-#include "northbridge/via/cn700/raminit.c"
static void enable_mainboard_devices(void)
{
diff --git a/src/mainboard/via/pc2500e/romstage.c b/src/mainboard/via/pc2500e/romstage.c
index 7d12e87..2f002be 100644
--- a/src/mainboard/via/pc2500e/romstage.c
+++ b/src/mainboard/via/pc2500e/romstage.c
@@ -33,12 +33,10 @@
#define SERIAL_DEV PNP_DEV(0x2e, IT8716F_SP1)
-static int spd_read_byte(u16 device, u16 address)
+int spd_read_byte(unsigned device, unsigned address)
{
return smbus_read_byte(device, address);
}
-
-#include "northbridge/via/cn700/raminit.c"
static const struct mem_controller ctrl = {
.d0f0 = 0x0000,
diff --git a/src/northbridge/via/cn700/Makefile.inc b/src/northbridge/via/cn700/Makefile.inc
index b6e7875..f7f288f 100644
--- a/src/northbridge/via/cn700/Makefile.inc
+++ b/src/northbridge/via/cn700/Makefile.inc
@@ -19,5 +19,6 @@
ramstage-y += northbridge.c
ramstage-y += agp.c
ramstage-y += vga.c
+romstage-y += raminit.c
endif
diff --git a/src/northbridge/via/cn700/raminit.c b/src/northbridge/via/cn700/raminit.c
index 9cfd952..8689ec9 100644
--- a/src/northbridge/via/cn700/raminit.c
+++ b/src/northbridge/via/cn700/raminit.c
@@ -16,6 +16,10 @@
* GNU General Public License for more details.
*/
+#include <stdint.h>
+#include <arch/io.h>
+#include <northbridge/via/cn700/raminit.h>
+#include <console/console.h>
#include <spd.h>
#include <delay.h>
#include "cn700.h"
@@ -446,7 +450,7 @@
/*
* Support one DIMM with up to 2 ranks.
*/
-static void ddr_ram_setup(const struct mem_controller *ctrl)
+void ddr_ram_setup(const struct mem_controller *ctrl)
{
u8 reg;
diff --git a/src/northbridge/via/cn700/raminit.h b/src/northbridge/via/cn700/raminit.h
index 80e085f..073b253 100644
--- a/src/northbridge/via/cn700/raminit.h
+++ b/src/northbridge/via/cn700/raminit.h
@@ -24,4 +24,9 @@
u8 channel0[DIMM_SOCKETS];
};
+void ddr_ram_setup(const struct mem_controller *ctrl);
+
+/* mainboard specific */
+int spd_read_byte(unsigned device, unsigned address);
+
#endif
--
To view, visit https://review.coreboot.org/19081
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1bc538aa29c4f18dd6f31a83d3da58f196f2078
Gerrit-PatchSet: 3
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Lubomir Rintel <lkundrak at v3.sk>
Gerrit-Reviewer: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins)
More information about the coreboot-gerrit
mailing list