2019-06-04 01:11:33 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2006-09-26 01:38:05 -07:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
|
|
|
|
*/
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/init.h>
|
2024-04-23 00:45:47 -07:00
|
|
|
#include <linux/cfi_types.h>
|
2020-06-08 21:32:42 -07:00
|
|
|
#include <linux/pgtable.h>
|
2006-09-26 01:38:05 -07:00
|
|
|
#include <asm/assembler.h>
|
|
|
|
#include <asm/asm-offsets.h>
|
2008-09-07 11:15:31 -07:00
|
|
|
#include <asm/hwcap.h>
|
2006-09-26 01:38:05 -07:00
|
|
|
#include <asm/pgtable-hwdef.h>
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
|
2011-06-23 09:21:28 -07:00
|
|
|
#include "proc-macros.S"
|
|
|
|
|
2006-09-26 01:38:05 -07:00
|
|
|
.text
|
|
|
|
/*
|
|
|
|
* cpu_arm9tdmi_proc_init()
|
|
|
|
* cpu_arm9tdmi_do_idle()
|
|
|
|
* cpu_arm9tdmi_dcache_clean_area()
|
|
|
|
* cpu_arm9tdmi_switch_mm()
|
|
|
|
*
|
|
|
|
* These are not required.
|
|
|
|
*/
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_proc_init)
|
2014-06-30 08:29:12 -07:00
|
|
|
ret lr
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_proc_init)
|
|
|
|
|
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_do_idle)
|
|
|
|
ret lr
|
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_do_idle)
|
|
|
|
|
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_dcache_clean_area)
|
|
|
|
ret lr
|
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_dcache_clean_area)
|
|
|
|
|
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_switch_mm)
|
|
|
|
ret lr
|
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_switch_mm)
|
2006-09-26 01:38:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* cpu_arm9tdmi_proc_fin()
|
|
|
|
*/
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_proc_fin)
|
2014-06-30 08:29:12 -07:00
|
|
|
ret lr
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_proc_fin)
|
2006-09-26 01:38:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Function: cpu_arm9tdmi_reset(loc)
|
|
|
|
* Params : loc(r0) address to jump to
|
|
|
|
* Purpose : Sets up everything for a reset and jump to the location for soft reset.
|
|
|
|
*/
|
2011-11-15 06:25:04 -07:00
|
|
|
.pushsection .idmap.text, "ax"
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_TYPED_FUNC_START(cpu_arm9tdmi_reset)
|
2014-06-30 08:29:12 -07:00
|
|
|
ret r0
|
2024-04-23 00:45:47 -07:00
|
|
|
SYM_FUNC_END(cpu_arm9tdmi_reset)
|
2011-11-15 06:25:04 -07:00
|
|
|
.popsection
|
2006-09-26 01:38:05 -07:00
|
|
|
|
|
|
|
.type __arm9tdmi_setup, #function
|
|
|
|
__arm9tdmi_setup:
|
2014-06-30 08:29:12 -07:00
|
|
|
ret lr
|
2006-09-26 01:38:05 -07:00
|
|
|
.size __arm9tdmi_setup, . - __arm9tdmi_setup
|
|
|
|
|
|
|
|
__INITDATA
|
|
|
|
|
2011-06-23 09:21:28 -07:00
|
|
|
@ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
|
|
|
|
define_processor_functions arm9tdmi, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
|
2006-09-26 01:38:05 -07:00
|
|
|
|
|
|
|
.section ".rodata"
|
|
|
|
|
2011-06-23 09:21:28 -07:00
|
|
|
string cpu_arch_name, "armv4t"
|
|
|
|
string cpu_elf_name, "v4"
|
|
|
|
string cpu_arm9tdmi_name, "ARM9TDMI"
|
|
|
|
string cpu_p2001_name, "P2001"
|
2006-09-26 01:38:05 -07:00
|
|
|
|
|
|
|
.align
|
|
|
|
|
2019-11-04 11:31:45 -07:00
|
|
|
.section ".proc.info.init", "a"
|
2006-09-26 01:38:05 -07:00
|
|
|
|
2011-06-23 09:21:28 -07:00
|
|
|
.macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
|
|
|
.type __\name\()_proc_info, #object
|
|
|
|
__\name\()_proc_info:
|
|
|
|
.long \cpu_val
|
|
|
|
.long \cpu_mask
|
2006-09-26 01:38:05 -07:00
|
|
|
.long 0
|
|
|
|
.long 0
|
2015-03-17 23:29:32 -07:00
|
|
|
initfn __arm9tdmi_setup, __\name\()_proc_info
|
2006-09-26 01:38:05 -07:00
|
|
|
.long cpu_arch_name
|
|
|
|
.long cpu_elf_name
|
|
|
|
.long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
|
2011-06-23 09:21:28 -07:00
|
|
|
.long \cpu_name
|
2006-09-26 01:38:05 -07:00
|
|
|
.long arm9tdmi_processor_functions
|
|
|
|
.long 0
|
|
|
|
.long 0
|
|
|
|
.long v4_cache_fns
|
2011-06-23 09:21:28 -07:00
|
|
|
.size __\name\()_proc_info, . - __\name\()_proc_info
|
|
|
|
.endm
|
2006-09-26 01:38:05 -07:00
|
|
|
|
2011-06-23 09:21:28 -07:00
|
|
|
arm9tdmi_proc_info arm9tdmi, 0x41009900, 0xfff8ff00, cpu_arm9tdmi_name
|
|
|
|
arm9tdmi_proc_info p2001, 0x41029000, 0xffffffff, cpu_p2001_name
|