Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *  linux/arch/arm/mm/proc-arm7tdmi.S: utility functions for ARM7TDMI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *  Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <linux/linkage.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/pgtable.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <asm/assembler.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <asm/asm-offsets.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <asm/hwcap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <asm/pgtable-hwdef.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <asm/ptrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include "proc-macros.S"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	.text
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  * cpu_arm7tdmi_proc_init()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * cpu_arm7tdmi_do_idle()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  * cpu_arm7tdmi_dcache_clean_area()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  * cpu_arm7tdmi_switch_mm()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)  * These are not required.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) ENTRY(cpu_arm7tdmi_proc_init)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) ENTRY(cpu_arm7tdmi_do_idle)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) ENTRY(cpu_arm7tdmi_dcache_clean_area)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) ENTRY(cpu_arm7tdmi_switch_mm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 		ret	lr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)  * cpu_arm7tdmi_proc_fin()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) ENTRY(cpu_arm7tdmi_proc_fin)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 		ret	lr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)  * Function: cpu_arm7tdmi_reset(loc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)  * Params  : loc(r0)	address to jump to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)  * Purpose : Sets up everything for a reset and jump to the location for soft reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		.pushsection	.idmap.text, "ax"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) ENTRY(cpu_arm7tdmi_reset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 		ret	r0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) ENDPROC(cpu_arm7tdmi_reset)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 		.popsection
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		.type	__arm7tdmi_setup, #function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) __arm7tdmi_setup:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		ret	lr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		.size	__arm7tdmi_setup, . - __arm7tdmi_setup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		__INITDATA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		@ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		define_processor_functions arm7tdmi, dabort=v4t_late_abort, pabort=legacy_pabort, nommu=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		.section ".rodata"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 		string	cpu_arch_name, "armv4t"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 		string	cpu_elf_name, "v4"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 		string	cpu_arm7tdmi_name, "ARM7TDMI"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		string	cpu_triscenda7_name, "Triscend-A7x"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 		string	cpu_at91_name, "Atmel-AT91M40xxx"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		string	cpu_s3c3410_name, "Samsung-S3C3410"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		string	cpu_s3c44b0x_name, "Samsung-S3C44B0x"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		string	cpu_s3c4510b_name, "Samsung-S3C4510B"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		string	cpu_s3c4530_name, "Samsung-S3C4530"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		string	cpu_netarm_name, "NETARM"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 		.align
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 		.section ".proc.info.init", "a"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	extra_hwcaps=0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		.type	__\name\()_proc_info, #object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) __\name\()_proc_info:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		.long	\cpu_val
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		.long	\cpu_mask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		.long	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		.long	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		initfn	__arm7tdmi_setup, __\name\()_proc_info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		.long	cpu_arch_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		.long	cpu_elf_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		.long	HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		.long	\cpu_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		.long	arm7tdmi_processor_functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		.long	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		.long	0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		.long	v4_cache_fns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		.size	__\name\()_proc_info, . - __\name\()_proc_info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) .endm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		arm7tdmi_proc_info arm7tdmi, 0x41007700, 0xfff8ff00, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 			cpu_arm7tdmi_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		arm7tdmi_proc_info triscenda7, 0x0001d2ff, 0x0001ffff, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 			cpu_triscenda7_name, extra_hwcaps=HWCAP_THUMB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 		arm7tdmi_proc_info at91, 0x14000040, 0xfff000e0, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 			cpu_at91_name, extra_hwcaps=HWCAP_THUMB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		arm7tdmi_proc_info s3c4510b, 0x36365000, 0xfffff000, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 			cpu_s3c4510b_name, extra_hwcaps=HWCAP_THUMB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		arm7tdmi_proc_info s3c4530, 0x4c000000, 0xfff000e0, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 			cpu_s3c4530_name, extra_hwcaps=HWCAP_THUMB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		arm7tdmi_proc_info s3c3410, 0x34100000, 0xffff0000, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 			cpu_s3c3410_name, extra_hwcaps=HWCAP_THUMB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		arm7tdmi_proc_info s3c44b0x, 0x44b00000, 0xffff0000, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 			cpu_s3c44b0x_name, extra_hwcaps=HWCAP_THUMB