mach-bug.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C) 2000 Deep Blue Solutions Ltd
  3. * Copyright (C) 2002 Shane Nay (shane@minirl.com)
  4. * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  5. * Copyright 2011 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/init.h>
  19. #include <linux/platform_device.h>
  20. #include <asm/mach/time.h>
  21. #include <asm/mach/arch.h>
  22. #include <asm/mach-types.h>
  23. #include "common.h"
  24. #include "devices-imx31.h"
  25. #include "hardware.h"
  26. #include "iomux-mx3.h"
  27. static const struct imxuart_platform_data uart_pdata __initconst = {
  28. .flags = IMXUART_HAVE_RTSCTS,
  29. };
  30. static const unsigned int bug_pins[] __initconst = {
  31. MX31_PIN_PC_RST__CTS5,
  32. MX31_PIN_PC_VS2__RTS5,
  33. MX31_PIN_PC_BVD2__TXD5,
  34. MX31_PIN_PC_BVD1__RXD5,
  35. };
  36. static void __init bug_board_init(void)
  37. {
  38. imx31_soc_init();
  39. mxc_iomux_setup_multiple_pins(bug_pins,
  40. ARRAY_SIZE(bug_pins), "uart-4");
  41. imx31_add_imx_uart4(&uart_pdata);
  42. }
  43. static void __init bug_timer_init(void)
  44. {
  45. mx31_clocks_init(26000000);
  46. }
  47. MACHINE_START(BUG, "BugLabs BUGBase")
  48. .map_io = mx31_map_io,
  49. .init_early = imx31_init_early,
  50. .init_irq = mx31_init_irq,
  51. .init_time = bug_timer_init,
  52. .init_machine = bug_board_init,
  53. .restart = mxc_restart,
  54. MACHINE_END