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 * SPDX-License-Identifier: GPL-2.0+
16 DECLARE_GLOBAL_DATA_PTR;
20 printf("Board: ADI BF533 Stamp board\n");
21 printf(" Support: http://blackfin.uclinux.org/\n");
25 /* PF0 and PF1 are used to switch between the ethernet and flash:
30 void swap_to(int device_id)
32 gpio_request(GPIO_PF0, "eth_flash_swap");
33 gpio_request(GPIO_PF1, "eth_flash_swap");
34 gpio_direction_output(GPIO_PF0, device_id == ETHERNET);
35 gpio_direction_output(GPIO_PF1, 0);
39 #if defined(CONFIG_MISC_INIT_R)
40 /* miscellaneous platform dependent initialisations */
43 #ifdef CONFIG_STAMP_CF
51 #ifdef CONFIG_SHOW_BOOT_PROGRESS
53 #define CONFIG_LED_STATUS_OFF 0
54 #define CONFIG_LED_STATUS_ON 1
56 static int gpio_setup;
58 static void stamp_led_set(int LED1, int LED2, int LED3)
61 gpio_request(GPIO_PF2, "boot_progress");
62 gpio_request(GPIO_PF3, "boot_progress");
63 gpio_request(GPIO_PF4, "boot_progress");
64 gpio_direction_output(GPIO_PF2, LED1);
65 gpio_direction_output(GPIO_PF3, LED2);
66 gpio_direction_output(GPIO_PF4, LED3);
69 gpio_set_value(GPIO_PF2, LED1);
70 gpio_set_value(GPIO_PF3, LED2);
71 gpio_set_value(GPIO_PF4, LED3);
75 void show_boot_progress(int status)
78 case BOOTSTAGE_ID_CHECK_MAGIC:
79 stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF,
80 CONFIG_LED_STATUS_ON);
82 case BOOTSTAGE_ID_CHECK_HEADER:
83 stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_ON,
84 CONFIG_LED_STATUS_OFF);
86 case BOOTSTAGE_ID_CHECK_CHECKSUM:
87 stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_ON,
88 CONFIG_LED_STATUS_ON);
90 case BOOTSTAGE_ID_CHECK_ARCH:
91 stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_OFF,
92 CONFIG_LED_STATUS_OFF);
94 case BOOTSTAGE_ID_CHECK_IMAGETYPE:
95 case BOOTSTAGE_ID_DECOMP_IMAGE:
96 stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_OFF,
97 CONFIG_LED_STATUS_ON);
99 case BOOTSTAGE_ID_KERNEL_LOADED:
100 case BOOTSTAGE_ID_CHECK_BOOT_OS:
101 stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_ON,
102 CONFIG_LED_STATUS_OFF);
104 case BOOTSTAGE_ID_BOOT_OS_RETURNED:
105 case BOOTSTAGE_ID_RD_MAGIC:
106 case BOOTSTAGE_ID_RD_HDR_CHECKSUM:
107 case BOOTSTAGE_ID_RD_CHECKSUM:
108 case BOOTSTAGE_ID_RAMDISK:
109 case BOOTSTAGE_ID_NO_RAMDISK:
110 case BOOTSTAGE_ID_RUN_OS:
111 stamp_led_set(CONFIG_LED_STATUS_OFF, CONFIG_LED_STATUS_OFF,
112 CONFIG_LED_STATUS_OFF);
115 stamp_led_set(CONFIG_LED_STATUS_ON, CONFIG_LED_STATUS_ON,
116 CONFIG_LED_STATUS_ON);
122 #ifdef CONFIG_SMC91111
123 int board_eth_init(bd_t *bis)
125 return smc91111_initialize(0, CONFIG_SMC91111_BASE);