mach-imx27ipcam.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
  3. *
  4. * Author: Fabio Estevam <fabio.estevam@freescale.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <asm/mach-types.h>
  17. #include <asm/mach/arch.h>
  18. #include <asm/mach/time.h>
  19. #include <mach/hardware.h>
  20. #include <mach/common.h>
  21. #include <mach/iomux-mx27.h>
  22. #include "devices-imx27.h"
  23. static const int mx27ipcam_pins[] __initconst = {
  24. /* UART1 */
  25. PE12_PF_UART1_TXD,
  26. PE13_PF_UART1_RXD,
  27. /* FEC */
  28. PD0_AIN_FEC_TXD0,
  29. PD1_AIN_FEC_TXD1,
  30. PD2_AIN_FEC_TXD2,
  31. PD3_AIN_FEC_TXD3,
  32. PD4_AOUT_FEC_RX_ER,
  33. PD5_AOUT_FEC_RXD1,
  34. PD6_AOUT_FEC_RXD2,
  35. PD7_AOUT_FEC_RXD3,
  36. PD8_AF_FEC_MDIO,
  37. PD9_AIN_FEC_MDC,
  38. PD10_AOUT_FEC_CRS,
  39. PD11_AOUT_FEC_TX_CLK,
  40. PD12_AOUT_FEC_RXD0,
  41. PD13_AOUT_FEC_RX_DV,
  42. PD14_AOUT_FEC_RX_CLK,
  43. PD15_AOUT_FEC_COL,
  44. PD16_AIN_FEC_TX_ER,
  45. PF23_AIN_FEC_TX_EN,
  46. };
  47. static void __init mx27ipcam_init(void)
  48. {
  49. imx27_soc_init();
  50. mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins),
  51. "mx27ipcam");
  52. imx27_add_imx_uart0(NULL);
  53. imx27_add_fec(NULL);
  54. imx27_add_imx2_wdt(NULL);
  55. }
  56. static void __init mx27ipcam_timer_init(void)
  57. {
  58. mx27_clocks_init(25000000);
  59. }
  60. static struct sys_timer mx27ipcam_timer = {
  61. .init = mx27ipcam_timer_init,
  62. };
  63. MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
  64. /* maintainer: Freescale Semiconductor, Inc. */
  65. .atag_offset = 0x100,
  66. .map_io = mx27_map_io,
  67. .init_early = imx27_init_early,
  68. .init_irq = mx27_init_irq,
  69. .handle_irq = imx27_handle_irq,
  70. .timer = &mx27ipcam_timer,
  71. .init_machine = mx27ipcam_init,
  72. .restart = mxc_restart,
  73. MACHINE_END