diff options
author | Allen Martin <amartin@nvidia.com> | 2013-03-16 22:58:04 +0400 |
---|---|---|
committer | Tom Warren <twarren@nvidia.com> | 2013-03-25 20:56:05 +0400 |
commit | 2a3c5bc29c621faf2f830c464cc395b3174800f1 (patch) | |
tree | 816d158136ee7ceb48560329ab4160b7cc99516a /drivers/spi/tegra20_sflash.c | |
parent | ff1da6fb5fe50ac15dd988e81a782a4599102424 (diff) | |
download | u-boot-2a3c5bc29c621faf2f830c464cc395b3174800f1.tar.xz |
tegra: spi: remove non fdt support
Remove non fdt support from tegra20 and tegra30 SPI drivers in
preparation of new common fdt based SPI driver front end.
Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/spi/tegra20_sflash.c')
-rw-r--r-- | drivers/spi/tegra20_sflash.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index c6af30f0d6..3b1b6f8928 100644 --- a/drivers/spi/tegra20_sflash.c +++ b/drivers/spi/tegra20_sflash.c @@ -61,6 +61,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, unsigned int max_hz, unsigned int mode) { struct tegra_spi_slave *spi; + int node; if (!spi_cs_is_valid(bus, cs)) { printf("SPI error: unsupported bus %d / chip select %d\n", @@ -81,9 +82,9 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, } spi->slave.bus = bus; spi->slave.cs = cs; -#ifdef CONFIG_OF_CONTROL - int node = fdtdec_next_compatible(gd->fdt_blob, 0, - COMPAT_NVIDIA_TEGRA20_SFLASH); + + node = fdtdec_next_compatible(gd->fdt_blob, 0, + COMPAT_NVIDIA_TEGRA20_SFLASH); if (node < 0) { debug("%s: cannot locate sflash node\n", __func__); return NULL; @@ -108,11 +109,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, debug("%s: could not decode periph id\n", __func__); return NULL; } -#else - spi->regs = (struct spi_tegra *)NV_PA_SPI_BASE; - spi->freq = TEGRA_SPI_MAX_FREQ; - spi->periph_id = PERIPH_ID_SPI1; -#endif if (max_hz < spi->freq) { debug("%s: limiting frequency from %u to %u\n", __func__, spi->freq, max_hz); |