]>
Commit | Line | Data |
---|---|---|
8b219cf0 MF |
1 | /* |
2 | * U-boot - main board file | |
3 | * | |
4 | * Copyright (c) 2005-2008 Analog Devices Inc. | |
5 | * | |
6 | * Licensed under the GPL-2 or later. | |
7 | */ | |
8 | ||
9 | #include <common.h> | |
10 | #include <config.h> | |
11 | #include <command.h> | |
736fead8 | 12 | #include <netdev.h> |
8b219cf0 MF |
13 | #include <asm/blackfin.h> |
14 | ||
15 | DECLARE_GLOBAL_DATA_PTR; | |
16 | ||
17 | int checkboard(void) | |
18 | { | |
19 | printf("Board: Bluetechnix CM-BF548 board\n"); | |
20 | printf(" Support: http://www.bluetechnix.at/\n"); | |
21 | return 0; | |
22 | } | |
23 | ||
8b219cf0 MF |
24 | int board_early_init_f(void) |
25 | { | |
26 | /* Port H: PH8 - PH13 == A4 - A9 | |
27 | * address lines of the parallel asynchronous memory interface | |
28 | */ | |
29 | ||
30 | /************************************************ | |
31 | * configure GPIO * | |
32 | * set port H function enable register * | |
33 | * configure PH8-PH13 as peripheral (not GPIO) * | |
34 | *************************************************/ | |
35 | bfin_write_PORTH_FER(0x3F03); | |
36 | ||
37 | /************************************************ | |
38 | * set port H MUX to configure PH8-PH13 * | |
39 | * 1st Function (MUX = 00) (bits 16-27 == 0) * | |
40 | * Set to address signals A4-A9 * | |
41 | *************************************************/ | |
42 | bfin_write_PORTH_MUX(0); | |
43 | ||
44 | /************************************************ | |
45 | * set port H direction register * | |
46 | * enable PH8-PH13 as outputs * | |
47 | *************************************************/ | |
48 | bfin_write_PORTH_DIR_SET(0x3F00); | |
49 | ||
50 | /* Port I: PI0 - PH14 == A10 - A24 | |
51 | * address lines of the parallel asynchronous memory interface | |
52 | */ | |
53 | ||
54 | /************************************************ | |
55 | * set port I function enable register * | |
56 | * configure PI0-PI14 as peripheral (not GPIO) * | |
57 | *************************************************/ | |
58 | bfin_write_PORTI_FER(0x7fff); | |
59 | ||
60 | /************************************************** | |
61 | * set PORT I MUX to configure PI14-PI0 as * | |
62 | * 1st Function (MUX=00) - address signals A10-A24 * | |
63 | ***************************************************/ | |
64 | bfin_write_PORTI_MUX(0); | |
65 | ||
66 | /**************************************** | |
67 | * set PORT I direction register * | |
68 | * enable PI0 - PI14 as outputs * | |
69 | *****************************************/ | |
70 | bfin_write_PORTI_DIR_SET(0x7fff); | |
71 | ||
72 | return 0; | |
73 | } | |
736fead8 BW |
74 | |
75 | int board_eth_init(bd_t *bis) | |
76 | { | |
77 | int rc = 0; | |
78 | #ifdef CONFIG_SMC911X | |
79 | rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); | |
80 | #endif | |
81 | return rc; | |
82 | } |