p720t.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * linux/arch/arm/mach-clps711x/p720t.c
  3. *
  4. * Copyright (C) 2000-2001 Deep Blue Solutions Ltd
  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/kernel.h>
  21. #include <linux/init.h>
  22. #include <linux/types.h>
  23. #include <linux/string.h>
  24. #include <linux/mm.h>
  25. #include <linux/io.h>
  26. #include <mach/hardware.h>
  27. #include <asm/pgtable.h>
  28. #include <asm/page.h>
  29. #include <asm/setup.h>
  30. #include <asm/sizes.h>
  31. #include <asm/mach-types.h>
  32. #include <asm/mach/arch.h>
  33. #include <asm/mach/map.h>
  34. #include <mach/syspld.h>
  35. #include "common.h"
  36. /*
  37. * Map the P720T system PLD. It occupies two address spaces:
  38. * SYSPLD_PHYS_BASE and SYSPLD_PHYS_BASE + 0x00400000
  39. * We map both here.
  40. */
  41. static struct map_desc p720t_io_desc[] __initdata = {
  42. {
  43. .virtual = SYSPLD_VIRT_BASE,
  44. .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE),
  45. .length = SZ_1M,
  46. .type = MT_DEVICE
  47. }, {
  48. .virtual = 0xfe400000,
  49. .pfn = __phys_to_pfn(0x10400000),
  50. .length = SZ_1M,
  51. .type = MT_DEVICE
  52. }
  53. };
  54. static void __init
  55. fixup_p720t(struct machine_desc *desc, struct tag *tag,
  56. char **cmdline, struct meminfo *mi)
  57. {
  58. /*
  59. * Our bootloader doesn't setup any tags (yet).
  60. */
  61. if (tag->hdr.tag != ATAG_CORE) {
  62. tag->hdr.tag = ATAG_CORE;
  63. tag->hdr.size = tag_size(tag_core);
  64. tag->u.core.flags = 0;
  65. tag->u.core.pagesize = PAGE_SIZE;
  66. tag->u.core.rootdev = 0x0100;
  67. tag = tag_next(tag);
  68. tag->hdr.tag = ATAG_MEM;
  69. tag->hdr.size = tag_size(tag_mem32);
  70. tag->u.mem.size = 4096;
  71. tag->u.mem.start = PHYS_OFFSET;
  72. tag = tag_next(tag);
  73. tag->hdr.tag = ATAG_NONE;
  74. tag->hdr.size = 0;
  75. }
  76. }
  77. static void __init p720t_map_io(void)
  78. {
  79. clps711x_map_io();
  80. iotable_init(p720t_io_desc, ARRAY_SIZE(p720t_io_desc));
  81. }
  82. MACHINE_START(P720T, "ARM-Prospector720T")
  83. /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
  84. .boot_params = 0xc0000100,
  85. .fixup = fixup_p720t,
  86. .map_io = p720t_map_io,
  87. .init_irq = clps711x_init_irq,
  88. .timer = &clps711x_timer,
  89. MACHINE_END
  90. static int p720t_hw_init(void)
  91. {
  92. /*
  93. * Power down as much as possible in case we don't
  94. * have the drivers loaded.
  95. */
  96. PLD_LCDEN = 0;
  97. PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON);
  98. PLD_KBD = 0;
  99. PLD_IO = 0;
  100. PLD_IRDA = 0;
  101. PLD_CODEC = 0;
  102. PLD_TCH = 0;
  103. PLD_SPI = 0;
  104. #ifndef CONFIG_DEBUG_LL
  105. PLD_COM2 = 0;
  106. PLD_COM1 = 0;
  107. #endif
  108. return 0;
  109. }
  110. __initcall(p720t_hw_init);