mach-imx27lite.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
  3. * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
  4. * Copyright 2009 Daniel Schaeffer (daniel.schaeffer@timesys.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 <linux/platform_device.h>
  17. #include <linux/gpio.h>
  18. #include <asm/mach-types.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach/time.h>
  21. #include <asm/mach/map.h>
  22. #include <mach/hardware.h>
  23. #include <mach/common.h>
  24. #include <mach/iomux-mx27.h>
  25. #include "devices-imx27.h"
  26. #include "devices.h"
  27. static unsigned int mx27lite_pins[] = {
  28. /* UART1 */
  29. PE12_PF_UART1_TXD,
  30. PE13_PF_UART1_RXD,
  31. PE14_PF_UART1_CTS,
  32. PE15_PF_UART1_RTS,
  33. /* FEC */
  34. PD0_AIN_FEC_TXD0,
  35. PD1_AIN_FEC_TXD1,
  36. PD2_AIN_FEC_TXD2,
  37. PD3_AIN_FEC_TXD3,
  38. PD4_AOUT_FEC_RX_ER,
  39. PD5_AOUT_FEC_RXD1,
  40. PD6_AOUT_FEC_RXD2,
  41. PD7_AOUT_FEC_RXD3,
  42. PD8_AF_FEC_MDIO,
  43. PD9_AIN_FEC_MDC,
  44. PD10_AOUT_FEC_CRS,
  45. PD11_AOUT_FEC_TX_CLK,
  46. PD12_AOUT_FEC_RXD0,
  47. PD13_AOUT_FEC_RX_DV,
  48. PD14_AOUT_FEC_RX_CLK,
  49. PD15_AOUT_FEC_COL,
  50. PD16_AIN_FEC_TX_ER,
  51. PF23_AIN_FEC_TX_EN,
  52. };
  53. static const struct imxuart_platform_data uart_pdata __initconst = {
  54. .flags = IMXUART_HAVE_RTSCTS,
  55. };
  56. static struct platform_device *platform_devices[] __initdata = {
  57. &mxc_fec_device,
  58. };
  59. static void __init mx27lite_init(void)
  60. {
  61. mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins),
  62. "imx27lite");
  63. imx27_add_imx_uart0(&uart_pdata);
  64. platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
  65. }
  66. static void __init mx27lite_timer_init(void)
  67. {
  68. mx27_clocks_init(26000000);
  69. }
  70. static struct sys_timer mx27lite_timer = {
  71. .init = mx27lite_timer_init,
  72. };
  73. MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
  74. .phys_io = MX27_AIPI_BASE_ADDR,
  75. .io_pg_offst = ((MX27_AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
  76. .boot_params = MX27_PHYS_OFFSET + 0x100,
  77. .map_io = mx27_map_io,
  78. .init_irq = mx27_init_irq,
  79. .init_machine = mx27lite_init,
  80. .timer = &mx27lite_timer,
  81. MACHINE_END