proc-arm9tdmi.S 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI
  3. *
  4. * Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. */
  11. #include <linux/linkage.h>
  12. #include <linux/init.h>
  13. #include <asm/assembler.h>
  14. #include <asm/asm-offsets.h>
  15. #include <asm/elf.h>
  16. #include <asm/pgtable-hwdef.h>
  17. #include <asm/pgtable.h>
  18. #include <asm/ptrace.h>
  19. .text
  20. /*
  21. * cpu_arm9tdmi_proc_init()
  22. * cpu_arm9tdmi_do_idle()
  23. * cpu_arm9tdmi_dcache_clean_area()
  24. * cpu_arm9tdmi_switch_mm()
  25. *
  26. * These are not required.
  27. */
  28. ENTRY(cpu_arm9tdmi_proc_init)
  29. ENTRY(cpu_arm9tdmi_do_idle)
  30. ENTRY(cpu_arm9tdmi_dcache_clean_area)
  31. ENTRY(cpu_arm9tdmi_switch_mm)
  32. mov pc, lr
  33. /*
  34. * cpu_arm9tdmi_proc_fin()
  35. */
  36. ENTRY(cpu_arm9tdmi_proc_fin)
  37. mov r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE
  38. msr cpsr_c, r0
  39. mov pc, lr
  40. /*
  41. * Function: cpu_arm9tdmi_reset(loc)
  42. * Params : loc(r0) address to jump to
  43. * Purpose : Sets up everything for a reset and jump to the location for soft reset.
  44. */
  45. ENTRY(cpu_arm9tdmi_reset)
  46. mov pc, r0
  47. __INIT
  48. .type __arm9tdmi_setup, #function
  49. __arm9tdmi_setup:
  50. mov pc, lr
  51. .size __arm9tdmi_setup, . - __arm9tdmi_setup
  52. __INITDATA
  53. /*
  54. * Purpose : Function pointers used to access above functions - all calls
  55. * come through these
  56. */
  57. .type arm9tdmi_processor_functions, #object
  58. ENTRY(arm9tdmi_processor_functions)
  59. .word nommu_early_abort
  60. .word cpu_arm9tdmi_proc_init
  61. .word cpu_arm9tdmi_proc_fin
  62. .word cpu_arm9tdmi_reset
  63. .word cpu_arm9tdmi_do_idle
  64. .word cpu_arm9tdmi_dcache_clean_area
  65. .word cpu_arm9tdmi_switch_mm
  66. .word 0 @ cpu_*_set_pte
  67. .size arm9tdmi_processor_functions, . - arm9tdmi_processor_functions
  68. .section ".rodata"
  69. .type cpu_arch_name, #object
  70. cpu_arch_name:
  71. .asciz "armv4t"
  72. .size cpu_arch_name, . - cpu_arch_name
  73. .type cpu_elf_name, #object
  74. cpu_elf_name:
  75. .asciz "v4"
  76. .size cpu_elf_name, . - cpu_elf_name
  77. .type cpu_arm9tdmi_name, #object
  78. cpu_arm9tdmi_name:
  79. .asciz "ARM9TDMI"
  80. .size cpu_arm9tdmi_name, . - cpu_arm9tdmi_name
  81. .type cpu_p2001_name, #object
  82. cpu_p2001_name:
  83. .asciz "P2001"
  84. .size cpu_p2001_name, . - cpu_p2001_name
  85. .align
  86. .section ".proc.info.init", #alloc, #execinstr
  87. .type __arm9tdmi_proc_info, #object
  88. __arm9tdmi_proc_info:
  89. .long 0x41009900
  90. .long 0xfff8ff00
  91. .long 0
  92. .long 0
  93. b __arm9tdmi_setup
  94. .long cpu_arch_name
  95. .long cpu_elf_name
  96. .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
  97. .long cpu_arm9tdmi_name
  98. .long arm9tdmi_processor_functions
  99. .long 0
  100. .long 0
  101. .long v4_cache_fns
  102. .size __arm9tdmi_proc_info, . - __arm9dmi_proc_info
  103. .type __p2001_proc_info, #object
  104. __p2001_proc_info:
  105. .long 0x41029000
  106. .long 0xffffffff
  107. .long 0
  108. .long 0
  109. b __arm9tdmi_setup
  110. .long cpu_arch_name
  111. .long cpu_elf_name
  112. .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
  113. .long cpu_p2001_name
  114. .long arm9tdmi_processor_functions
  115. .long 0
  116. .long 0
  117. .long v4_cache_fns
  118. .size __p2001_proc_info, . - __p2001_proc_info