mm.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
  3. *
  4. * The code contained herein is licensed under the GNU General Public
  5. * License. You may obtain a copy of the GNU General Public License
  6. * Version 2 or later at the following locations:
  7. *
  8. * http://www.opensource.org/licenses/gpl-license.html
  9. * http://www.gnu.org/copyleft/gpl.html
  10. *
  11. * Create static mapping between physical to virtual memory.
  12. */
  13. #include <linux/mm.h>
  14. #include <linux/init.h>
  15. #include <linux/pinctrl/machine.h>
  16. #include <asm/mach/map.h>
  17. #include <mach/mx23.h>
  18. #include <mach/mx28.h>
  19. #include <mach/common.h>
  20. #include <mach/iomux.h>
  21. /*
  22. * Define the MX23 memory map.
  23. */
  24. static struct map_desc mx23_io_desc[] __initdata = {
  25. mxs_map_entry(MX23, OCRAM, MT_DEVICE),
  26. mxs_map_entry(MX23, IO, MT_DEVICE),
  27. };
  28. /*
  29. * Define the MX28 memory map.
  30. */
  31. static struct map_desc mx28_io_desc[] __initdata = {
  32. mxs_map_entry(MX28, OCRAM, MT_DEVICE),
  33. mxs_map_entry(MX28, IO, MT_DEVICE),
  34. };
  35. /*
  36. * This function initializes the memory map. It is called during the
  37. * system startup to create static physical to virtual memory mappings
  38. * for the IO modules.
  39. */
  40. void __init mx23_map_io(void)
  41. {
  42. iotable_init(mx23_io_desc, ARRAY_SIZE(mx23_io_desc));
  43. }
  44. void __init mx23_init_irq(void)
  45. {
  46. icoll_init_irq();
  47. }
  48. void __init mx28_map_io(void)
  49. {
  50. iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
  51. }
  52. void __init mx28_init_irq(void)
  53. {
  54. icoll_init_irq();
  55. }
  56. void __init mx23_soc_init(void)
  57. {
  58. pinctrl_provide_dummies();
  59. }
  60. void __init mx28_soc_init(void)
  61. {
  62. pinctrl_provide_dummies();
  63. }