]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mips: If CONFIG_CMD_SPI is defined, call spi_init()
authorJason McMullan <mcmullan@netapp.com>
Thu, 29 May 2008 15:53:37 +0000 (00:53 +0900)
committerShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Thu, 29 May 2008 15:53:37 +0000 (00:53 +0900)
The mips architecture currently does not call 'spi_init()' in the generic
board initialization routine is CONFIG_CMD_SPI is defined.

This patch rectifies that problem.

Signed-off-by: Jason McMullan <mcmullan@netapp.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
lib_mips/board.c

index 43cfc17353940509a3a538d8f5f783cf5537bf2a..532550b603b1d1a8c99be23934c006f2681c83d6 100644 (file)
@@ -29,6 +29,7 @@
 #include <net.h>
 #include <environment.h>
 #include <nand.h>
+#include <spi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -422,6 +423,12 @@ void board_init_r (gd_t *id, ulong dest_addr)
        nand_init ();           /* go init the NAND */
 #endif
 
+#ifdef CONFIG_CMD_SPI
+       puts ("SPI:   ");
+       spi_init ();            /* go init the SPI */
+       puts ("ready\n");
+#endif
+
 #if defined(CONFIG_MISC_INIT_R)
        /* miscellaneous platform dependent initialisations */
        misc_init_r ();