]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/am33xx/board.c
spi: atmel: sam9m10g45 also support WDRBT bit
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / am33xx / board.c
1 /*
2  * board.c
3  *
4  * Common board functions for AM33XX based boards
5  *
6  * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
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
19 #include <common.h>
20 #include <errno.h>
21 #include <spl.h>
22 #include <asm/arch/cpu.h>
23 #include <asm/arch/hardware.h>
24 #include <asm/arch/omap.h>
25 #include <asm/arch/ddr_defs.h>
26 #include <asm/arch/clock.h>
27 #include <asm/arch/gpio.h>
28 #include <asm/arch/mmc_host_def.h>
29 #include <asm/arch/sys_proto.h>
30 #include <asm/io.h>
31 #include <asm/emif.h>
32 #include <asm/gpio.h>
33 #include <i2c.h>
34 #include <miiphy.h>
35 #include <cpsw.h>
36
37 DECLARE_GLOBAL_DATA_PTR;
38
39 static const struct gpio_bank gpio_bank_am33xx[4] = {
40         { (void *)AM33XX_GPIO0_BASE, METHOD_GPIO_24XX },
41         { (void *)AM33XX_GPIO1_BASE, METHOD_GPIO_24XX },
42         { (void *)AM33XX_GPIO2_BASE, METHOD_GPIO_24XX },
43         { (void *)AM33XX_GPIO3_BASE, METHOD_GPIO_24XX },
44 };
45
46 const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx;
47
48 #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
49 int cpu_mmc_init(bd_t *bis)
50 {
51         int ret;
52
53         ret = omap_mmc_init(0, 0, 0);
54         if (ret)
55                 return ret;
56
57         return omap_mmc_init(1, 0, 0);
58 }
59 #endif
60
61 void setup_clocks_for_console(void)
62 {
63         /* Not yet implemented */
64         return;
65 }