summaryrefslogtreecommitdiff
path: root/lib_ppc
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-01-16 22:37:35 -0500
committerKim Phillips <kim.phillips@freescale.com>2008-01-17 11:02:25 -0600
commit04a9e1180ac76a7bacc15a6fcd95ad839d65bddb (patch)
tree200373a0d0d38d7f12a6b21ff52d4b1a49ca2d59 /lib_ppc
parenta8cb43a89be6cfd283257a603dd9841503ccce0f (diff)
downloadu-boot-imx-04a9e1180ac76a7bacc15a6fcd95ad839d65bddb.zip
u-boot-imx-04a9e1180ac76a7bacc15a6fcd95ad839d65bddb.tar.gz
u-boot-imx-04a9e1180ac76a7bacc15a6fcd95ad839d65bddb.tar.bz2
Add support for a Freescale non-CPM SPI controller
This patch adds support for the SPI controller found on Freescale PowerPC processors such as the MCP834x family. Additionally, a new config option, CONFIG_HARD_SPI, is added for general purpose SPI controller use. Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 7b95246..bf261be 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -87,6 +87,9 @@ void doc_init (void);
defined(CONFIG_SOFT_I2C)
#include <i2c.h>
#endif
+#if defined(CONFIG_HARD_SPI)
+#include <spi.h>
+#endif
#if defined(CONFIG_CMD_NAND)
void nand_init (void);
#endif
@@ -247,6 +250,16 @@ static int init_func_i2c (void)
}
#endif
+#if defined(CONFIG_HARD_SPI)
+static int init_func_spi (void)
+{
+ puts ("SPI: ");
+ spi_init ();
+ puts ("ready\n");
+ return (0);
+}
+#endif
+
/***********************************************************************/
#if defined(CONFIG_WATCHDOG)
@@ -329,6 +342,9 @@ init_fnc_t *init_sequence[] = {
#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
init_func_i2c,
#endif
+#if defined(CONFIG_HARD_SPI)
+ init_func_spi,
+#endif
#if defined(CONFIG_DTT) /* Digital Thermometers and Thermostats */
dtt_init,
#endif