mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-04-03 17:17:10 +02:00
cpg: allow overclock settings to be made permanent
This commit is contained in:
parent
10a2f2ecde
commit
814c7bc3e2
2 changed files with 17 additions and 0 deletions
|
@ -157,6 +157,11 @@ void cpg_get_overclock_setting(struct cpg_overclock_setting *s);
|
|||
/* Applies the specified overclock setting. */
|
||||
void cpg_set_overclock_setting(struct cpg_overclock_setting const *s);
|
||||
|
||||
/* Sets whether or node CPG parameters are retained when world switching, i.e.
|
||||
mostly whether overclock setting will remain while in the OS world and when
|
||||
leaving the add-in. */
|
||||
void cpg_set_overclock_permanent(bool permanent);
|
||||
|
||||
//---
|
||||
// Sleep functions
|
||||
//---
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <gint/clock.h>
|
||||
#include <gint/gint.h>
|
||||
#include <gint/hardware.h>
|
||||
#include <gint/drivers.h>
|
||||
#include <gint/mpu/cpg.h>
|
||||
#include <gint/mpu/bsc.h>
|
||||
#include <gint/mpu/wdt.h>
|
||||
|
@ -142,6 +143,17 @@ void cpg_set_overclock_setting(struct cpg_overclock_setting const *s)
|
|||
cpu_atomic_end();
|
||||
}
|
||||
|
||||
void cpg_set_overclock_permanent(bool permanent)
|
||||
{
|
||||
extern gint_driver_t drv_cpg;
|
||||
int i = &drv_cpg - gint_drivers;
|
||||
|
||||
if(permanent)
|
||||
gint_driver_flags[i] |= GINT_DRV_SHARED;
|
||||
else
|
||||
gint_driver_flags[i] &= ~GINT_DRV_SHARED;
|
||||
}
|
||||
|
||||
#if GINT_HW_FX
|
||||
|
||||
static struct cpg_overclock_setting const settings_fx9860g_sh3[5] = {
|
||||
|
|
Loading…
Add table
Reference in a new issue