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

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/arch/arm/kernel/arch.c
  3.  *
  4.  *  Architecture specific fixups.
  5.  */
  6. #include <linux/config.h>
  7. #include <linux/tty.h>
  8. #include <linux/delay.h>
  9. #include <linux/pm.h>
  10. #include <linux/init.h>
  11. #include <asm/elf.h>
  12. #include <asm/setup.h>
  13. #include <asm/mach-types.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/hardware/dec21285.h>
  16. extern void genarch_init_irq(void);
  17. unsigned int vram_size;
  18. #ifdef CONFIG_ARCH_ACORN
  19. unsigned int memc_ctrl_reg;
  20. unsigned int number_mfm_drives;
  21. static int __init parse_tag_acorn(const struct tag *tag)
  22. {
  23. memc_ctrl_reg = tag->u.acorn.memc_control_reg;
  24. number_mfm_drives = tag->u.acorn.adfsdrives;
  25. switch (tag->u.acorn.vram_pages) {
  26. case 512:
  27. vram_size += PAGE_SIZE * 256;
  28. case 256:
  29. vram_size += PAGE_SIZE * 256;
  30. default:
  31. break;
  32. }
  33. #if 0
  34. if (vram_size) {
  35. desc->video_start = 0x02000000;
  36. desc->video_end   = 0x02000000 + vram_size;
  37. }
  38. #endif
  39. return 0;
  40. }
  41. __tagtable(ATAG_ACORN, parse_tag_acorn);
  42. #ifdef CONFIG_ARCH_RPC
  43. static void __init
  44. fixup_riscpc(struct machine_desc *desc, struct param_struct *unusd,
  45.     char **cmdline, struct meminfo *mi)
  46. {
  47. /*
  48.  * RiscPC can't handle half-word loads and stores
  49.  */
  50. elf_hwcap &= ~HWCAP_HALF;
  51. }
  52. extern void __init rpc_map_io(void);
  53. MACHINE_START(RISCPC, "Acorn-RiscPC")
  54. MAINTAINER("Russell King")
  55. BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
  56. BOOT_PARAMS(0x10000100)
  57. DISABLE_PARPORT(0)
  58. DISABLE_PARPORT(1)
  59. FIXUP(fixup_riscpc)
  60. MAPIO(rpc_map_io)
  61. INITIRQ(genarch_init_irq)
  62. MACHINE_END
  63. #endif
  64. #ifdef CONFIG_ARCH_ARC
  65. MACHINE_START(ARCHIMEDES, "Acorn-Archimedes")
  66. MAINTAINER("Dave Gilbert")
  67. BOOT_PARAMS(0x0207c000)
  68. INITIRQ(genarch_init_irq)
  69. MACHINE_END
  70. #endif
  71. #ifdef CONFIG_ARCH_A5K
  72. MACHINE_START(A5K, "Acorn-A5000")
  73. MAINTAINER("Russell King")
  74. BOOT_PARAMS(0x0207c000)
  75. INITIRQ(genarch_init_irq)
  76. MACHINE_END
  77. #endif
  78. #endif
  79. #ifdef CONFIG_ARCH_L7200
  80. extern void __init l7200_map_io(void);
  81. static void __init
  82. fixup_l7200(struct machine_desc *desc, struct param_struct *unused,
  83.              char **cmdline, struct meminfo *mi)
  84. {
  85.         mi->nr_banks      = 1;
  86.         mi->bank[0].start = PHYS_OFFSET;
  87.         mi->bank[0].size  = (32*1024*1024);
  88.         mi->bank[0].node  = 0;
  89.         ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
  90.         setup_ramdisk( 1, 0, 0, CONFIG_BLK_DEV_RAM_SIZE);
  91.         setup_initrd( __phys_to_virt(0xf1000000), 0x005dac7b);
  92.         /* Serial Console COM2 and LCD */
  93. strcpy( *cmdline, "console=tty0 console=ttyLU1,115200");
  94.         /* Serial Console COM1 and LCD */
  95. //strcpy( *cmdline, "console=tty0 console=ttyLU0,115200");
  96.         /* Console on LCD */
  97. //strcpy( *cmdline, "console=tty0");
  98. }
  99. MACHINE_START(L7200, "LinkUp Systems L7200")
  100. MAINTAINER("Steve Hill / Scott McConnell")
  101. BOOT_MEM(0xf0000000, 0x80040000, 0xd0000000)
  102. FIXUP(fixup_l7200)
  103. MAPIO(l7200_map_io)
  104. INITIRQ(genarch_init_irq)
  105. MACHINE_END
  106. #endif
  107. #ifdef CONFIG_ARCH_NEXUSPCI
  108. extern void __init nexuspci_map_io(void);
  109. MACHINE_START(NEXUSPCI, "FTV/PCI")
  110. MAINTAINER("Philip Blundell")
  111. BOOT_MEM(0x40000000, 0x10000000, 0xe0000000)
  112. MAPIO(nexuspci_map_io)
  113. INITIRQ(genarch_init_irq)
  114. MACHINE_END
  115. #endif
  116. #ifdef CONFIG_ARCH_TBOX
  117. extern void __init tbox_map_io(void);
  118. MACHINE_START(TBOX, "unknown-TBOX")
  119. MAINTAINER("Philip Blundell")
  120. BOOT_MEM(0x80000000, 0x00400000, 0xe0000000)
  121. MAPIO(tbox_map_io)
  122. INITIRQ(genarch_init_irq)
  123. MACHINE_END
  124. #endif
  125. #ifdef CONFIG_ARCH_CLPS7110
  126. MACHINE_START(CLPS7110, "CL-PS7110")
  127. MAINTAINER("Werner Almesberger")
  128. INITIRQ(genarch_init_irq)
  129. MACHINE_END
  130. #endif
  131. #ifdef CONFIG_ARCH_ETOILE
  132. MACHINE_START(ETOILE, "Etoile")
  133. MAINTAINER("Alex de Vries")
  134. INITIRQ(genarch_init_irq)
  135. MACHINE_END
  136. #endif
  137. #ifdef CONFIG_ARCH_LACIE_NAS
  138. MACHINE_START(LACIE_NAS, "LaCie_NAS")
  139. MAINTAINER("Benjamin Herrenschmidt")
  140. INITIRQ(genarch_init_irq)
  141. MACHINE_END
  142. #endif
  143. #ifdef CONFIG_ARCH_CLPS7500
  144. extern void __init clps7500_map_io(void);
  145. MACHINE_START(CLPS7500, "CL-PS7500")
  146. MAINTAINER("Philip Blundell")
  147. BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
  148. MAPIO(clps7500_map_io)
  149. INITIRQ(genarch_init_irq)
  150. MACHINE_END
  151. #endif