]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/x86/lib/init_wrappers.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[karo-tx-uboot.git] / arch / x86 / lib / init_wrappers.c
1 /*
2  * (C) Copyright 2011
3  * Graeme Russ, <graeme.russ@gmail.com>
4  *
5  * See file CREDITS for list of people who contributed to this
6  * project.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21  * MA 02111-1307 USA
22  */
23 #include <common.h>
24 #include <serial.h>
25 #include <kgdb.h>
26 #include <scsi.h>
27 #include <post.h>
28 #include <miiphy.h>
29
30 #include <asm/init_wrappers.h>
31
32 int serial_initialize_r(void)
33 {
34         serial_initialize();
35
36         return 0;
37 }
38
39 int env_relocate_r(void)
40 {
41         /* initialize environment */
42         env_relocate();
43
44         return 0;
45 }
46
47
48 int pci_init_r(void)
49 {
50         /* Do pci configuration */
51         pci_init();
52
53         return 0;
54 }
55
56 int jumptable_init_r(void)
57 {
58         jumptable_init();
59
60         return 0;
61 }
62
63 int pcmcia_init_r(void)
64 {
65         puts("PCMCIA:");
66         pcmcia_init();
67
68         return 0;
69 }
70
71 int kgdb_init_r(void)
72 {
73         puts("KGDB:  ");
74         kgdb_init();
75
76         return 0;
77 }
78
79 int enable_interrupts_r(void)
80 {
81         /* enable exceptions */
82         enable_interrupts();
83
84         return 0;
85 }
86
87 int eth_initialize_r(void)
88 {
89         puts("Net:   ");
90         eth_initialize(gd->bd);
91
92         return 0;
93 }
94
95 int reset_phy_r(void)
96 {
97 #ifdef DEBUG
98         puts("Reset Ethernet PHY\n");
99 #endif
100         reset_phy();
101
102         return 0;
103 }
104
105 int ide_init_r(void)
106 {
107         puts("IDE:   ");
108         ide_init();
109
110         return 0;
111 }
112
113 int scsi_init_r(void)
114 {
115         puts("SCSI:  ");
116         scsi_init();
117
118         return 0;
119 }
120
121 #ifdef CONFIG_BITBANGMII
122 int bb_miiphy_init_r(void)
123 {
124         bb_miiphy_init();
125
126         return 0;
127 }
128 #endif
129
130 #ifdef CONFIG_POST
131 int post_run_r(void)
132 {
133         post_run(NULL, POST_RAM | post_bootmode_get(0));
134
135         return 0;
136 }
137 #endif