Commit | Line | Data |
---|---|---|
34c9ac23 | 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/mux.h> | |
22 | #include <plat/usb.h> | |
23 | ||
24 | #include <mach/board-zoom.h> | |
25 | ||
4896e394 | 26 | #include "mux.h" |
34c9ac23 | 27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" |
28 | ||
29 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | |
30 | ||
31 | static struct omap_smc91x_platform_data board_smc91x_data = { | |
32 | .cs = 3, | |
33 | .flags = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL, | |
34 | }; | |
35 | ||
36 | static void __init board_smc91x_init(void) | |
37 | { | |
38 | board_smc91x_data.gpio_irq = 158; | |
39 | gpmc_smc91x_init(&board_smc91x_data); | |
40 | } | |
41 | ||
42 | #else | |
43 | ||
44 | static inline void board_smc91x_init(void) | |
45 | { | |
46 | } | |
47 | ||
48 | #endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */ | |
49 | ||
50 | static void enable_board_wakeup_source(void) | |
51 | { | |
4896e394 TL |
52 | /* T2 interrupt line (keypad) */ |
53 | omap_mux_init_signal("sys_nirq", | |
54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | |
34c9ac23 | 55 | } |
56 | ||
57 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | |
58 | ||
59 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | |
60 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | |
61 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | |
62 | ||
63 | .phy_reset = true, | |
64 | .reset_gpio_port[0] = 126, | |
65 | .reset_gpio_port[1] = 61, | |
66 | .reset_gpio_port[2] = -EINVAL | |
67 | }; | |
68 | ||
69 | static void __init omap_sdp_map_io(void) | |
70 | { | |
71 | omap2_set_globals_343x(); | |
72 | omap2_map_common_io(); | |
73 | } | |
74 | ||
75 | static struct omap_board_config_kernel sdp_config[] __initdata = { | |
76 | }; | |
77 | ||
78 | static void __init omap_sdp_init_irq(void) | |
79 | { | |
80 | omap_board_config = sdp_config; | |
81 | omap_board_config_size = ARRAY_SIZE(sdp_config); | |
82 | omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params, | |
83 | h8mbx00u0mer0em_sdrc_params); | |
84 | omap_init_irq(); | |
85 | omap_gpio_init(); | |
86 | } | |
87 | ||
88 | static void __init omap_sdp_init(void) | |
89 | { | |
90 | zoom_peripherals_init(); | |
91 | board_smc91x_init(); | |
92 | enable_board_wakeup_source(); | |
93 | usb_ehci_init(&ehci_pdata); | |
94 | } | |
95 | ||
96 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | |
97 | .phys_io = 0x48000000, | |
98 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, | |
99 | .boot_params = 0x80000100, | |
100 | .map_io = omap_sdp_map_io, | |
101 | .init_irq = omap_sdp_init_irq, | |
102 | .init_machine = omap_sdp_init, | |
103 | .timer = &omap_timer, | |
104 | MACHINE_END |