mach-mx23evk.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #include <linux/delay.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/gpio.h>
  17. #include <linux/irq.h>
  18. #include <asm/mach-types.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach/time.h>
  21. #include <mach/common.h>
  22. #include <mach/iomux-mx23.h>
  23. #include "devices-mx23.h"
  24. static const iomux_cfg_t mx23evk_pads[] __initconst = {
  25. /* duart */
  26. MX23_PAD_PWM0__DUART_RX | MXS_PAD_4MA,
  27. MX23_PAD_PWM1__DUART_TX | MXS_PAD_4MA,
  28. /* auart */
  29. MX23_PAD_AUART1_RX__AUART1_RX |
  30. (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
  31. MX23_PAD_AUART1_TX__AUART1_TX |
  32. (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
  33. MX23_PAD_AUART1_CTS__AUART1_CTS |
  34. (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
  35. MX23_PAD_AUART1_RTS__AUART1_RTS |
  36. (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
  37. };
  38. static void __init mx23evk_init(void)
  39. {
  40. mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
  41. mx23_add_duart();
  42. mx23_add_auart0();
  43. }
  44. static void __init mx23evk_timer_init(void)
  45. {
  46. mx23_clocks_init();
  47. }
  48. static struct sys_timer mx23evk_timer = {
  49. .init = mx23evk_timer_init,
  50. };
  51. MACHINE_START(MX23EVK, "Freescale MX23 EVK")
  52. /* Maintainer: Freescale Semiconductor, Inc. */
  53. .map_io = mx23_map_io,
  54. .init_irq = mx23_init_irq,
  55. .init_machine = mx23evk_init,
  56. .timer = &mx23evk_timer,
  57. MACHINE_END