spear310_evb.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/mach/arch.h>
  14. #include <asm/mach-types.h>
  15. #include <mach/generic.h>
  16. #include <mach/hardware.h>
  17. /* padmux devices to enable */
  18. static struct pmx_dev *pmx_devs[] = {
  19. /* spear3xx specific devices */
  20. &pmx_i2c,
  21. &pmx_ssp,
  22. &pmx_gpio_pin0,
  23. &pmx_gpio_pin1,
  24. &pmx_gpio_pin2,
  25. &pmx_gpio_pin3,
  26. &pmx_gpio_pin4,
  27. &pmx_gpio_pin5,
  28. &pmx_uart0,
  29. /* spear310 specific devices */
  30. &pmx_emi_cs_0_1_4_5,
  31. &pmx_emi_cs_2_3,
  32. &pmx_uart1,
  33. &pmx_uart2,
  34. &pmx_uart3_4_5,
  35. &pmx_fsmc,
  36. &pmx_rs485_0_1,
  37. &pmx_tdm0,
  38. };
  39. static struct amba_device *amba_devs[] __initdata = {
  40. /* spear3xx specific devices */
  41. &gpio_device,
  42. &uart_device,
  43. /* spear310 specific devices */
  44. };
  45. static struct platform_device *plat_devs[] __initdata = {
  46. /* spear3xx specific devices */
  47. /* spear310 specific devices */
  48. };
  49. static void __init spear310_evb_init(void)
  50. {
  51. unsigned int i;
  52. /* padmux initialization, must be done before spear310_init */
  53. pmx_driver.mode = NULL;
  54. pmx_driver.devs = pmx_devs;
  55. pmx_driver.devs_count = ARRAY_SIZE(pmx_devs);
  56. /* call spear310 machine init function */
  57. spear310_init();
  58. /* Add Platform Devices */
  59. platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));
  60. /* Add Amba Devices */
  61. for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
  62. amba_device_register(amba_devs[i], &iomem_resource);
  63. }
  64. MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
  65. .boot_params = 0x00000100,
  66. .map_io = spear3xx_map_io,
  67. .init_irq = spear3xx_init_irq,
  68. .timer = &spear3xx_timer,
  69. .init_machine = spear310_evb_init,
  70. MACHINE_END