mach-imx27ipcam.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins),
  50. "mx27ipcam");
  51. imx27_add_imx_uart0(NULL);
  52. imx27_add_fec(NULL);
  53. imx27_add_imx2_wdt(NULL);
  54. }
  55. static void __init mx27ipcam_timer_init(void)
  56. {
  57. mx27_clocks_init(25000000);
  58. }
  59. static struct sys_timer mx27ipcam_timer = {
  60. .init = mx27ipcam_timer_init,
  61. };
  62. MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
  63. /* maintainer: Freescale Semiconductor, Inc. */
  64. .boot_params = MX27_PHYS_OFFSET + 0x100,
  65. .map_io = mx27_map_io,
  66. .init_early = imx27_init_early,
  67. .init_irq = mx27_init_irq,
  68. .timer = &mx27ipcam_timer,
  69. .init_machine = mx27ipcam_init,
  70. MACHINE_END