arch.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * linux/arch/arm/mach-footbridge/arch.c
  3.  *
  4.  * Architecture specific fixups.  This is where any
  5.  * parameters in the params struct are fixed up, or
  6.  * any additional architecture specific information
  7.  * is pulled from the params struct.
  8.  */
  9. #include <linux/config.h>
  10. #include <linux/module.h>
  11. #include <linux/tty.h>
  12. #include <linux/delay.h>
  13. #include <linux/pm.h>
  14. #include <linux/init.h>
  15. #include <asm/hardware/dec21285.h>
  16. #include <asm/elf.h>
  17. #include <asm/setup.h>
  18. #include <asm/mach-types.h>
  19. #include <asm/mach/arch.h>
  20. extern void footbridge_map_io(void);
  21. extern void footbridge_init_irq(void);
  22. unsigned int mem_fclk_21285 = 50000000;
  23. EXPORT_SYMBOL(mem_fclk_21285);
  24. static int __init parse_tag_memclk(const struct tag *tag)
  25. {
  26. mem_fclk_21285 = tag->u.memclk.fmemclk;
  27. return 0;
  28. }
  29. __tagtable(ATAG_MEMCLK, parse_tag_memclk);
  30. #ifdef CONFIG_ARCH_EBSA285
  31. static void __init
  32. fixup_ebsa285(struct machine_desc *desc, struct param_struct *params,
  33.       char **cmdline, struct meminfo *mi)
  34. {
  35. ORIG_X  = params->u1.s.video_x;
  36. ORIG_Y  = params->u1.s.video_y;
  37. ORIG_VIDEO_COLS  = params->u1.s.video_num_cols;
  38. ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
  39. }
  40. MACHINE_START(EBSA285, "EBSA285")
  41. MAINTAINER("Russell King")
  42. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  43. BOOT_PARAMS(0x00000100)
  44. VIDEO(0x000a0000, 0x000bffff)
  45. FIXUP(fixup_ebsa285)
  46. MAPIO(footbridge_map_io)
  47. INITIRQ(footbridge_init_irq)
  48. MACHINE_END
  49. #endif
  50. #ifdef CONFIG_ARCH_NETWINDER
  51. /*
  52.  * Older NeTTroms either do not provide a parameters
  53.  * page, or they don't supply correct information in
  54.  * the parameter page.
  55.  */
  56. static void __init
  57. fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
  58. char **cmdline, struct meminfo *mi)
  59. {
  60. #ifdef CONFIG_ISAPNP
  61. extern int isapnp_disable;
  62. /*
  63.  * We must not use the kernels ISAPnP code
  64.  * on the NetWinder - it will reset the settings
  65.  * for the WaveArtist chip and render it inoperable.
  66.  */
  67. isapnp_disable = 1;
  68. #endif
  69. if (params->u1.s.nr_pages != 0x02000 &&
  70.     params->u1.s.nr_pages != 0x04000 &&
  71.     params->u1.s.nr_pages != 0x08000 &&
  72.     params->u1.s.nr_pages != 0x10000) {
  73. printk(KERN_WARNING "Warning: bad NeTTrom parameters "
  74.        "detected, using defaultsn");
  75. params->u1.s.nr_pages = 0x1000; /* 16MB */
  76. params->u1.s.ramdisk_size = 0;
  77. params->u1.s.flags = FLAG_READONLY;
  78. params->u1.s.initrd_start = 0;
  79. params->u1.s.initrd_size = 0;
  80. params->u1.s.rd_start = 0;
  81. }
  82. }
  83. MACHINE_START(NETWINDER, "Rebel-NetWinder")
  84. MAINTAINER("Russell King/Rebel.com")
  85. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  86. BOOT_PARAMS(0x00000100)
  87. VIDEO(0x000a0000, 0x000bffff)
  88. DISABLE_PARPORT(0)
  89. DISABLE_PARPORT(2)
  90. FIXUP(fixup_netwinder)
  91. MAPIO(footbridge_map_io)
  92. INITIRQ(footbridge_init_irq)
  93. MACHINE_END
  94. #endif
  95. #ifdef CONFIG_ARCH_CATS
  96. /*
  97.  * CATS uses soft-reboot by default, since
  98.  * hard reboots fail on early boards.
  99.  */
  100. static void __init
  101. fixup_cats(struct machine_desc *desc, struct param_struct *unused,
  102.    char **cmdline, struct meminfo *mi)
  103. {
  104. ORIG_VIDEO_LINES  = 25;
  105. ORIG_VIDEO_POINTS = 16;
  106. ORIG_Y = 24;
  107. }
  108. MACHINE_START(CATS, "Chalice-CATS")
  109. MAINTAINER("Philip Blundell")
  110. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  111. BOOT_PARAMS(0x00000100)
  112. SOFT_REBOOT
  113. FIXUP(fixup_cats)
  114. MAPIO(footbridge_map_io)
  115. INITIRQ(footbridge_init_irq)
  116. MACHINE_END
  117. #endif
  118. #ifdef CONFIG_ARCH_CO285
  119. static void __init
  120. fixup_coebsa285(struct machine_desc *desc, struct param_struct *unused,
  121. char **cmdline, struct meminfo *mi)
  122. {
  123. extern unsigned long boot_memory_end;
  124. extern char boot_command_line[];
  125. mi->nr_banks      = 1;
  126. mi->bank[0].start = PHYS_OFFSET;
  127. mi->bank[0].size  = boot_memory_end;
  128. mi->bank[0].node  = 0;
  129. *cmdline = boot_command_line;
  130. }
  131. MACHINE_START(CO285, "co-EBSA285")
  132. MAINTAINER("Mark van Doesburg")
  133. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000)
  134. FIXUP(fixup_coebsa285)
  135. MAPIO(footbridge_map_io)
  136. INITIRQ(footbridge_init_irq)
  137. MACHINE_END
  138. #endif
  139. #ifdef CONFIG_ARCH_PERSONAL_SERVER
  140. MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
  141. MAINTAINER("Jamey Hicks / George France")
  142. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  143. BOOT_PARAMS(0x00000100)
  144. MAPIO(footbridge_map_io)
  145. INITIRQ(footbridge_init_irq)
  146. MACHINE_END
  147. #endif