spear320_evb.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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/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_mii,
  23. &pmx_uart0,
  24. /* spear320 specific devices */
  25. &pmx_fsmc,
  26. &pmx_sdhci,
  27. &pmx_i2s,
  28. &pmx_uart1,
  29. &pmx_uart2,
  30. &pmx_can,
  31. &pmx_pwm0,
  32. &pmx_pwm1,
  33. &pmx_pwm2,
  34. &pmx_mii1,
  35. };
  36. static struct amba_device *amba_devs[] __initdata = {
  37. /* spear3xx specific devices */
  38. &gpio_device,
  39. &uart_device,
  40. /* spear320 specific devices */
  41. };
  42. static struct platform_device *plat_devs[] __initdata = {
  43. /* spear3xx specific devices */
  44. /* spear320 specific devices */
  45. };
  46. static void __init spear320_evb_init(void)
  47. {
  48. unsigned int i;
  49. /* padmux initialization, must be done before spear320_init */
  50. pmx_driver.mode = &auto_net_mii_mode;
  51. pmx_driver.devs = pmx_devs;
  52. pmx_driver.devs_count = ARRAY_SIZE(pmx_devs);
  53. /* call spear320 machine init function */
  54. spear320_init();
  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(SPEAR320, "ST-SPEAR320-EVB")
  62. .boot_params = 0x00000100,
  63. .map_io = spear3xx_map_io,
  64. .init_irq = spear3xx_init_irq,
  65. .timer = &spear3xx_timer,
  66. .init_machine = spear320_evb_init,
  67. MACHINE_END