[U-Boot] [PATCH 02/34] spi: Remove used spi_init

Jagan Teki
2018-11-20T12:47:42Z

spi_init used in some areas in tree, but the respective
drivers will remove in future patches.

So remove the same instances.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
common/board_f.c | 1 -
doc/driver-model/spi-howto.txt | 5 -----
examples/standalone/atmel_df_pow2.c | 2 --
include/_exports.h | 2 --
4 files changed, 10 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index f1a1432d86..27c27803cc 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -262,7 +262,6 @@ __weak int init_func_vid(void)
static int init_func_spi(void)
{
puts("SPI: ");
- spi_init();
puts("ready\n");
return 0;
}
diff --git a/doc/driver-model/spi-howto.txt b/doc/driver-model/spi-howto.txt
index 1955ffe284..38c26f642b 100644
--- a/doc/driver-model/spi-howto.txt
+++ b/doc/driver-model/spi-howto.txt
@@ -163,11 +163,6 @@ At this point you should be able to build U-Boot for your board with the
empty SPI driver. You still have empty methods in your driver, but we will
write these one by one.

-If you have spi_init() functions or the like that are called from your
-board then the build will fail. Remove these calls and make a note of the
-init that needs to be done.
-
-
7. Set up your platform data structure

This will hold the information your driver to operate, like its hardware
diff --git a/examples/standalone/atmel_df_pow2.c b/examples/standalone/atmel_df_pow2.c
index 2e14aba390..b7bd243730 100644
--- a/examples/standalone/atmel_df_pow2.c
+++ b/examples/standalone/atmel_df_pow2.c
@@ -126,8 +126,6 @@ int atmel_df_pow2(int argc, char * const argv[])
return 1;
}

- spi_init();
-
while (1) {
struct spi_slave *slave;
char *line, *p;
diff --git a/include/_exports.h b/include/_exports.h
index 5416041243..c15050e30b 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -50,11 +50,9 @@
#endif

#if !defined(CONFIG_CMD_SPI) || defined(CONFIG_DM_SPI)
- EXPORT_FUNC(dummy, void, spi_init, void)
EXPORT_FUNC(dummy, void, spi_setup_slave, void)
EXPORT_FUNC(dummy, void, spi_free_slave, void)
#else
- EXPORT_FUNC(spi_init, void, spi_init, void)
EXPORT_FUNC(spi_setup_slave, struct spi_slave *, spi_setup_slave,
unsigned int, unsigned int, unsigned int, unsigned int)
EXPORT_FUNC(spi_free_slave, void, spi_free_slave, struct spi_slave *)
--
2.18.0.321.gffc6fa0e3