X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib_arm%2Fboard.c;h=7e7a28271dff58cb941b1e0647a3fe080d53456e;hb=8d79953d03e6c5b24215609997dafe4daa623cd6;hp=8f4e19bfcb5bf637452cc944d90a5ae58a965c41;hpb=2c4faea84f3d96d674e3c065e1f220b20c8930c0;p=karo-tx-uboot.git diff --git a/lib_arm/board.c b/lib_arm/board.c index 8f4e19bfcb..7e7a28271d 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -46,10 +46,10 @@ #include #ifdef CONFIG_DRIVER_SMC91111 -#include "../drivers/smc91111.h" +#include "../drivers/net/smc91111.h" #endif #ifdef CONFIG_DRIVER_LAN91C96 -#include "../drivers/lan91c96.h" +#include "../drivers/net/lan91c96.h" #endif DECLARE_GLOBAL_DATA_PTR; @@ -58,6 +58,10 @@ DECLARE_GLOBAL_DATA_PTR; void nand_init (void); #endif +#if defined(CONFIG_CMD_ONENAND) +void onenand_init(void); +#endif + ulong monitor_flash_len; #ifdef CONFIG_HAS_DATAFLASH @@ -111,6 +115,26 @@ void *sbrk (ptrdiff_t increment) return ((void *) old); } +/************************************************************************ + * Coloured LED functionality + ************************************************************************ + * May be supplied by boards if desired + */ +void inline __coloured_LED_init (void) {} +void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); +void inline __red_LED_on (void) {} +void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); +void inline __red_LED_off(void) {} +void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); +void inline __green_LED_on(void) {} +void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); +void inline __green_LED_off(void) {} +void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); +void inline __yellow_LED_on(void) {} +void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); +void inline __yellow_LED_off(void) {} +void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); + /************************************************************************ * Init Utilities * ************************************************************************ @@ -185,7 +209,6 @@ static void display_flash_config (ulong size) } #endif /* CFG_NO_FLASH */ - /* * Breathe some life into the board... * @@ -301,6 +324,10 @@ void start_armboot (void) nand_init(); /* go init the NAND */ #endif +#if defined(CONFIG_CMD_ONENAND) + onenand_init(); +#endif + #ifdef CONFIG_HAS_DATAFLASH AT91F_DataflashInit(); dataflash_print_info(); @@ -314,6 +341,10 @@ void start_armboot (void) drv_vfd_init(); #endif /* CONFIG_VFD */ +#ifdef CONFIG_SERIAL_MULTI + serial_initialize(); +#endif + /* IP Address */ gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); @@ -364,6 +395,13 @@ void start_armboot (void) enable_interrupts (); /* Perform network card initialisation if necessary */ +#ifdef CONFIG_DRIVER_TI_EMAC +extern void dm644x_eth_set_mac_addr (const u_int8_t *addr); + if (getenv ("ethaddr")) { + dm644x_eth_set_mac_addr(gd->bd->bi_enetaddr); + } +#endif + #ifdef CONFIG_DRIVER_CS8900 cs8900_get_enetaddr (gd->bd->bi_enetaddr); #endif @@ -392,6 +430,10 @@ void start_armboot (void) puts ("Net: "); #endif eth_initialize(gd->bd); +#if defined(CONFIG_RESET_PHY_R) + debug ("Reset Ethernet PHY\n"); + reset_phy(); +#endif #endif /* main_loop() can return to retry autoboot, if so just run it again. */ for (;;) {