Path: blob/master/arch/arm/mach-omap2/board-am3517crane.c
10817 views
/*1* Support for AM3517/05 Craneboard2* http://www.mistralsolutions.com/products/craneboard.php3*4* Copyright (C) 2010 Mistral Solutions Pvt Ltd. <www.mistralsolutions.com>5* Author: R.Srinath <[email protected]>6*7* Based on mach-omap2/board-am3517evm.c8*9* This program is free software; you can redistribute it and/or modify it10* under the terms of the GNU General Public License as published by the11* Free Software Foundation version 2.12*13* This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,14* whether express or implied; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU16* General Public License for more details.17*/1819#include <linux/kernel.h>20#include <linux/init.h>21#include <linux/gpio.h>2223#include <mach/hardware.h>24#include <asm/mach-types.h>25#include <asm/mach/arch.h>26#include <asm/mach/map.h>2728#include <plat/board.h>29#include <plat/common.h>30#include <plat/usb.h>3132#include "mux.h"33#include "control.h"3435#define GPIO_USB_POWER 3536#define GPIO_USB_NRESET 38373839/* Board initialization */40static struct omap_board_config_kernel am3517_crane_config[] __initdata = {41};4243#ifdef CONFIG_OMAP_MUX44static struct omap_board_mux board_mux[] __initdata = {45{ .reg_offset = OMAP_MUX_TERMINATOR },46};47#else48#define board_mux NULL49#endif5051static void __init am3517_crane_init_early(void)52{53omap2_init_common_infrastructure();54omap2_init_common_devices(NULL, NULL);55}5657static struct usbhs_omap_board_data usbhs_bdata __initdata = {58.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,59.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,60.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,6162.phy_reset = true,63.reset_gpio_port[0] = GPIO_USB_NRESET,64.reset_gpio_port[1] = -EINVAL,65.reset_gpio_port[2] = -EINVAL66};6768static void __init am3517_crane_init(void)69{70int ret;7172omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);73omap_serial_init();7475omap_board_config = am3517_crane_config;76omap_board_config_size = ARRAY_SIZE(am3517_crane_config);7778/* Configure GPIO for EHCI port */79if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {80pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",81GPIO_USB_NRESET);82return;83}8485if (omap_mux_init_gpio(GPIO_USB_POWER, OMAP_PIN_OUTPUT)) {86pr_err("Can not configure mux for GPIO_USB_POWER %d\n",87GPIO_USB_POWER);88return;89}9091ret = gpio_request_one(GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,92"usb_ehci_enable");93if (ret < 0) {94pr_err("Can not request GPIO %d\n", GPIO_USB_POWER);95return;96}9798usbhs_init(&usbhs_bdata);99}100101MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")102.boot_params = 0x80000100,103.reserve = omap_reserve,104.map_io = omap3_map_io,105.init_early = am3517_crane_init_early,106.init_irq = omap_init_irq,107.init_machine = am3517_crane_init,108.timer = &omap_timer,109MACHINE_END110111112