board-3630sdp.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. #include <linux/kernel.h>
  9. #include <linux/init.h>
  10. #include <linux/platform_device.h>
  11. #include <linux/input.h>
  12. #include <linux/gpio.h>
  13. #include <asm/mach-types.h>
  14. #include <asm/mach/arch.h>
  15. #include <plat/common.h>
  16. #include <plat/board.h>
  17. #include <plat/gpmc-smc91x.h>
  18. #include <plat/mux.h>
  19. #include <plat/usb.h>
  20. #include <mach/board-zoom.h>
  21. #include "mux.h"
  22. #include "sdram-hynix-h8mbx00u0mer-0em.h"
  23. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  24. static struct omap_smc91x_platform_data board_smc91x_data = {
  25. .cs = 3,
  26. .flags = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL,
  27. };
  28. static void __init board_smc91x_init(void)
  29. {
  30. board_smc91x_data.gpio_irq = 158;
  31. gpmc_smc91x_init(&board_smc91x_data);
  32. }
  33. #else
  34. static inline void board_smc91x_init(void)
  35. {
  36. }
  37. #endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */
  38. static void enable_board_wakeup_source(void)
  39. {
  40. /* T2 interrupt line (keypad) */
  41. omap_mux_init_signal("sys_nirq",
  42. OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
  43. }
  44. static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
  45. .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
  46. .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
  47. .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
  48. .phy_reset = true,
  49. .reset_gpio_port[0] = 126,
  50. .reset_gpio_port[1] = 61,
  51. .reset_gpio_port[2] = -EINVAL
  52. };
  53. static void __init omap_sdp_map_io(void)
  54. {
  55. omap2_set_globals_343x();
  56. omap2_map_common_io();
  57. }
  58. static struct omap_board_config_kernel sdp_config[] __initdata = {
  59. };
  60. static void __init omap_sdp_init_irq(void)
  61. {
  62. omap_board_config = sdp_config;
  63. omap_board_config_size = ARRAY_SIZE(sdp_config);
  64. omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
  65. h8mbx00u0mer0em_sdrc_params);
  66. omap_init_irq();
  67. omap_gpio_init();
  68. }
  69. #ifdef CONFIG_OMAP_MUX
  70. static struct omap_board_mux board_mux[] __initdata = {
  71. { .reg_offset = OMAP_MUX_TERMINATOR },
  72. };
  73. #else
  74. #define board_mux NULL
  75. #endif
  76. static void __init omap_sdp_init(void)
  77. {
  78. omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
  79. zoom_peripherals_init();
  80. board_smc91x_init();
  81. enable_board_wakeup_source();
  82. usb_ehci_init(&ehci_pdata);
  83. }
  84. MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
  85. .phys_io = 0x48000000,
  86. .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
  87. .boot_params = 0x80000100,
  88. .map_io = omap_sdp_map_io,
  89. .init_irq = omap_sdp_init_irq,
  90. .init_machine = omap_sdp_init,
  91. .timer = &omap_timer,
  92. MACHINE_END