diff options
-rw-r--r-- | sys/arch/arm/arm/cpufunc.c | 20 | ||||
-rw-r--r-- | sys/arch/arm/include/cpufunc.h | 3 |
2 files changed, 16 insertions, 7 deletions
diff --git a/sys/arch/arm/arm/cpufunc.c b/sys/arch/arm/arm/cpufunc.c index d81bdb81b29..e8922a7bae1 100644 --- a/sys/arch/arm/arm/cpufunc.c +++ b/sys/arch/arm/arm/cpufunc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.c,v 1.18 2013/01/23 19:57:47 patrick Exp $ */ +/* $OpenBSD: cpufunc.c,v 1.19 2013/03/22 21:24:11 patrick Exp $ */ /* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */ /* @@ -250,7 +250,7 @@ struct cpu_functions armv5_ec_cpufuncs = { /* Soft functions */ arm10_context_switch, /* context_switch */ - arm10_setup /* cpu setup */ + arm9e_setup /* cpu setup */ }; #endif /* CPU_ARM9E || CPU_ARM10 */ @@ -1256,7 +1256,7 @@ arm9_setup() #if defined(CPU_ARM9E) || defined(CPU_ARM10) void -arm10_setup() +arm9e_setup() { int cpuctrl, cpuctrlmask; @@ -1280,9 +1280,6 @@ arm10_setup() /* Now really make sure they are clean. */ __asm __volatile ("mcr\tp15, 0, r0, c7, c7, 0" : : ); - /* Allow detection code to find the VFP if it's fitted. */ - __asm __volatile ("mcr\tp15, 0, %0, c1, c0, 2" : : "r" (0x0fffffff)); - /* Set the control register */ curcpu()->ci_ctrl = cpuctrl; cpu_control(0xffffffff, cpuctrl); @@ -1292,6 +1289,17 @@ arm10_setup() } #endif /* CPU_ARM9E || CPU_ARM10 */ +#if defined(CPU_ARM10) +void +arm10_setup() +{ + arm9e_setup(); + + /* Allow detection code to find the VFP if it's fitted. */ + __asm __volatile ("mcr\tp15, 0, %0, c1, c0, 2" : : "r" (0x0fffffff)); +} +#endif /* CPU_ARM10 */ + #ifdef CPU_ARM11 void arm11_setup() diff --git a/sys/arch/arm/include/cpufunc.h b/sys/arch/arm/include/cpufunc.h index 6f8348069fe..4f30f92b371 100644 --- a/sys/arch/arm/include/cpufunc.h +++ b/sys/arch/arm/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpufunc.h,v 1.10 2013/01/23 19:57:47 patrick Exp $ */ +/* $OpenBSD: cpufunc.h,v 1.11 2013/03/22 21:24:11 patrick Exp $ */ /* $NetBSD: cpufunc.h,v 1.29 2003/09/06 09:08:35 rearnsha Exp $ */ /* @@ -296,6 +296,7 @@ void arm10_tlb_flushI_SE (u_int); void arm10_context_switch (u_int); +void arm9e_setup (void); void arm10_setup (void); #endif |