diff options
Diffstat (limited to 'sys/powerpc/cpufreq/pcr.c')
-rw-r--r-- | sys/powerpc/cpufreq/pcr.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/powerpc/cpufreq/pcr.c b/sys/powerpc/cpufreq/pcr.c index 08e9a33..fc17592 100644 --- a/sys/powerpc/cpufreq/pcr.c +++ b/sys/powerpc/cpufreq/pcr.c @@ -108,15 +108,20 @@ static void write_scom(register_t address, uint64_t value) { register_t msr; + #ifndef __powerpc64__ register_t hi, lo, scratch; - - hi = (value >> 32) & 0xffffffff; - lo = value & 0xffffffff; + #endif msr = mfmsr(); mtmsr(msr & ~PSL_EE); isync(); + #ifdef __powerpc64__ + mtspr(SPR_SCOMD, value); + #else + hi = (value >> 32) & 0xffffffff; + lo = value & 0xffffffff; mtspr64(SPR_SCOMD, hi, lo, scratch); + #endif isync(); mtspr(SPR_SCOMC, address | SCOMC_WRITE); isync(); |