summaryrefslogtreecommitdiff
path: root/lib_ppc/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_ppc/board.c')
-rw-r--r--lib_ppc/board.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 7b95246..45d1328 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
@@ -835,6 +851,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
#if defined(CONFIG_SC3)
sc3_read_eeprom();
#endif
+
+#ifdef CFG_ID_EEPROM
+ mac_read_from_eeprom();
+#endif
+
s = getenv ("ethaddr");
#if defined (CONFIG_MBX) || \
defined (CONFIG_RPXCLASSIC) || \
@@ -902,10 +923,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
}
#endif
-#ifdef CFG_ID_EEPROM
- mac_read_from_eeprom();
-#endif
-
#if defined(CONFIG_TQM8xxL) || defined(CONFIG_TQM8260) || \
defined(CONFIG_TQM8272) || \
defined(CONFIG_CCM) || defined(CONFIG_KUP4K) || \