diff options
author | Gabe Black <gabeblack@chromium.org> | 2011-07-20 18:51:25 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:09 -0700 |
commit | 8185247a2baef17fbc50ae5ce69f5cc1c8389d89 (patch) | |
tree | c765ba65f0609066e0354dba273a3a3ec00be26b /drivers/spi | |
parent | 013bc55ba5cc0ffa69e68d17358f25817d7cdcdc (diff) |
Add a dummy SPI driver so we don't have to use a real one for now.
The vboot code depends (directly or indirectly) on having SPI support built
in. This dummy implementation is so that we can get things to compile without
having to first build a real one.
BUG=chrome-os-partner:4552
TEST=Built and booted u-boot on an Alex.
Change-Id: Iea298527c641d40d51485365b65ce79d945a50c3
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://gerrit.chromium.org/gerrit/4706
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/Makefile | 4 | ||||
-rw-r--r-- | drivers/spi/dummy_spi.c | 64 |
2 files changed, 65 insertions, 3 deletions
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index a667c4976f9..19f5bb39c7d 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -39,11 +39,9 @@ COBJS-$(CONFIG_OC_TINY_SPI) += oc_tiny_spi.o COBJS-$(CONFIG_OMAP3_SPI) += omap3_spi.o COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o COBJS-$(CONFIG_SH_SPI) += sh_spi.o -<<<<<<< HEAD COBJS-$(CONFIG_FSL_ESPI) += fsl_espi.o -======= COBJS-$(CONFIG_TEGRA2_SPI) += tegra2_spi.o ->>>>>>> spi: Tegra2: Add SPI driver for SPIFLASH on Seaboard +COBJS-$(CONFIG_DUMMY_SPI) += dummy_spi.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/spi/dummy_spi.c b/drivers/spi/dummy_spi.c new file mode 100644 index 00000000000..3df5965fbd9 --- /dev/null +++ b/drivers/spi/dummy_spi.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + */ + +#include <common.h> + +#include <spi.h> + +int spi_cs_is_valid(unsigned int bus, unsigned int cs) +{ + printf("spi_cs_is_valid used but not implemented.\n"); + return 0; +} + +struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, + unsigned int max_hz, unsigned int mode) +{ + printf("spi_setup_slave used but not implemented.\n"); + return NULL; +} + +void spi_free_slave(struct spi_slave *slave) +{ + printf("spi_free_slave used but not implemented.\n"); +} + +void spi_init(void) +{ + printf("spi_init used but not implemented.\n"); +} + +int spi_claim_bus(struct spi_slave *slave) +{ + printf("spi_claim_bus used but not implemented.\n"); + return 0; +} + +void spi_release_bus(struct spi_slave *slave) +{ + printf("spi_release_bus used but not implemented.\n"); +} + +void spi_cs_activate(struct spi_slave *slave) +{ + printf("spi_cs_activate used but not implemented.\n"); +} + +void spi_cs_deactivate(struct spi_slave *slave) +{ + printf("spi_cs_deactivate used but not implemented.\n"); +} + +int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, + void *din, unsigned long flags) +{ + printf("spi_xfer used but not implemented.\n"); + return 0; +} |