diff options
Diffstat (limited to 'lib_m68k/board.c')
| -rw-r--r-- | lib_m68k/board.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib_m68k/board.c b/lib_m68k/board.c index a13ea2682..e59c6b085 100644 --- a/lib_m68k/board.c +++ b/lib_m68k/board.c @@ -59,6 +59,10 @@ #include <i2c.h> #endif +#ifdef CONFIG_CMD_SPI +#include <spi.h> +#endif + DECLARE_GLOBAL_DATA_PTR; static char *failed = "*** failed ***\n"; @@ -136,23 +140,6 @@ void *sbrk (ptrdiff_t increment) return ((void *)old); } -char *strmhz(char *buf, long hz) -{ - long l, n; - long m; - - n = hz / 1000000L; - - l = sprintf (buf, "%ld", n); - - m = (hz % 1000000L) / 1000L; - - if (m != 0) - sprintf (buf+l, ".%03ld", m); - - return (buf); -} - /* * All attempts to come up with a "common" initialization sequence * that works for all boards and architectures failed: some of the @@ -212,6 +199,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 + /***********************************************************************/ /************************************************************************ @@ -231,6 +228,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 init_func_ram, #if defined(CFG_DRAM_TEST) testdram, |