linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Cox <apc@agelectronics.co.uk>
To: LinuxPPC-Dev <linuxppc-dev@lists.linuxppc.org>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Thermal Management
Date: Thu, 02 Dec 1999 17:07:27 +0000	[thread overview]
Message-ID: <3846A74F.2110114C@agelectronics.co.uk> (raw)


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/

                 reply	other threads:[~1999-12-02 17:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3846A74F.2110114C@agelectronics.co.uk \
    --to=apc@agelectronics.co.uk \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).