summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2012-11-03 11:41:23 +0000
committerSimon Glass <sjg@chromium.org>2012-12-06 14:30:41 -0800
commit8313315b9ab3a130784a2a7d0c4f329808690c0b (patch)
tree6d5fe1a9f4318342993286e4ccf61f2ad5b90d0b /arch/x86/lib
parentac31a7b81c5519a86ddce4fde4a99ba759332abc (diff)
downloadu-boot-imx-8313315b9ab3a130784a2a7d0c4f329808690c0b.zip
u-boot-imx-8313315b9ab3a130784a2a7d0c4f329808690c0b.tar.gz
u-boot-imx-8313315b9ab3a130784a2a7d0c4f329808690c0b.tar.bz2
x86: Initialise SPI if enabled
If we have SPI support, make sure that we init it. Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/board.c3
-rw-r--r--arch/x86/lib/init_helpers.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index c7d8960..2ffe061 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 87c7263..d10a846 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -28,6 +28,7 @@
#include <net.h>
#include <ide.h>
#include <serial.h>
+#include <spi.h>
#include <status_led.h>
#include <asm/processor.h>
#include <asm/u-boot-x86.h>
@@ -160,3 +161,11 @@ int set_load_addr_r(void)
return 0;
}
+
+int init_func_spi(void)
+{
+ puts("SPI: ");
+ spi_init();
+ puts("ready\n");
+ return 0;
+}