Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  linux/arch/arm/mm/proc-arm7tdmi.S: utility functions for ARM7TDMI
0004  *
0005  *  Copyright (C) 2003-2006 Hyok S. Choi <hyok.choi@samsung.com>
0006  */
0007 #include <linux/linkage.h>
0008 #include <linux/init.h>
0009 #include <linux/pgtable.h>
0010 #include <asm/assembler.h>
0011 #include <asm/asm-offsets.h>
0012 #include <asm/hwcap.h>
0013 #include <asm/pgtable-hwdef.h>
0014 #include <asm/ptrace.h>
0015 
0016 #include "proc-macros.S"
0017 
0018     .text
0019 /*
0020  * cpu_arm7tdmi_proc_init()
0021  * cpu_arm7tdmi_do_idle()
0022  * cpu_arm7tdmi_dcache_clean_area()
0023  * cpu_arm7tdmi_switch_mm()
0024  *
0025  * These are not required.
0026  */
0027 ENTRY(cpu_arm7tdmi_proc_init)
0028 ENTRY(cpu_arm7tdmi_do_idle)
0029 ENTRY(cpu_arm7tdmi_dcache_clean_area)
0030 ENTRY(cpu_arm7tdmi_switch_mm)
0031         ret lr
0032 
0033 /*
0034  * cpu_arm7tdmi_proc_fin()
0035  */
0036 ENTRY(cpu_arm7tdmi_proc_fin)
0037         ret lr
0038 
0039 /*
0040  * Function: cpu_arm7tdmi_reset(loc)
0041  * Params  : loc(r0)    address to jump to
0042  * Purpose : Sets up everything for a reset and jump to the location for soft reset.
0043  */
0044         .pushsection    .idmap.text, "ax"
0045 ENTRY(cpu_arm7tdmi_reset)
0046         ret r0
0047 ENDPROC(cpu_arm7tdmi_reset)
0048         .popsection
0049 
0050         .type   __arm7tdmi_setup, #function
0051 __arm7tdmi_setup:
0052         ret lr
0053         .size   __arm7tdmi_setup, . - __arm7tdmi_setup
0054 
0055         __INITDATA
0056 
0057         @ define struct processor (see <asm/proc-fns.h> and proc-macros.S)
0058         define_processor_functions arm7tdmi, dabort=v4t_late_abort, pabort=legacy_pabort, nommu=1
0059 
0060         .section ".rodata"
0061 
0062         string  cpu_arch_name, "armv4t"
0063         string  cpu_elf_name, "v4"
0064         string  cpu_arm7tdmi_name, "ARM7TDMI"
0065         string  cpu_triscenda7_name, "Triscend-A7x"
0066         string  cpu_at91_name, "Atmel-AT91M40xxx"
0067         string  cpu_s3c3410_name, "Samsung-S3C3410"
0068         string  cpu_s3c44b0x_name, "Samsung-S3C44B0x"
0069         string  cpu_s3c4510b_name, "Samsung-S3C4510B"
0070         string  cpu_s3c4530_name, "Samsung-S3C4530"
0071         string  cpu_netarm_name, "NETARM"
0072 
0073         .align
0074 
0075         .section ".proc.info.init", "a"
0076 
0077 .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
0078     extra_hwcaps=0
0079         .type   __\name\()_proc_info, #object
0080 __\name\()_proc_info:
0081         .long   \cpu_val
0082         .long   \cpu_mask
0083         .long   0
0084         .long   0
0085         initfn  __arm7tdmi_setup, __\name\()_proc_info
0086         .long   cpu_arch_name
0087         .long   cpu_elf_name
0088         .long   HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps )
0089         .long   \cpu_name
0090         .long   arm7tdmi_processor_functions
0091         .long   0
0092         .long   0
0093         .long   v4_cache_fns
0094         .size   __\name\()_proc_info, . - __\name\()_proc_info
0095 .endm
0096 
0097         arm7tdmi_proc_info arm7tdmi, 0x41007700, 0xfff8ff00, \
0098             cpu_arm7tdmi_name
0099         arm7tdmi_proc_info triscenda7, 0x0001d2ff, 0x0001ffff, \
0100             cpu_triscenda7_name, extra_hwcaps=HWCAP_THUMB
0101         arm7tdmi_proc_info at91, 0x14000040, 0xfff000e0, \
0102             cpu_at91_name, extra_hwcaps=HWCAP_THUMB
0103         arm7tdmi_proc_info s3c4510b, 0x36365000, 0xfffff000, \
0104             cpu_s3c4510b_name, extra_hwcaps=HWCAP_THUMB
0105         arm7tdmi_proc_info s3c4530, 0x4c000000, 0xfff000e0, \
0106             cpu_s3c4530_name, extra_hwcaps=HWCAP_THUMB
0107         arm7tdmi_proc_info s3c3410, 0x34100000, 0xffff0000, \
0108             cpu_s3c3410_name, extra_hwcaps=HWCAP_THUMB
0109         arm7tdmi_proc_info s3c44b0x, 0x44b00000, 0xffff0000, \
0110             cpu_s3c44b0x_name, extra_hwcaps=HWCAP_THUMB