Ranjith Lohithakshan | c625327 | 2009-11-18 18:41:09 -0800 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-omap2/board-am3517evm.c |
| 3 | * |
| 4 | * Copyright (C) 2009 Texas Instruments Incorporated |
| 5 | * Author: Ranjith Lohithakshan <ranjithl@ti.com> |
| 6 | * |
| 7 | * Based on mach-omap2/board-omap3evm.c |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the |
| 11 | * 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 of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * General Public License for more details. |
| 17 | */ |
| 18 | |
| 19 | #include <linux/kernel.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/gpio.h> |
| 23 | |
| 24 | #include <mach/hardware.h> |
| 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <asm/mach/map.h> |
| 28 | |
| 29 | #include <plat/board.h> |
| 30 | #include <plat/common.h> |
| 31 | #include <plat/usb.h> |
| 32 | |
Tony Lindgren | ca5742b | 2009-12-11 16:16:32 -0800 | [diff] [blame] | 33 | #include "mux.h" |
| 34 | |
Ranjith Lohithakshan | c625327 | 2009-11-18 18:41:09 -0800 | [diff] [blame] | 35 | /* |
| 36 | * Board initialization |
| 37 | */ |
| 38 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { |
| 39 | }; |
| 40 | |
| 41 | static struct platform_device *am3517_evm_devices[] __initdata = { |
| 42 | }; |
| 43 | |
| 44 | static void __init am3517_evm_init_irq(void) |
| 45 | { |
| 46 | omap_board_config = am3517_evm_config; |
| 47 | omap_board_config_size = ARRAY_SIZE(am3517_evm_config); |
| 48 | |
| 49 | omap2_init_common_hw(NULL, NULL); |
| 50 | omap_init_irq(); |
| 51 | omap_gpio_init(); |
| 52 | } |
| 53 | |
| 54 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
| 55 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
| 56 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
| 57 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
| 58 | |
| 59 | .phy_reset = true, |
| 60 | .reset_gpio_port[0] = 57, |
| 61 | .reset_gpio_port[1] = -EINVAL, |
| 62 | .reset_gpio_port[2] = -EINVAL |
| 63 | }; |
| 64 | |
Tony Lindgren | ca5742b | 2009-12-11 16:16:32 -0800 | [diff] [blame] | 65 | #ifdef CONFIG_OMAP_MUX |
| 66 | static struct omap_board_mux board_mux[] __initdata = { |
| 67 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 68 | }; |
| 69 | #else |
| 70 | #define board_mux NULL |
| 71 | #endif |
| 72 | |
Ranjith Lohithakshan | c625327 | 2009-11-18 18:41:09 -0800 | [diff] [blame] | 73 | static void __init am3517_evm_init(void) |
| 74 | { |
Tony Lindgren | ca5742b | 2009-12-11 16:16:32 -0800 | [diff] [blame] | 75 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
Ranjith Lohithakshan | c625327 | 2009-11-18 18:41:09 -0800 | [diff] [blame] | 76 | platform_add_devices(am3517_evm_devices, |
| 77 | ARRAY_SIZE(am3517_evm_devices)); |
| 78 | |
| 79 | omap_serial_init(); |
| 80 | usb_ehci_init(&ehci_pdata); |
| 81 | } |
| 82 | |
| 83 | static void __init am3517_evm_map_io(void) |
| 84 | { |
| 85 | omap2_set_globals_343x(); |
| 86 | omap2_map_common_io(); |
| 87 | } |
| 88 | |
| 89 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") |
| 90 | .phys_io = 0x48000000, |
| 91 | .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, |
| 92 | .boot_params = 0x80000100, |
| 93 | .map_io = am3517_evm_map_io, |
| 94 | .init_irq = am3517_evm_init_irq, |
| 95 | .init_machine = am3517_evm_init, |
| 96 | .timer = &omap_timer, |
| 97 | MACHINE_END |