Thermal Management

Adrian Cox apc at agelectronics.co.uk
Fri Dec 3 04:07:27 EST 1999


I've been working on use of the thermal assist unit to control the
temperature of G3s.  A code fragment is below. This works to keep a
below-normal-spec chip at a junction temperature below the limit of 65C,
but is quite crude. In particular, I just made up the value of ICTC.
Does anyone have any suggestions for a good control stratgy for running
at constant temperature?

- Adrian Cox, AG Electronics

asmlinkage void do_THERM(struct pt_regs *regs)
{
 unsigned t2 = _get_THRM2();
 if (t2 & THRM1_TIN) {
  int threshold = (t2 & THRM1_THRES) >> 23;
  if (t2 & THRM1_TID) {
   printk("Below threshold temp %d\n", threshold);
   _set_THRM2(((threshold + 4) << 23) |  THRM1_V | THRM1_TIE);
   _set_ICTC(0);
  } else {
   printk("Above threshold temp %d\n", threshold);
   _set_THRM2(((threshold - 4) << 23) | THRM1_TID | THRM1_V |
THRM1_TIE);
   _set_ICTC(0x5);
   }
  _set_THRM3(0x00003f69);
   } else
   printk("Unexpected TAU trap at PC: %lx, SR: %lx, vector=%lx\n",
    regs->nip, regs->msr, regs->trap);
}

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list