* [U-Boot-Users] [PATCH] mips: If CONFIG_CMD_SPI is defined, call spi_init()
@ 2008-05-21 20:39 Jason McMullan
2008-05-22 15:03 ` Shinya Kuribayashi
0 siblings, 1 reply; 2+ messages in thread
From: Jason McMullan @ 2008-05-21 20:39 UTC (permalink / raw)
To: u-boot
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>
---
lib_mips/board.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index e33070d..be04f8d 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -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 ();
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot-Users] [PATCH] mips: If CONFIG_CMD_SPI is defined, call spi_init()
2008-05-21 20:39 [U-Boot-Users] [PATCH] mips: If CONFIG_CMD_SPI is defined, call spi_init() Jason McMullan
@ 2008-05-22 15:03 ` Shinya Kuribayashi
0 siblings, 0 replies; 2+ messages in thread
From: Shinya Kuribayashi @ 2008-05-22 15:03 UTC (permalink / raw)
To: u-boot
Jason McMullan wrote:
> 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>
Applied with two CodingStyle fixes. See below.
> @@ -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 ();
Note that I'm Linux's CodingStyle lover. But in this case, we should use
the same CodingStyle in a single file.
Thanks,
Shinya
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-22 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 20:39 [U-Boot-Users] [PATCH] mips: If CONFIG_CMD_SPI is defined, call spi_init() Jason McMullan
2008-05-22 15:03 ` Shinya Kuribayashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox