]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/am33xx/board.c
am33xx: NAND support
[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/mem.h>
29 #include <asm/arch/mmc_host_def.h>
30 #include <asm/arch/sys_proto.h>
31 #include <asm/io.h>
32 #include <asm/emif.h>
33 #include <asm/gpio.h>
34 #include <i2c.h>
35 #include <miiphy.h>
36 #include <cpsw.h>
37
38 DECLARE_GLOBAL_DATA_PTR;
39
40 static const struct gpio_bank gpio_bank_am33xx[4] = {
41         { (void *)AM33XX_GPIO0_BASE, METHOD_GPIO_24XX },
42         { (void *)AM33XX_GPIO1_BASE, METHOD_GPIO_24XX },
43         { (void *)AM33XX_GPIO2_BASE, METHOD_GPIO_24XX },
44         { (void *)AM33XX_GPIO3_BASE, METHOD_GPIO_24XX },
45 };
46
47 const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx;
48
49 #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
50 int cpu_mmc_init(bd_t *bis)
51 {
52         int ret;
53
54         ret = omap_mmc_init(0, 0, 0);
55         if (ret)
56                 return ret;
57
58         return omap_mmc_init(1, 0, 0);
59 }
60 #endif
61
62 void setup_clocks_for_console(void)
63 {
64         /* Not yet implemented */
65         return;
66 }