linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Thermal Management
@ 1999-12-02 17:07 Adrian Cox
  0 siblings, 0 replies; only message in thread
From: Adrian Cox @ 1999-12-02 17:07 UTC (permalink / raw)
  To: LinuxPPC-Dev, linuxppc-embedded


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-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-12-02 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-02 17:07 Thermal Management Adrian Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).