]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/arm/mach-omap2/board-3630sdp.c
omap: mux: Remove old mux code
[mv-sheeva.git] / arch / arm / mach-omap2 / board-3630sdp.c
1 /*
2  * Copyright (C) 2009 Texas Instruments Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 #include <linux/kernel.h>
10 #include <linux/init.h>
11 #include <linux/platform_device.h>
12 #include <linux/input.h>
13 #include <linux/gpio.h>
14
15 #include <asm/mach-types.h>
16 #include <asm/mach/arch.h>
17
18 #include <plat/common.h>
19 #include <plat/board.h>
20 #include <plat/gpmc-smc91x.h>
21 #include <plat/usb.h>
22
23 #include <mach/board-zoom.h>
24
25 #include "mux.h"
26 #include "sdram-hynix-h8mbx00u0mer-0em.h"
27
28 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
29
30 static struct omap_smc91x_platform_data board_smc91x_data = {
31         .cs             = 3,
32         .flags          = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
33 };
34
35 static void __init board_smc91x_init(void)
36 {
37         board_smc91x_data.gpio_irq = 158;
38         gpmc_smc91x_init(&board_smc91x_data);
39 }
40
41 #else
42
43 static inline void board_smc91x_init(void)
44 {
45 }
46
47 #endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
48
49 static void enable_board_wakeup_source(void)
50 {
51         /* T2 interrupt line (keypad) */
52         omap_mux_init_signal("sys_nirq",
53                 OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
54 }
55
56 static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
57
58         .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
59         .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
60         .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
61
62         .phy_reset  = true,
63         .reset_gpio_port[0]  = 126,
64         .reset_gpio_port[1]  = 61,
65         .reset_gpio_port[2]  = -EINVAL
66 };
67
68 static void __init omap_sdp_map_io(void)
69 {
70         omap2_set_globals_36xx();
71         omap34xx_map_common_io();
72 }
73
74 static struct omap_board_config_kernel sdp_config[] __initdata = {
75 };
76
77 static void __init omap_sdp_init_irq(void)
78 {
79         omap_board_config = sdp_config;
80         omap_board_config_size = ARRAY_SIZE(sdp_config);
81         omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
82                         h8mbx00u0mer0em_sdrc_params);
83         omap_init_irq();
84         omap_gpio_init();
85 }
86
87 #ifdef CONFIG_OMAP_MUX
88 static struct omap_board_mux board_mux[] __initdata = {
89         { .reg_offset = OMAP_MUX_TERMINATOR },
90 };
91 #else
92 #define board_mux       NULL
93 #endif
94
95 static void __init omap_sdp_init(void)
96 {
97         omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
98         omap_serial_init();
99         zoom_peripherals_init();
100         board_smc91x_init();
101         enable_board_wakeup_source();
102         usb_ehci_init(&ehci_pdata);
103 }
104
105 MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
106         .phys_io        = 0x48000000,
107         .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
108         .boot_params    = 0x80000100,
109         .map_io         = omap_sdp_map_io,
110         .init_irq       = omap_sdp_init_irq,
111         .init_machine   = omap_sdp_init,
112         .timer          = &omap_timer,
113 MACHINE_END