lluart.c 834 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright 2011 Freescale Semiconductor, Inc.
  3. * Copyright 2011 Linaro Ltd.
  4. *
  5. * The code contained herein is licensed under the GNU General Public
  6. * License. You may obtain a copy of the GNU General Public License
  7. * Version 2 or later at the following locations:
  8. *
  9. * http://www.opensource.org/licenses/gpl-license.html
  10. * http://www.gnu.org/copyleft/gpl.html
  11. */
  12. #include <linux/init.h>
  13. #include <asm/page.h>
  14. #include <asm/sizes.h>
  15. #include <asm/mach/map.h>
  16. #include <mach/hardware.h>
  17. static struct map_desc imx_lluart_desc = {
  18. #ifdef CONFIG_DEBUG_IMX6Q_UART4
  19. .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
  20. .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
  21. .length = MX6Q_UART4_SIZE,
  22. .type = MT_DEVICE,
  23. #endif
  24. };
  25. void __init imx_lluart_map_io(void)
  26. {
  27. if (imx_lluart_desc.virtual)
  28. iotable_init(&imx_lluart_desc, 1);
  29. }