From b2e465d060dafa070f140f92672cd1bf66d68f50 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 29 Aug 2014 16:34:46 -0700 Subject: danube: prepare SOC directory for urara These modules are necessary to resolve external names when building the board image. These are just skeletons for now which will be filled later. BUG=chrome-os-partner:31438 TEST=when config is enabled, emerge-urara coreboot succeeds. more extensive testing to come later Change-Id: I0fcb5d33187172ecac77041425402b33e89e8944 Signed-off-by: Patrick Georgi Original-Commit-Id: 94ec79b0ab872f5c5fe7db5bef5fdabf77d6b3b6 Original-Change-Id: I69cc178976a910ebf8031ed9ac9ad67b4cc0878a Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/215678 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/8763 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/imgtec/danube/Kconfig | 2 +- src/soc/imgtec/danube/Makefile.inc | 13 ++++++++++++- src/soc/imgtec/danube/spi.c | 35 +++++++++++++++++++++++++++++++++++ src/soc/imgtec/danube/timestamp.c | 19 +++++++++++++++++++ 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 src/soc/imgtec/danube/spi.c create mode 100644 src/soc/imgtec/danube/timestamp.c (limited to 'src/soc/imgtec/danube') 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 +#include + +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 + +uint64_t timestamp_get(void) +{ + return 0; +} -- cgit v1.2.3