linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Justin Hibbits <chmeeedalf@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: PowerMac PMU programming
Date: Sun, 10 Jun 2012 23:31:27 -0400	[thread overview]
Message-ID: <20120610233127.1284fec0@narn.knownspace> (raw)
In-Reply-To: <1339369393.24838.101.camel@pasglop>

On Mon, 11 Jun 2012 09:03:13 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Sun, 2012-06-10 at 09:29 -0400, Justin Hibbits wrote:
> > Hello,
> > 
> > I'm working on various PMU bits for FreeBSD (I know, not related to
> > Linux), but running into some problems, which the Linux crowd may be
> > able to help with, as it's already solved for Linux.  I've managed
> > to get it to sleep for performing the sleep operation and for the
> > CPU speed switch on MPC7455-based machines, but it goes catatonic,
> > not waking up.  I've installed the reset vector pointer at 0x0080,
> > which both OS X and Linux do, and flush the caches, but no luck.
> > During development of the Linux driver was this ever encountered?
> > Any assistance would be greatly appreciated, I've been banging my
> > head against this off and on for about 8 months now.
> > 
> > Thanks for any assistance.  I'm not subscribed to the list, so
> > please keep my address in replies.
> 
> Yes it was :-) pretty much any bug even minor during that process will
> cause just that :-)
> 
> One thing paulus did that helped us a lot initially was write a little
> synchronous version of the PMU send command and use it to blink the
> PMU LED very early on when resuming from sleep, which allows us to
> debug a bit.
> 
> It takes quite a bit of work (see the code in radeonfb) to get the
> graphics back, so most of the time you come back with nothing on
> screen.
> 
> If your machine is not a laptop, there are other possible
> considerations, such as the need to restore the PCI-PCI bridge that
> might be above the macio chip very early on, before you try to restore
> macio itself (we don't do that in Linux at this stage).
> 
> Cheers,
> Ben.
>  
> 

Thanks Ben,

I'll settle on just getting the CPU speed change working, losing 333MHz
on my TiBook is a few too many MHz for the poor thing to lose :)  I do
have a desktop, but that's my development platform, so needs to be
at least somewhat stable, so my TiBook is my guinea pig.

I've googled everything I can think of, but do you know of any
definitive PMU documentation?  Or can you give me any hints on what's
needed just for that simple operation?

I noticed that you wind down the ADB queue before killing the PMU.  Is
this necessary?  I only disable the interrupt by writing 0x10 to the
IER, but our interrupt model for the PMU is different from the Linux
one.  Is it also necessary to disable the interrupt input, even though
the register write should be disabling the PMU's asserting of the
line?  There doesn't seem to be much more different than that, and
setting the openpic priority, Linux sets it to 0x0f but I didn't see
anything in OS X doing that (might that be a problem, too?)

I would love to get my TiBook using the full 1GHz.

Thanks,

Justin

  reply	other threads:[~2012-06-11  3:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-10 13:29 PowerMac PMU programming Justin Hibbits
2012-06-10 23:03 ` Benjamin Herrenschmidt
2012-06-11  3:31   ` Justin Hibbits [this message]
2012-06-11 21:24     ` Benjamin Herrenschmidt
2012-06-13  2:40       ` Justin Hibbits
2012-10-21  2:56       ` Justin Hibbits

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=20120610233127.1284fec0@narn.knownspace \
    --to=chmeeedalf@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.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).