mm-mx50.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 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. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. * You should have received a copy of the GNU General Public License along
  13. * with this program; if not, write to the Free Software Foundation, Inc.,
  14. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. *
  16. * Create static mapping between physical to virtual memory.
  17. */
  18. #include <linux/mm.h>
  19. #include <linux/init.h>
  20. #include <asm/mach/map.h>
  21. #include <mach/hardware.h>
  22. #include <mach/common.h>
  23. #include <mach/iomux-v3.h>
  24. /*
  25. * Define the MX50 memory map.
  26. */
  27. static struct map_desc mx50_io_desc[] __initdata = {
  28. imx_map_entry(MX50, TZIC, MT_DEVICE),
  29. imx_map_entry(MX50, SPBA0, MT_DEVICE),
  30. imx_map_entry(MX50, AIPS1, MT_DEVICE),
  31. imx_map_entry(MX50, AIPS2, MT_DEVICE),
  32. };
  33. /*
  34. * This function initializes the memory map. It is called during the
  35. * system startup to create static physical to virtual memory mappings
  36. * for the IO modules.
  37. */
  38. void __init mx50_map_io(void)
  39. {
  40. mxc_set_cpu_type(MXC_CPU_MX50);
  41. mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
  42. mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
  43. iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
  44. }
  45. int imx50_register_gpios(void);
  46. void __init mx50_init_irq(void)
  47. {
  48. tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
  49. imx50_register_gpios();
  50. }