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 STATUS_LED_OFF 0
54 #define STATUS_LED_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(STATUS_LED_OFF
, STATUS_LED_OFF
, STATUS_LED_ON
);
81 case BOOTSTAGE_ID_CHECK_HEADER
:
82 stamp_led_set(STATUS_LED_OFF
, STATUS_LED_ON
, STATUS_LED_OFF
);
84 case BOOTSTAGE_ID_CHECK_CHECKSUM
:
85 stamp_led_set(STATUS_LED_OFF
, STATUS_LED_ON
, STATUS_LED_ON
);
87 case BOOTSTAGE_ID_CHECK_ARCH
:
88 stamp_led_set(STATUS_LED_ON
, STATUS_LED_OFF
, STATUS_LED_OFF
);
90 case BOOTSTAGE_ID_CHECK_IMAGETYPE
:
91 case BOOTSTAGE_ID_DECOMP_IMAGE
:
92 stamp_led_set(STATUS_LED_ON
, STATUS_LED_OFF
, STATUS_LED_ON
);
94 case BOOTSTAGE_ID_KERNEL_LOADED
:
95 case BOOTSTAGE_ID_CHECK_BOOT_OS
:
96 stamp_led_set(STATUS_LED_ON
, STATUS_LED_ON
, STATUS_LED_OFF
);
98 case BOOTSTAGE_ID_BOOT_OS_RETURNED
:
99 case BOOTSTAGE_ID_RD_MAGIC
:
100 case BOOTSTAGE_ID_RD_HDR_CHECKSUM
:
101 case BOOTSTAGE_ID_RD_CHECKSUM
:
102 case BOOTSTAGE_ID_RAMDISK
:
103 case BOOTSTAGE_ID_NO_RAMDISK
:
104 case BOOTSTAGE_ID_RUN_OS
:
105 stamp_led_set(STATUS_LED_OFF
, STATUS_LED_OFF
, STATUS_LED_OFF
);
108 stamp_led_set(STATUS_LED_ON
, STATUS_LED_ON
, STATUS_LED_ON
);
114 #ifdef CONFIG_SMC91111
115 int board_eth_init(bd_t
*bis
)
117 return smc91111_initialize(0, CONFIG_SMC91111_BASE
);