mx31lite.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #include <linux/types.h>
  21. #include <linux/init.h>
  22. #include <linux/kernel.h>
  23. #include <linux/memory.h>
  24. #include <mach/hardware.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/mach/time.h>
  28. #include <asm/mach/map.h>
  29. #include <mach/common.h>
  30. #include <asm/page.h>
  31. #include <asm/setup.h>
  32. #include <mach/board-mx31lite.h>
  33. /*
  34. * This file contains the board-specific initialization routines.
  35. */
  36. /*
  37. * This structure defines the MX31 memory map.
  38. */
  39. static struct map_desc mx31lite_io_desc[] __initdata = {
  40. {
  41. .virtual = AIPS1_BASE_ADDR_VIRT,
  42. .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
  43. .length = AIPS1_SIZE,
  44. .type = MT_DEVICE_NONSHARED
  45. }, {
  46. .virtual = SPBA0_BASE_ADDR_VIRT,
  47. .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
  48. .length = SPBA0_SIZE,
  49. .type = MT_DEVICE_NONSHARED
  50. }, {
  51. .virtual = AIPS2_BASE_ADDR_VIRT,
  52. .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
  53. .length = AIPS2_SIZE,
  54. .type = MT_DEVICE_NONSHARED
  55. }, {
  56. .virtual = CS4_BASE_ADDR_VIRT,
  57. .pfn = __phys_to_pfn(CS4_BASE_ADDR),
  58. .length = CS4_SIZE,
  59. .type = MT_DEVICE
  60. }
  61. };
  62. /*
  63. * Set up static virtual mappings.
  64. */
  65. void __init mx31lite_map_io(void)
  66. {
  67. mxc_map_io();
  68. iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
  69. }
  70. /*
  71. * Board specific initialization.
  72. */
  73. static void __init mxc_board_init(void)
  74. {
  75. }
  76. static void __init mx31lite_timer_init(void)
  77. {
  78. mxc_clocks_init(26000000);
  79. mxc_timer_init("ipg_clk.0");
  80. }
  81. struct sys_timer mx31lite_timer = {
  82. .init = mx31lite_timer_init,
  83. };
  84. /*
  85. * The following uses standard kernel macros defined in arch.h in order to
  86. * initialize __mach_desc_MX31LITE data structure.
  87. */
  88. MACHINE_START(MX31LITE, "LogicPD MX31 LITEKIT")
  89. /* Maintainer: Freescale Semiconductor, Inc. */
  90. .phys_io = AIPS1_BASE_ADDR,
  91. .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
  92. .boot_params = PHYS_OFFSET + 0x100,
  93. .map_io = mx31lite_map_io,
  94. .init_irq = mxc_init_irq,
  95. .init_machine = mxc_board_init,
  96. .timer = &mx31lite_timer,
  97. MACHINE_END