2006-09-26 17:37:36 +09:00
/ *
* linux/ a r c h / a r m / m m / p r o c - a r m 7 t d m i . S : u t i l i t y f u n c t i o n s f o r A R M 7 T D M I
*
* Copyright ( C ) 2 0 0 3 - 2 0 0 6 H y o k S . C h o i < h y o k . c h o i @samsung.com>
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or modify
* it u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e v e r s i o n 2 a s
* published b y t h e F r e e S o f t w a r e F o u n d a t i o n .
*
* /
# include < l i n u x / l i n k a g e . h >
# include < l i n u x / i n i t . h >
# include < a s m / a s s e m b l e r . h >
# include < a s m / a s m - o f f s e t s . h >
2008-09-07 19:15:31 +01:00
# include < a s m / h w c a p . h >
2006-09-26 17:37:36 +09:00
# include < a s m / p g t a b l e - h w d e f . h >
# include < a s m / p g t a b l e . h >
# include < a s m / p t r a c e . h >
.text
/ *
* cpu_ a r m 7 t d m i _ p r o c _ i n i t ( )
* cpu_ a r m 7 t d m i _ d o _ i d l e ( )
* cpu_ a r m 7 t d m i _ d c a c h e _ c l e a n _ a r e a ( )
* cpu_ a r m 7 t d m i _ s w i t c h _ m m ( )
*
* These a r e n o t r e q u i r e d .
* /
ENTRY( c p u _ a r m 7 t d m i _ p r o c _ i n i t )
ENTRY( c p u _ a r m 7 t d m i _ d o _ i d l e )
ENTRY( c p u _ a r m 7 t d m i _ d c a c h e _ c l e a n _ a r e a )
ENTRY( c p u _ a r m 7 t d m i _ s w i t c h _ m m )
mov p c , l r
/ *
* cpu_ a r m 7 t d m i _ p r o c _ f i n ( )
* /
ENTRY( c p u _ a r m 7 t d m i _ p r o c _ f i n )
mov r0 , #P S R _ F _ B I T | P S R _ I _ B I T | S V C _ M O D E
msr c p s r _ c , r0
mov p c , l r
/ *
* Function : cpu_ a r m 7 t d m i _ r e s e t ( l o c )
* Params : l o c ( r0 ) a d d r e s s t o j u m p t o
* Purpose : S e t s u p e v e r y t h i n g f o r a r e s e t a n d j u m p t o t h e l o c a t i o n f o r s o f t r e s e t .
* /
ENTRY( c p u _ a r m 7 t d m i _ r e s e t )
mov p c , r0
_ _ INIT
.type _ _ arm7 t d m i _ s e t u p , #f u n c t i o n
__arm7tdmi_setup :
mov p c , l r
.size _ _ arm7 t d m i _ s e t u p , . - _ _ a r m 7 t d m i _ s e t u p
_ _ INITDATA
/ *
* Purpose : F u n c t i o n p o i n t e r s u s e d t o a c c e s s a b o v e f u n c t i o n s - a l l c a l l s
* come t h r o u g h t h e s e
* /
.type arm7 t d m i _ p r o c e s s o r _ f u n c t i o n s , #o b j e c t
ENTRY( a r m 7 t d m i _ p r o c e s s o r _ f u n c t i o n s )
.word v4t_late_abort
2008-04-21 18:42:04 +01:00
.word pabort_noifar
2006-09-26 17:37:36 +09:00
.word cpu_arm7tdmi_proc_init
.word cpu_arm7tdmi_proc_fin
.word cpu_arm7tdmi_reset
.word cpu_arm7tdmi_do_idle
.word cpu_arm7tdmi_dcache_clean_area
.word cpu_arm7tdmi_switch_mm
.word 0 @ cpu_*_set_pte
.size arm7 t d m i _ p r o c e s s o r _ f u n c t i o n s , . - a r m 7 t d m i _ p r o c e s s o r _ f u n c t i o n s
.section " .rodata "
.type cpu_ a r c h _ n a m e , #o b j e c t
cpu_arch_name :
.asciz " armv4 t "
.size cpu_ a r c h _ n a m e , . - c p u _ a r c h _ n a m e
.type cpu_ e l f _ n a m e , #o b j e c t
cpu_elf_name :
.asciz " v4 "
.size cpu_ e l f _ n a m e , . - c p u _ e l f _ n a m e
.type cpu_ a r m 7 t d m i _ n a m e , #o b j e c t
cpu_arm7tdmi_name :
.asciz " ARM7 T D M I "
.size cpu_ a r m 7 t d m i _ n a m e , . - c p u _ a r m 7 t d m i _ n a m e
.type cpu_ t r i s c e n d a7 _ n a m e , #o b j e c t
cpu_triscenda7_name :
.asciz " Triscend- A 7 x "
.size cpu_ t r i s c e n d a7 _ n a m e , . - c p u _ t r i s c e n d a7 _ n a m e
.type cpu_ a t 9 1 _ n a m e , #o b j e c t
cpu_at91_name :
.asciz " Atmel- A T 9 1 M 4 0 x x x "
.size cpu_ a t 9 1 _ n a m e , . - c p u _ a t 9 1 _ n a m e
.type cpu_ s3 c34 1 0 _ n a m e , #o b j e c t
cpu_s3c3410_name :
.asciz " Samsung- S 3 C 3 4 1 0 "
.size cpu_ s3 c34 1 0 _ n a m e , . - c p u _ s3 c34 1 0 _ n a m e
.type cpu_ s3 c44 b0 x _ n a m e , #o b j e c t
cpu_s3c44b0x_name :
.asciz " Samsung- S 3 C 4 4 B 0 x "
.size cpu_ s3 c44 b0 x _ n a m e , . - c p u _ s3 c44 b0 x _ n a m e
.type cpu_ s3 c45 1 0 b , #o b j e c t
cpu_s3c4510b_name :
.asciz " Samsung- S 3 C 4 5 1 0 B "
.size cpu_ s3 c45 1 0 b _ n a m e , . - c p u _ s3 c45 1 0 b _ n a m e
.type cpu_ s3 c45 3 0 _ n a m e , #o b j e c t
cpu_s3c4530_name :
.asciz " Samsung- S 3 C 4 5 3 0 "
.size cpu_ s3 c45 3 0 _ n a m e , . - c p u _ s3 c45 3 0 _ n a m e
.type cpu_ n e t a r m _ n a m e , #o b j e c t
cpu_netarm_name :
.asciz " NETARM"
.size cpu_ n e t a r m _ n a m e , . - c p u _ n e t a r m _ n a m e
.align
.section " .proc .info .init " , # alloc, #e x e c i n s t r
.type _ _ arm7 t d m i _ p r o c _ i n f o , #o b j e c t
__arm7tdmi_proc_info :
.long 0x41007700
.long 0xfff8ff00
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ 2 6 B I T
.long cpu_arm7tdmi_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ arm7 t d m i _ p r o c _ i n f o , . - _ _ a r m 7 d m i _ p r o c _ i n f o
.type _ _ triscenda7 _ p r o c _ i n f o , #o b j e c t
__triscenda7_proc_info :
.long 0x0001d2ff
.long 0x0001ffff
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_triscenda7_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ triscenda7 _ p r o c _ i n f o , . - _ _ t r i s c e n d a7 _ p r o c _ i n f o
.type _ _ at9 1 _ p r o c _ i n f o , #o b j e c t
__at91_proc_info :
.long 0x14000040
.long 0xfff000e0
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_at91_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ at9 1 _ p r o c _ i n f o , . - _ _ a t 9 1 _ p r o c _ i n f o
.type _ _ s3 c45 1 0 b _ p r o c _ i n f o , #o b j e c t
__s3c4510b_proc_info :
.long 0x36365000
.long 0xfffff000
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_s3c4510b_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ s3 c45 1 0 b _ p r o c _ i n f o , . - _ _ s3 c45 1 0 b _ p r o c _ i n f o
.type _ _ s3 c45 3 0 _ p r o c _ i n f o , #o b j e c t
__s3c4530_proc_info :
.long 0x4c000000
.long 0xfff000e0
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_s3c4530_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ s3 c45 3 0 _ p r o c _ i n f o , . - _ _ s3 c45 3 0 _ p r o c _ i n f o
.type _ _ s3 c34 1 0 _ p r o c _ i n f o , #o b j e c t
__s3c3410_proc_info :
.long 0x34100000
.long 0xffff0000
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_s3c3410_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ s3 c34 1 0 _ p r o c _ i n f o , . - _ _ s3 c34 1 0 _ p r o c _ i n f o
.type _ _ s3 c44 b0 x _ p r o c _ i n f o , #o b j e c t
__s3c44b0x_proc_info :
.long 0x44b00000
.long 0xffff0000
.long 0
.long 0
b _ _ a r m 7 t d m i _ s e t u p
.long cpu_arch_name
.long cpu_elf_name
.long HWCAP_SWP | HWCAP_ T H U M B | H W C A P _ 2 6 B I T
.long cpu_s3c44b0x_name
.long arm7tdmi_processor_functions
.long 0
.long 0
.long v4_cache_fns
.size _ _ s3 c44 b0 x _ p r o c _ i n f o , . - _ _ s3 c44 b0 x _ p r o c _ i n f o