summaryrefslogtreecommitdiff
path: root/src/soc/imgtec
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/imgtec')
-rw-r--r--src/soc/imgtec/danube/Kconfig2
-rw-r--r--src/soc/imgtec/danube/Makefile.inc13
-rw-r--r--src/soc/imgtec/danube/spi.c35
-rw-r--r--src/soc/imgtec/danube/timestamp.c19
4 files changed, 67 insertions, 2 deletions
diff --git a/src/soc/imgtec/danube/Kconfig b/src/soc/imgtec/danube/Kconfig
index df2b685baa..0e3c629fef 100644
--- a/src/soc/imgtec/danube/Kconfig
+++ b/src/soc/imgtec/danube/Kconfig
@@ -20,7 +20,7 @@
#
config CPU_IMGTEC_DANUBE
- select CPU_MIPS32R2
+ select CPU_MIPS
select DYNAMIC_CBMEM
select HAVE_UART_MEMORY_MAPPED
select HAVE_UART_SPECIAL
diff --git a/src/soc/imgtec/danube/Makefile.inc b/src/soc/imgtec/danube/Makefile.inc
index 74822de82d..d7628ede51 100644
--- a/src/soc/imgtec/danube/Makefile.inc
+++ b/src/soc/imgtec/danube/Makefile.inc
@@ -19,14 +19,24 @@
# MA 02110-1301 USA
#
+# We enable CBFS_SPI_WRAPPER for Danuibe targets.
+bootblock-y += spi.c
+romstage-y += spi.c
+ramstage-y += spi.c
+
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
romstage-y += uart.c
ramstage-y += uart.c
endif
-romstage-y += cbmem.c
+bootblock-y += timestamp.c
+
ramstage-y += cbmem.c
+ramstage-y += timestamp.c
+
+romstage-y += cbmem.c
+romstage-y += timestamp.c
# Generate the actual coreboot bootblock code
$(objcbfs)/bootblock.raw: $(objcbfs)/bootblock.elf
@@ -38,3 +48,4 @@ $(objcbfs)/bootblock.raw: $(objcbfs)/bootblock.elf
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw $(BIMGTOOL)
@printf " BIMGTOOL $(subst $(obj)/,,$(@))\n"
$(BIMGTOOL) $< $@ $(CONFIG_BOOTBLOCK_BASE)
+
diff --git a/src/soc/imgtec/danube/spi.c b/src/soc/imgtec/danube/spi.c
new file mode 100644
index 0000000000..95bf8272a8
--- /dev/null
+++ b/src/soc/imgtec/danube/spi.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2014 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <stddef.h>
+#include <spi-generic.h>
+
+struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs)
+{
+ return NULL;
+}
+
+int spi_claim_bus(struct spi_slave *slave)
+{
+ return 0;
+}
+
+void spi_release_bus(struct spi_slave *slave)
+{
+}
+
+int spi_xfer(struct spi_slave *slave, const void *dout,
+ unsigned out_bytes, void *din, unsigned in_bytes)
+{
+ return 0;
+}
diff --git a/src/soc/imgtec/danube/timestamp.c b/src/soc/imgtec/danube/timestamp.c
new file mode 100644
index 0000000000..f0dc5ad9cb
--- /dev/null
+++ b/src/soc/imgtec/danube/timestamp.c
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2014 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <timestamp.h>
+
+uint64_t timestamp_get(void)
+{
+ return 0;
+}