xref: /openbmc/linux/arch/arm/mm/proc-arm9tdmi.S (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1d2912cb1SThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-only */
243f5f014SHyok S. Choi/*
343f5f014SHyok S. Choi *  linux/arch/arm/mm/proc-arm9tdmi.S: utility functions for ARM9TDMI
443f5f014SHyok S. Choi *
543f5f014SHyok S. Choi *  Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
643f5f014SHyok S. Choi */
743f5f014SHyok S. Choi#include <linux/linkage.h>
843f5f014SHyok S. Choi#include <linux/init.h>
9*65fddcfcSMike Rapoport#include <linux/pgtable.h>
1043f5f014SHyok S. Choi#include <asm/assembler.h>
1143f5f014SHyok S. Choi#include <asm/asm-offsets.h>
125ec9407dSRussell King#include <asm/hwcap.h>
1343f5f014SHyok S. Choi#include <asm/pgtable-hwdef.h>
1443f5f014SHyok S. Choi#include <asm/ptrace.h>
1543f5f014SHyok S. Choi
16b4a19f03SDave Martin#include "proc-macros.S"
17b4a19f03SDave Martin
1843f5f014SHyok S. Choi	.text
1943f5f014SHyok S. Choi/*
2043f5f014SHyok S. Choi * cpu_arm9tdmi_proc_init()
2143f5f014SHyok S. Choi * cpu_arm9tdmi_do_idle()
2243f5f014SHyok S. Choi * cpu_arm9tdmi_dcache_clean_area()
2343f5f014SHyok S. Choi * cpu_arm9tdmi_switch_mm()
2443f5f014SHyok S. Choi *
2543f5f014SHyok S. Choi * These are not required.
2643f5f014SHyok S. Choi */
2743f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_proc_init)
2843f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_do_idle)
2943f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_dcache_clean_area)
3043f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_switch_mm)
316ebbf2ceSRussell King		ret	lr
3243f5f014SHyok S. Choi
3343f5f014SHyok S. Choi/*
3443f5f014SHyok S. Choi * cpu_arm9tdmi_proc_fin()
3543f5f014SHyok S. Choi */
3643f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_proc_fin)
376ebbf2ceSRussell King		ret	lr
3843f5f014SHyok S. Choi
3943f5f014SHyok S. Choi/*
4043f5f014SHyok S. Choi * Function: cpu_arm9tdmi_reset(loc)
4143f5f014SHyok S. Choi * Params  : loc(r0)	address to jump to
4243f5f014SHyok S. Choi * Purpose : Sets up everything for a reset and jump to the location for soft reset.
4343f5f014SHyok S. Choi */
441a4baafaSWill Deacon		.pushsection	.idmap.text, "ax"
4543f5f014SHyok S. ChoiENTRY(cpu_arm9tdmi_reset)
466ebbf2ceSRussell King		ret	r0
471a4baafaSWill DeaconENDPROC(cpu_arm9tdmi_reset)
481a4baafaSWill Deacon		.popsection
4943f5f014SHyok S. Choi
5043f5f014SHyok S. Choi		.type	__arm9tdmi_setup, #function
5143f5f014SHyok S. Choi__arm9tdmi_setup:
526ebbf2ceSRussell King		ret	lr
5343f5f014SHyok S. Choi		.size	__arm9tdmi_setup, . - __arm9tdmi_setup
5443f5f014SHyok S. Choi
5543f5f014SHyok S. Choi		__INITDATA
5643f5f014SHyok S. Choi
57b4a19f03SDave Martin		@ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
58b4a19f03SDave Martin		define_processor_functions arm9tdmi, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
5943f5f014SHyok S. Choi
6043f5f014SHyok S. Choi		.section ".rodata"
6143f5f014SHyok S. Choi
62b4a19f03SDave Martin		string	cpu_arch_name, "armv4t"
63b4a19f03SDave Martin		string	cpu_elf_name, "v4"
64b4a19f03SDave Martin		string	cpu_arm9tdmi_name, "ARM9TDMI"
65b4a19f03SDave Martin		string	cpu_p2001_name, "P2001"
6643f5f014SHyok S. Choi
6743f5f014SHyok S. Choi		.align
6843f5f014SHyok S. Choi
69790756c7SNick Desaulniers		.section ".proc.info.init", "a"
7043f5f014SHyok S. Choi
71b4a19f03SDave Martin.macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
72b4a19f03SDave Martin		.type	__\name\()_proc_info, #object
73b4a19f03SDave Martin__\name\()_proc_info:
74b4a19f03SDave Martin		.long	\cpu_val
75b4a19f03SDave Martin		.long	\cpu_mask
7643f5f014SHyok S. Choi		.long	0
7743f5f014SHyok S. Choi		.long	0
78bf35706fSArd Biesheuvel		initfn	__arm9tdmi_setup, __\name\()_proc_info
7943f5f014SHyok S. Choi		.long	cpu_arch_name
8043f5f014SHyok S. Choi		.long	cpu_elf_name
8143f5f014SHyok S. Choi		.long	HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT
82b4a19f03SDave Martin		.long	\cpu_name
8343f5f014SHyok S. Choi		.long	arm9tdmi_processor_functions
8443f5f014SHyok S. Choi		.long	0
8543f5f014SHyok S. Choi		.long	0
8643f5f014SHyok S. Choi		.long	v4_cache_fns
87b4a19f03SDave Martin		.size	__\name\()_proc_info, . - __\name\()_proc_info
88b4a19f03SDave Martin.endm
8943f5f014SHyok S. Choi
90b4a19f03SDave Martin	arm9tdmi_proc_info arm9tdmi, 0x41009900, 0xfff8ff00, cpu_arm9tdmi_name
91b4a19f03SDave Martin	arm9tdmi_proc_info p2001, 0x41029000, 0xffffffff, cpu_p2001_name
92