summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-04-03 15:50:39 +0200
committerMartin Roth <martinroth@google.com>2017-04-06 05:09:56 +0200
commit8bd6c538741a75d89a8f5e6d08d8b1ae9b2dba07 (patch)
treee6993ee088a1e1b1cf7ea936680c4b5368d91194 /src/northbridge
parent05a6f29d32c246569b7a0561d35ccbf49eec1fb8 (diff)
downloadcoreboot-8bd6c538741a75d89a8f5e6d08d8b1ae9b2dba07.tar.xz
northbridge/via/cn700: Get rid of #include raminit.c
Using linker instead of '#include *.c'. Change-Id: Ie1bc538aa29c4f18dd6f31a83d3da58f196f2078 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/19081 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/via/cn700/Makefile.inc1
-rw-r--r--src/northbridge/via/cn700/raminit.c6
-rw-r--r--src/northbridge/via/cn700/raminit.h5
3 files changed, 11 insertions, 1 deletions
diff --git a/src/northbridge/via/cn700/Makefile.inc b/src/northbridge/via/cn700/Makefile.inc
index b6e7875099..f7f288f732 100644
--- a/src/northbridge/via/cn700/Makefile.inc
+++ b/src/northbridge/via/cn700/Makefile.inc
@@ -19,5 +19,6 @@ ifeq ($(CONFIG_NORTHBRIDGE_VIA_CN700),y)
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 9cfd952f1e..8689ec97e3 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 @@ static void sdram_enable(pci_devfn_t dev, u8 *rank_address)
/*
* 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 80e085fc6f..073b2531ba 100644
--- a/src/northbridge/via/cn700/raminit.h
+++ b/src/northbridge/via/cn700/raminit.h
@@ -24,4 +24,9 @@ struct mem_controller {
u8 channel0[DIMM_SOCKETS];
};
+void ddr_ram_setup(const struct mem_controller *ctrl);
+
+/* mainboard specific */
+int spd_read_byte(unsigned device, unsigned address);
+
#endif