From patchwork Sat Nov 3 21:41:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,01/20] x86: Initialise SPI if enabled Date: Sat, 03 Nov 2012 11:41:23 -0000 From: Simon Glass X-Patchwork-Id: 196947 Message-Id: <1351978902-23719-2-git-send-email-sjg@chromium.org> To: U-Boot Mailing List Cc: Gabe Black , Vic Yang From: Gabe Black If we have SPI support, make sure that we init it. Signed-off-by: Gabe Black Signed-off-by: Simon Glass Signed-off-by: Vic Yang --- arch/x86/include/asm/init_helpers.h | 1 + arch/x86/lib/board.c | 3 +++ arch/x86/lib/init_helpers.c | 9 +++++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/init_helpers.h b/arch/x86/include/asm/init_helpers.h index 8afb443..4ea6536 100644 --- a/arch/x86/include/asm/init_helpers.h +++ b/arch/x86/include/asm/init_helpers.h @@ -38,5 +38,6 @@ int init_bd_struct_r(void); int flash_init_r(void); int status_led_set_r(void); int set_load_addr_r(void); +int init_func_spi(void); #endif /* !_INIT_HELPERS_H_ */ diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index e5caf13..e0c5419 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -154,6 +154,9 @@ init_fnc_t *init_sequence_r[] = { #ifndef CONFIG_SYS_NO_FLASH flash_init_r, #endif +#ifdef CONFIG_SPI + init_func_spi; +#endif env_relocate_r, #ifdef CONFIG_PCI pci_init_r, diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index 1863209..4a6d9f3 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -196,3 +197,11 @@ int set_load_addr_r(void) return 0; } + +int init_func_spi(void) +{ + puts("SPI: "); + spi_init(); + puts("ready\n"); + return 0; +}