[coreboot-gerrit] Change in coreboot[master]: sifive/fu540: add empty sdram init and size functions

Philipp Hug (Code Review) gerrit at coreboot.org
Thu Jul 12 00:15:30 CEST 2018


Philipp Hug has uploaded this change for review. ( https://review.coreboot.org/27438


Change subject: sifive/fu540: add empty sdram init and size functions
......................................................................

sifive/fu540: add empty sdram init and size functions

Change-Id: I65f900a3277bc8a4a83ebc8883d4a325bd690bf8
---
M src/soc/sifive/fu540/Makefile.inc
A src/soc/sifive/fu540/include/soc/sdram.h
A src/soc/sifive/fu540/sdram.c
3 files changed, 59 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/27438/1

diff --git a/src/soc/sifive/fu540/Makefile.inc b/src/soc/sifive/fu540/Makefile.inc
index 8a2f3a6..9e7f584 100644
--- a/src/soc/sifive/fu540/Makefile.inc
+++ b/src/soc/sifive/fu540/Makefile.inc
@@ -19,9 +19,11 @@
 
 romstage-y += uart.c
 romstage-y += media.c
+romstage-y += sdram.c
 
 ramstage-y += uart.c
 ramstage-y += media.c
+ramstage-y += sdram.c
 ramstage-y += cbmem.c
 
 CPPFLAGS_common += -Isrc/soc/sifive/fu540/include
diff --git a/src/soc/sifive/fu540/include/soc/sdram.h b/src/soc/sifive/fu540/include/soc/sdram.h
new file mode 100644
index 0000000..8610a7e
--- /dev/null
+++ b/src/soc/sifive/fu540/include/soc/sdram.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Philipp Hug <philipp at hug.cx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __SOC_SIFIVE_FU540_SDRAM_H__
+#define __SOC_SIFIVE_FU540_SDRAM_H__
+
+#include <types.h>
+
+void sdram_init(void);
+size_t sdram_size_mb(void);
+
+#endif
diff --git a/src/soc/sifive/fu540/sdram.c b/src/soc/sifive/fu540/sdram.c
new file mode 100644
index 0000000..1ad36da
--- /dev/null
+++ b/src/soc/sifive/fu540/sdram.c
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Philipp Hug <philipp at hug.cx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <soc/sdram.h>
+
+void sdram_init(void)
+{
+	// TODO: implement
+}
+
+size_t sdram_size_mb(void)
+{
+	static size_t size_mb = 0;
+
+	if (!size_mb) {
+		// TODO: implement
+		size_mb = 8 * 1024;
+	}
+
+	return size_mb;
+}

-- 
To view, visit https://review.coreboot.org/27438
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65f900a3277bc8a4a83ebc8883d4a325bd690bf8
Gerrit-Change-Number: 27438
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Hug <philipp at hug.cx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180711/64a803c5/attachment.html>


More information about the coreboot-gerrit mailing list