arch.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:4k
源码类别:

嵌入式Linux

开发平台:

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. #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
  36. ORIG_X  = params->u1.s.video_x;
  37. ORIG_Y  = params->u1.s.video_y;
  38. ORIG_VIDEO_COLS  = params->u1.s.video_num_cols;
  39. ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
  40. #endif
  41. }
  42. MACHINE_START(EBSA285, "EBSA285")
  43. MAINTAINER("Russell King")
  44. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  45. BOOT_PARAMS(0x00000100)
  46. VIDEO(0x000a0000, 0x000bffff)
  47. FIXUP(fixup_ebsa285)
  48. MAPIO(footbridge_map_io)
  49. INITIRQ(footbridge_init_irq)
  50. MACHINE_END
  51. #endif
  52. #ifdef CONFIG_ARCH_NETWINDER
  53. /*
  54.  * Older NeTTroms either do not provide a parameters
  55.  * page, or they don't supply correct information in
  56.  * the parameter page.
  57.  */
  58. static void __init
  59. fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
  60. char **cmdline, struct meminfo *mi)
  61. {
  62. #ifdef CONFIG_ISAPNP
  63. extern int isapnp_disable;
  64. /*
  65.  * We must not use the kernels ISAPnP code
  66.  * on the NetWinder - it will reset the settings
  67.  * for the WaveArtist chip and render it inoperable.
  68.  */
  69. isapnp_disable = 1;
  70. #endif
  71. if (params->u1.s.nr_pages != 0x02000 &&
  72.     params->u1.s.nr_pages != 0x04000 &&
  73.     params->u1.s.nr_pages != 0x08000 &&
  74.     params->u1.s.nr_pages != 0x10000) {
  75. printk(KERN_WARNING "Warning: bad NeTTrom parameters "
  76.        "detected, using defaultsn");
  77. params->u1.s.nr_pages = 0x1000; /* 16MB */
  78. params->u1.s.ramdisk_size = 0;
  79. params->u1.s.flags = FLAG_READONLY;
  80. params->u1.s.initrd_start = 0;
  81. params->u1.s.initrd_size = 0;
  82. params->u1.s.rd_start = 0;
  83. }
  84. }
  85. MACHINE_START(NETWINDER, "Rebel-NetWinder")
  86. MAINTAINER("Russell King/Rebel.com")
  87. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  88. BOOT_PARAMS(0x00000100)
  89. VIDEO(0x000a0000, 0x000bffff)
  90. DISABLE_PARPORT(0)
  91. DISABLE_PARPORT(2)
  92. FIXUP(fixup_netwinder)
  93. MAPIO(footbridge_map_io)
  94. INITIRQ(footbridge_init_irq)
  95. MACHINE_END
  96. #endif
  97. #ifdef CONFIG_ARCH_CATS
  98. /*
  99.  * CATS uses soft-reboot by default, since
  100.  * hard reboots fail on early boards.
  101.  */
  102. static void __init
  103. fixup_cats(struct machine_desc *desc, struct param_struct *unused,
  104.    char **cmdline, struct meminfo *mi)
  105. {
  106. ORIG_VIDEO_LINES  = 25;
  107. ORIG_VIDEO_POINTS = 16;
  108. ORIG_Y = 24;
  109. }
  110. MACHINE_START(CATS, "Chalice-CATS")
  111. MAINTAINER("Philip Blundell")
  112. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  113. BOOT_PARAMS(0x00000100)
  114. SOFT_REBOOT
  115. FIXUP(fixup_cats)
  116. MAPIO(footbridge_map_io)
  117. INITIRQ(footbridge_init_irq)
  118. MACHINE_END
  119. #endif
  120. #ifdef CONFIG_ARCH_CO285
  121. static void __init
  122. fixup_coebsa285(struct machine_desc *desc, struct param_struct *unused,
  123. char **cmdline, struct meminfo *mi)
  124. {
  125. extern unsigned long boot_memory_end;
  126. extern char boot_command_line[];
  127. mi->nr_banks      = 1;
  128. mi->bank[0].start = PHYS_OFFSET;
  129. mi->bank[0].size  = boot_memory_end;
  130. mi->bank[0].node  = 0;
  131. *cmdline = boot_command_line;
  132. }
  133. MACHINE_START(CO285, "co-EBSA285")
  134. MAINTAINER("Mark van Doesburg")
  135. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000)
  136. FIXUP(fixup_coebsa285)
  137. MAPIO(footbridge_map_io)
  138. INITIRQ(footbridge_init_irq)
  139. MACHINE_END
  140. #endif
  141. #ifdef CONFIG_ARCH_PERSONAL_SERVER
  142. MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
  143. MAINTAINER("Jamey Hicks / George France")
  144. BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
  145. BOOT_PARAMS(0x00000100)
  146. MAPIO(footbridge_map_io)
  147. INITIRQ(footbridge_init_irq)
  148. MACHINE_END
  149. #endif