2 * U-boot - main board file
4 * Copyright (c) 2005-2008 Analog Devices Inc.
6 * (C) Copyright 2000-2004
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
9 * See file CREDITS for list of people who contributed to this
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
32 DECLARE_GLOBAL_DATA_PTR;
36 printf("Board: ADI BF533 Stamp board\n");
37 printf(" Support: http://blackfin.uclinux.org/\n");
41 /* PF0 and PF1 are used to switch between the ethernet and flash:
46 void swap_to(int device_id)
48 gpio_request(GPIO_PF0, "eth_flash_swap");
49 gpio_request(GPIO_PF1, "eth_flash_swap");
50 gpio_direction_output(GPIO_PF0, device_id == ETHERNET);
51 gpio_direction_output(GPIO_PF1, 0);
55 #if defined(CONFIG_MISC_INIT_R)
56 /* miscellaneous platform dependent initialisations */
59 #ifdef CONFIG_STAMP_CF
67 #ifdef CONFIG_SHOW_BOOT_PROGRESS
69 #define STATUS_LED_OFF 0
70 #define STATUS_LED_ON 1
72 static int gpio_setup;
74 static void stamp_led_set(int LED1, int LED2, int LED3)
77 gpio_request(GPIO_PF2, "boot_progress");
78 gpio_request(GPIO_PF3, "boot_progress");
79 gpio_request(GPIO_PF4, "boot_progress");
80 gpio_direction_output(GPIO_PF2, LED1);
81 gpio_direction_output(GPIO_PF3, LED2);
82 gpio_direction_output(GPIO_PF4, LED3);
85 gpio_set_value(GPIO_PF2, LED1);
86 gpio_set_value(GPIO_PF3, LED2);
87 gpio_set_value(GPIO_PF4, LED3);
91 void show_boot_progress(int status)
95 stamp_led_set(STATUS_LED_OFF, STATUS_LED_OFF, STATUS_LED_ON);
98 stamp_led_set(STATUS_LED_OFF, STATUS_LED_ON, STATUS_LED_OFF);
101 stamp_led_set(STATUS_LED_OFF, STATUS_LED_ON, STATUS_LED_ON);
104 stamp_led_set(STATUS_LED_ON, STATUS_LED_OFF, STATUS_LED_OFF);
108 stamp_led_set(STATUS_LED_ON, STATUS_LED_OFF, STATUS_LED_ON);
112 stamp_led_set(STATUS_LED_ON, STATUS_LED_ON, STATUS_LED_OFF);
121 stamp_led_set(STATUS_LED_OFF, STATUS_LED_OFF, STATUS_LED_OFF);
124 stamp_led_set(STATUS_LED_ON, STATUS_LED_ON, STATUS_LED_ON);
130 #ifdef CONFIG_SMC91111
131 int board_eth_init(bd_t *bis)
133 return smc91111_initialize(0, CONFIG_SMC91111_BASE);