mx31lite.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 <asm/hardware.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/mach/map.h>
  28. #include <asm/arch/common.h>
  29. #include <asm/page.h>
  30. #include <asm/setup.h>
  31. #include <asm/arch/board-mx31lite.h>
  32. /*
  33. * This file contains the board-specific initialization routines.
  34. */
  35. /*
  36. * This structure defines the MX31 memory map.
  37. */
  38. static struct map_desc mx31lite_io_desc[] __initdata = {
  39. {
  40. .virtual = AIPS1_BASE_ADDR_VIRT,
  41. .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
  42. .length = AIPS1_SIZE,
  43. .type = MT_NONSHARED_DEVICE
  44. }, {
  45. .virtual = SPBA0_BASE_ADDR_VIRT,
  46. .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
  47. .length = SPBA0_SIZE,
  48. .type = MT_NONSHARED_DEVICE
  49. }, {
  50. .virtual = AIPS2_BASE_ADDR_VIRT,
  51. .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
  52. .length = AIPS2_SIZE,
  53. .type = MT_NONSHARED_DEVICE
  54. }, {
  55. .virtual = CS4_BASE_ADDR_VIRT,
  56. .pfn = __phys_to_pfn(CS4_BASE_ADDR),
  57. .length = CS4_SIZE,
  58. .type = MT_DEVICE
  59. }
  60. };
  61. /*
  62. * Set up static virtual mappings.
  63. */
  64. void __init mx31lite_map_io(void)
  65. {
  66. mxc_map_io();
  67. iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
  68. }
  69. /*
  70. * Board specific initialization.
  71. */
  72. static void __init mxc_board_init(void)
  73. {
  74. }
  75. /*
  76. * The following uses standard kernel macros defined in arch.h in order to
  77. * initialize __mach_desc_MX31LITE data structure.
  78. */
  79. MACHINE_START(MX31LITE, "LogicPD MX31 LITEKIT")
  80. /* Maintainer: Freescale Semiconductor, Inc. */
  81. .phys_io = AIPS1_BASE_ADDR,
  82. .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
  83. .boot_params = PHYS_OFFSET + 0x100,
  84. .map_io = mx31lite_map_io,
  85. .init_irq = mxc_init_irq,
  86. .init_machine = mxc_board_init,
  87. .timer = &mxc_timer,
  88. MACHINE_END