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:
parent
0b367bd8c0
commit
cfa892b592
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212825
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user