1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

Add basic cpu_sleep() support for Marvell SoCs. This drops my SheevaPlug's

heatsink termperature in open air from 49C to 43C when idle.
This commit is contained in:
Alexander Motin 2010-09-18 16:57:05 +00:00
parent 0b367bd8c0
commit cfa892b592
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212825
3 changed files with 12 additions and 1 deletions

View File

@ -397,7 +397,7 @@ struct cpu_functions sheeva_cpufuncs = {
cpufunc_nullop, /* flush_brnchtgt_C */
(void *)cpufunc_nullop, /* flush_brnchtgt_E */
(void *)cpufunc_nullop, /* sleep */
sheeva_cpu_sleep, /* sleep */
/* Soft functions */
@ -1076,6 +1076,9 @@ set_cpufuncs()
FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN |
FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN);
}
/* Use powersave on this CPU. */
cpu_do_powersave = 1;
} else
cpufuncs = armv5_ec_cpufuncs;

View File

@ -392,3 +392,10 @@ ENTRY(sheeva_control_ext)
mcrne p15, 1, r2, c15, c1, 0 /* Write new control register */
mov r0, r3 /* Return old value */
RET
ENTRY(sheeva_cpu_sleep)
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 /* Drain write buffer */
mcr p15, 0, r0, c7, c0, 4 /* Wait for interrupt */
mov pc, lr

View File

@ -400,6 +400,7 @@ extern unsigned arm10_dcache_index_max;
extern unsigned arm10_dcache_index_inc;
u_int sheeva_control_ext (u_int, u_int);
void sheeva_cpu_sleep (int);
void sheeva_setttb (u_int);
void sheeva_dcache_wbinv_range (vm_offset_t, vm_size_t);
void sheeva_dcache_inv_range (vm_offset_t, vm_size_t);