spear320_evb.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * arch/arm/mach-spear3xx/spear320_evb.c
  3. *
  4. * SPEAr320 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_mii,
  24. &spear3xx_pmx_uart0,
  25. /* spear320 specific devices */
  26. &spear320_pmx_fsmc,
  27. &spear320_pmx_sdhci,
  28. &spear320_pmx_i2s,
  29. &spear320_pmx_uart1,
  30. &spear320_pmx_uart2,
  31. &spear320_pmx_can,
  32. &spear320_pmx_pwm0,
  33. &spear320_pmx_pwm1,
  34. &spear320_pmx_pwm2,
  35. &spear320_pmx_mii1,
  36. };
  37. static struct amba_device *amba_devs[] __initdata = {
  38. /* spear3xx specific devices */
  39. &spear3xx_gpio_device,
  40. &spear3xx_uart_device,
  41. /* spear320 specific devices */
  42. };
  43. static struct platform_device *plat_devs[] __initdata = {
  44. /* spear3xx specific devices */
  45. /* spear320 specific devices */
  46. };
  47. static void __init spear320_evb_init(void)
  48. {
  49. unsigned int i;
  50. /* call spear320 machine init function */
  51. spear320_init(&spear320_auto_net_mii_mode, pmx_devs,
  52. ARRAY_SIZE(pmx_devs));
  53. /* Add Platform Devices */
  54. platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));
  55. /* Add Amba Devices */
  56. for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
  57. amba_device_register(amba_devs[i], &iomem_resource);
  58. }
  59. MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
  60. .atag_offset = 0x100,
  61. .map_io = spear3xx_map_io,
  62. .init_irq = spear3xx_init_irq,
  63. .handle_irq = vic_handle_irq,
  64. .timer = &spear3xx_timer,
  65. .init_machine = spear320_evb_init,
  66. .restart = spear_restart,
  67. MACHINE_END