2 * Copyright (C) 2011 Ilya Yanok, Emcraft Systems
4 * Based on ti/evm/evm.c
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
23 #include <asm/arch/mem.h>
24 #include <asm/arch/mmc_host_def.h>
25 #include <asm/arch/mux.h>
26 #include <asm/arch/sys_proto.h>
27 #include <asm/mach-types.h>
29 #include <asm/omap_gpio.h>
32 #ifdef CONFIG_USB_EHCI
34 #include <asm/ehci-omap.h>
38 DECLARE_GLOBAL_DATA_PTR;
40 #ifdef CONFIG_USB_EHCI
41 static struct omap_usbhs_board_data usbhs_bdata = {
42 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
43 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
44 .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
47 int ehci_hcd_init(void)
49 return omap_ehci_hcd_init(&usbhs_bdata);
52 int ehci_hcd_stop(void)
54 return omap_ehci_hcd_stop();
60 * Description: Early hardware init.
64 gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
66 gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
72 * Routine: set_muxconf_regs
73 * Description: Setting up the configuration Mux registers specific to the
74 * hardware. Many pins need to be moved from protect to primary
77 void set_muxconf_regs(void)
82 #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
83 int board_mmc_init(bd_t *bis)
85 return omap_mmc_init(0, 0, 0);
89 #ifdef CONFIG_USB_EHCI_OMAP
90 #define USB_HOST_PWR_EN 132
91 int board_usb_init(void)
93 if (gpio_request(USB_HOST_PWR_EN, "USB_HOST_PWR_EN") < 0) {
94 puts("Failed to get USB_HOST_PWR_EN pin\n");
97 gpio_direction_output(USB_HOST_PWR_EN, 1);