2 * U-boot - main board file
4 * Copyright (c) 2005-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
13 #include <asm/blackfin.h>
16 DECLARE_GLOBAL_DATA_PTR;
20 printf("Board: ADI BF548 EZ-Kit board\n");
21 printf(" Support: http://blackfin.uclinux.org/\n");
25 int board_early_init_f(void)
27 /* Port H: PH8 - PH13 == A4 - A9
28 * address lines of the parallel asynchronous memory interface
31 /************************************************
33 * set port H function enable register *
34 * configure PH8-PH13 as peripheral (not GPIO) *
35 *************************************************/
36 bfin_write_PORTH_FER(0x3F03);
38 /************************************************
39 * set port H MUX to configure PH8-PH13 *
40 * 1st Function (MUX = 00) (bits 16-27 == 0) *
41 * Set to address signals A4-A9 *
42 *************************************************/
43 bfin_write_PORTH_MUX(0);
45 /************************************************
46 * set port H direction register *
47 * enable PH8-PH13 as outputs *
48 *************************************************/
49 bfin_write_PORTH_DIR_SET(0x3F00);
51 /* Port I: PI0 - PH14 == A10 - A24
52 * address lines of the parallel asynchronous memory interface
55 /************************************************
56 * set port I function enable register *
57 * configure PI0-PI14 as peripheral (not GPIO) *
58 *************************************************/
59 bfin_write_PORTI_FER(0x7fff);
61 /**************************************************
62 * set PORT I MUX to configure PI14-PI0 as *
63 * 1st Function (MUX=00) - address signals A10-A24 *
64 ***************************************************/
65 bfin_write_PORTI_MUX(0);
67 /****************************************
68 * set PORT I direction register *
69 * enable PI0 - PI14 as outputs *
70 *****************************************/
71 bfin_write_PORTI_DIR_SET(0x7fff);
77 int board_eth_init(bd_t *bis)
79 return smc911x_initialize(0, CONFIG_SMC911X_BASE);
83 #ifdef CONFIG_BFIN_SDH
84 int board_mmc_init(bd_t *bis)
86 return bfin_mmc_init(bis);
90 #ifdef CONFIG_USB_BLACKFIN
91 void board_musb_init(void)
94 * Rev 1.0 BF549 EZ-KITs require PE7 to be high for both device
95 * and OTG host modes, while rev 1.1 and greater require PE7 to
96 * be low for device mode and high for host mode. We set it high
97 * here because we are in host mode.
99 bfin_write_PORTE_FER(bfin_read_PORTE_FER() & ~PE7);
100 bfin_write_PORTE_DIR_SET(PE7);
101 bfin_write_PORTE_SET(PE7);