mx35pdk.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright 2009 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. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #include <linux/types.h>
  21. #include <linux/init.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/memory.h>
  24. #include <linux/gpio.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/mach/time.h>
  28. #include <asm/mach/map.h>
  29. #include <mach/hardware.h>
  30. #include <mach/common.h>
  31. #include <mach/imx-uart.h>
  32. #include <mach/iomux-mx35.h>
  33. #include "devices.h"
  34. static struct imxuart_platform_data uart_pdata = {
  35. .flags = IMXUART_HAVE_RTSCTS,
  36. };
  37. static struct platform_device *devices[] __initdata = {
  38. &mxc_fec_device,
  39. };
  40. static struct pad_desc mx35pdk_pads[] = {
  41. /* UART1 */
  42. MX35_PAD_CTS1__UART1_CTS,
  43. MX35_PAD_RTS1__UART1_RTS,
  44. MX35_PAD_TXD1__UART1_TXD_MUX,
  45. MX35_PAD_RXD1__UART1_RXD_MUX,
  46. /* FEC */
  47. MX35_PAD_FEC_TX_CLK__FEC_TX_CLK,
  48. MX35_PAD_FEC_RX_CLK__FEC_RX_CLK,
  49. MX35_PAD_FEC_RX_DV__FEC_RX_DV,
  50. MX35_PAD_FEC_COL__FEC_COL,
  51. MX35_PAD_FEC_RDATA0__FEC_RDATA_0,
  52. MX35_PAD_FEC_TDATA0__FEC_TDATA_0,
  53. MX35_PAD_FEC_TX_EN__FEC_TX_EN,
  54. MX35_PAD_FEC_MDC__FEC_MDC,
  55. MX35_PAD_FEC_MDIO__FEC_MDIO,
  56. MX35_PAD_FEC_TX_ERR__FEC_TX_ERR,
  57. MX35_PAD_FEC_RX_ERR__FEC_RX_ERR,
  58. MX35_PAD_FEC_CRS__FEC_CRS,
  59. MX35_PAD_FEC_RDATA1__FEC_RDATA_1,
  60. MX35_PAD_FEC_TDATA1__FEC_TDATA_1,
  61. MX35_PAD_FEC_RDATA2__FEC_RDATA_2,
  62. MX35_PAD_FEC_TDATA2__FEC_TDATA_2,
  63. MX35_PAD_FEC_RDATA3__FEC_RDATA_3,
  64. MX35_PAD_FEC_TDATA3__FEC_TDATA_3,
  65. };
  66. /*
  67. * Board specific initialization.
  68. */
  69. static void __init mxc_board_init(void)
  70. {
  71. mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
  72. platform_add_devices(devices, ARRAY_SIZE(devices));
  73. mxc_register_device(&mxc_uart_device0, &uart_pdata);
  74. }
  75. static void __init mx35pdk_timer_init(void)
  76. {
  77. mx35_clocks_init();
  78. }
  79. struct sys_timer mx35pdk_timer = {
  80. .init = mx35pdk_timer_init,
  81. };
  82. MACHINE_START(MX35_3DS, "Freescale MX35PDK")
  83. /* Maintainer: Freescale Semiconductor, Inc */
  84. .phys_io = AIPS1_BASE_ADDR,
  85. .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
  86. .boot_params = PHYS_OFFSET + 0x100,
  87. .map_io = mx35_map_io,
  88. .init_irq = mx35_init_irq,
  89. .init_machine = mxc_board_init,
  90. .timer = &mx35pdk_timer,
  91. MACHINE_END