proc-arm9tdmi.S 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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/hwcap.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 pabort_noifar
  61. .word cpu_arm9tdmi_proc_init
  62. .word cpu_arm9tdmi_proc_fin
  63. .word cpu_arm9tdmi_reset
  64. .word cpu_arm9tdmi_do_idle
  65. .word cpu_arm9tdmi_dcache_clean_area
  66. .word cpu_arm9tdmi_switch_mm
  67. .word 0 @ cpu_*_set_pte
  68. .size arm9tdmi_processor_functions, . - arm9tdmi_processor_functions
  69. .section ".rodata"
  70. .type cpu_arch_name, #object
  71. cpu_arch_name:
  72. .asciz "armv4t"
  73. .size cpu_arch_name, . - cpu_arch_name
  74. .type cpu_elf_name, #object
  75. cpu_elf_name:
  76. .asciz "v4"
  77. .size cpu_elf_name, . - cpu_elf_name
  78. .type cpu_arm9tdmi_name, #object
  79. cpu_arm9tdmi_name:
  80. .asciz "ARM9TDMI"
  81. .size cpu_arm9tdmi_name, . - cpu_arm9tdmi_name
  82. .type cpu_p2001_name, #object
  83. cpu_p2001_name:
  84. .asciz "P2001"
  85. .size cpu_p2001_name, . - cpu_p2001_name
  86. .align
  87. .section ".proc.info.init", #alloc, #execinstr
  88. .type __arm9tdmi_proc_info, #object
  89. __arm9tdmi_proc_info:
  90. .long 0x41009900
  91. .long 0xfff8ff00
  92. .long 0
  93. .long 0
  94. b __arm9tdmi_setup
  95. .long cpu_arch_name
  96. .long cpu_elf_name
  97. .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
  98. .long cpu_arm9tdmi_name
  99. .long arm9tdmi_processor_functions
  100. .long 0
  101. .long 0
  102. .long v4_cache_fns
  103. .size __arm9tdmi_proc_info, . - __arm9dmi_proc_info
  104. .type __p2001_proc_info, #object
  105. __p2001_proc_info:
  106. .long 0x41029000
  107. .long 0xffffffff
  108. .long 0
  109. .long 0
  110. b __arm9tdmi_setup
  111. .long cpu_arch_name
  112. .long cpu_elf_name
  113. .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
  114. .long cpu_p2001_name
  115. .long arm9tdmi_processor_functions
  116. .long 0
  117. .long 0
  118. .long v4_cache_fns
  119. .size __p2001_proc_info, . - __p2001_proc_info