spear310_evb.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * arch/arm/mach-spear3xx/spear310_evb.c
  3. *
  4. * SPEAr310 evaluation board source file
  5. *
  6. * Copyright (C) 2009 ST Microelectronics
  7. * Viresh Kumar<viresh.kumar@st.com>
  8. *
  9. * This file is licensed under the terms of the GNU General Public
  10. * License version 2. This program is licensed "as is" without any
  11. * warranty of any kind, whether express or implied.
  12. */
  13. #include <asm/hardware/vic.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach-types.h>
  16. #include <mach/generic.h>
  17. #include <mach/hardware.h>
  18. /* padmux devices to enable */
  19. static struct pmx_dev *pmx_devs[] = {
  20. /* spear3xx specific devices */
  21. &spear3xx_pmx_i2c,
  22. &spear3xx_pmx_ssp,
  23. &spear3xx_pmx_gpio_pin0,
  24. &spear3xx_pmx_gpio_pin1,
  25. &spear3xx_pmx_gpio_pin2,
  26. &spear3xx_pmx_gpio_pin3,
  27. &spear3xx_pmx_gpio_pin4,
  28. &spear3xx_pmx_gpio_pin5,
  29. &spear3xx_pmx_uart0,
  30. /* spear310 specific devices */
  31. &spear310_pmx_emi_cs_0_1_4_5,
  32. &spear310_pmx_emi_cs_2_3,
  33. &spear310_pmx_uart1,
  34. &spear310_pmx_uart2,
  35. &spear310_pmx_uart3_4_5,
  36. &spear310_pmx_fsmc,
  37. &spear310_pmx_rs485_0_1,
  38. &spear310_pmx_tdm0,
  39. };
  40. static struct amba_device *amba_devs[] __initdata = {
  41. /* spear3xx specific devices */
  42. &spear3xx_gpio_device,
  43. &spear3xx_uart_device,
  44. /* spear310 specific devices */
  45. };
  46. static struct platform_device *plat_devs[] __initdata = {
  47. /* spear3xx specific devices */
  48. /* spear310 specific devices */
  49. };
  50. static void __init spear310_evb_init(void)
  51. {
  52. unsigned int i;
  53. /* call spear310 machine init function */
  54. spear310_init(NULL, pmx_devs, ARRAY_SIZE(pmx_devs));
  55. /* Add Platform Devices */
  56. platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));
  57. /* Add Amba Devices */
  58. for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
  59. amba_device_register(amba_devs[i], &iomem_resource);
  60. }
  61. MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
  62. .atag_offset = 0x100,
  63. .map_io = spear3xx_map_io,
  64. .init_irq = spear3xx_init_irq,
  65. .handle_irq = vic_handle_irq,
  66. .timer = &spear3xx_timer,
  67. .init_machine = spear310_evb_init,
  68. .restart = spear_restart,
  69. MACHINE_END