proc-arm9tdmi.S 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI
  4. *
  5. * Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
  6. */
  7. #include <linux/linkage.h>
  8. #include <linux/init.h>
  9. #include <linux/cfi_types.h>
  10. #include <linux/pgtable.h>
  11. #include <asm/assembler.h>
  12. #include <asm/asm-offsets.h>
  13. #include <asm/hwcap.h>
  14. #include <asm/pgtable-hwdef.h>
  15. #include <asm/ptrace.h>
  16. #include "proc-macros.S"
  17. .text
  18. /*
  19. * cpu_arm9tdmi_proc_init()
  20. * cpu_arm9tdmi_do_idle()
  21. * cpu_arm9tdmi_dcache_clean_area()
  22. * cpu_arm9tdmi_switch_mm()
  23. *
  24. * These are not required.
  25. */
  26. SYM_TYPED_FUNC_START(cpu_arm9tdmi_proc_init)
  27. ret lr
  28. SYM_FUNC_END(cpu_arm9tdmi_proc_init)
  29. SYM_TYPED_FUNC_START(cpu_arm9tdmi_do_idle)
  30. ret lr
  31. SYM_FUNC_END(cpu_arm9tdmi_do_idle)
  32. SYM_TYPED_FUNC_START(cpu_arm9tdmi_dcache_clean_area)
  33. ret lr
  34. SYM_FUNC_END(cpu_arm9tdmi_dcache_clean_area)
  35. SYM_TYPED_FUNC_START(cpu_arm9tdmi_switch_mm)
  36. ret lr
  37. SYM_FUNC_END(cpu_arm9tdmi_switch_mm)
  38. /*
  39. * cpu_arm9tdmi_proc_fin()
  40. */
  41. SYM_TYPED_FUNC_START(cpu_arm9tdmi_proc_fin)
  42. ret lr
  43. SYM_FUNC_END(cpu_arm9tdmi_proc_fin)
  44. /*
  45. * Function: cpu_arm9tdmi_reset(loc)
  46. * Params : loc(r0) address to jump to
  47. * Purpose : Sets up everything for a reset and jump to the location for soft reset.
  48. */
  49. .pushsection .idmap.text, "ax"
  50. SYM_TYPED_FUNC_START(cpu_arm9tdmi_reset)
  51. ret r0
  52. SYM_FUNC_END(cpu_arm9tdmi_reset)
  53. .popsection
  54. .type __arm9tdmi_setup, #function
  55. __arm9tdmi_setup:
  56. ret lr
  57. .size __arm9tdmi_setup, . - __arm9tdmi_setup
  58. __INITDATA
  59. @ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
  60. define_processor_functions arm9tdmi, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
  61. .section ".rodata"
  62. string cpu_arch_name, "armv4t"
  63. string cpu_elf_name, "v4"
  64. string cpu_arm9tdmi_name, "ARM9TDMI"
  65. string cpu_p2001_name, "P2001"
  66. .align
  67. .section ".proc.info.init", "a"
  68. .macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
  69. .type __\name\()_proc_info, #object
  70. __\name\()_proc_info:
  71. .long \cpu_val
  72. .long \cpu_mask
  73. .long 0
  74. .long 0
  75. initfn __arm9tdmi_setup, __\name\()_proc_info
  76. .long cpu_arch_name
  77. .long cpu_elf_name
  78. .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
  79. .long \cpu_name
  80. .long arm9tdmi_processor_functions
  81. .long 0
  82. .long 0
  83. .long v4_cache_fns
  84. .size __\name\()_proc_info, . - __\name\()_proc_info
  85. .endm
  86. arm9tdmi_proc_info arm9tdmi, 0x41009900, 0xfff8ff00, cpu_arm9tdmi_name
  87. arm9tdmi_proc_info p2001, 0x41029000, 0xffffffff, cpu_p2001_name