APMD-List:
Archives

  
Back

to

APMD

Home

      Index: [thread] [date] [subject] [author]
  From: Peter T. Breuer <ptb@it.uc3m.es>
  To  : Jont Allen <jba@research.att.com>
  Date: Wed, 24 Nov 1999 00:51:38 +0100 (MET)

Re: Solution to Suspend/Resume and Crystal Sound problems on ThinkPad

"Jont Allen wrote:"
> "Peter T. Breuer" wrote:
> > >     [*] Advanced Power Management
> > >          [ ] Ignore USER SUSPEND
> > >          [ ] Enable APM at boot time
> > >          [*] Make CPU IDLE calls when idle
> > >          [*] Enable console blanking using APM
> > >          [*] Power off on shutdown
> > >          [*] Ignore multiple suspend/standby events
> > >          [*] Ignore multiple suspend/resume cycles
> > >          [ ] RTC stores time in GMT
> > >          [*] Allow interrupts during APM BIOS calls

> >    CONFIG_APM=y
> >    # CONFIG_APM_IGNORE_USER_SUSPEND is not set
> >    CONFIG_APM_DO_ENABLE=y
> 
> This response seems to be different that the above list. And it
> could be important.

I'm not ignoring suspends sent by the user, of course. I don't mind
where they come from. I don't see that you have it set either.
I don't recall what DO_ENABLE means.

> >    CONFIG_APM_CPU_IDLE=y

Like you.

> >    # CONFIG_APM_DISPLAY_BLANK is not set
> >    # CONFIG_APM_POWER_OFF is not set
> 
> these two are different but I expect not important.
> 
> >    CONFIG_APM_IGNORE_MULTIPLE_SUSPEND=y

> how is y here supposed to map to the 'Allow interupts' above?

?? This is the important bit. The TP380 seems to have implemented apm
weirdly. One hit on the key triggers multiple suspend notifications.
Each one triggers the suspend sequence anew, pre-empting the already
active sequence. The result is that nothing ever happens. One
has to choose this in order to see only the first suspend notification,
activate the suspend sequence and ignore more (unexpected) suspend
events while we're syncing and going into hibernation.

> It seems to me you Dont want to allow interrupts to map onto
> ignore mult suspends. Am I missing something here? We know

I don't know what you mean by "map onto". Do you mean the options
correspond to each other? Have a look in your .config and we'll be able
to tell. Better ... look in Configure.help.

> that CONFIG_APM_IGNORE_MULTIPLE_SUSPEND=y is a critical response
> to get APM to work on the think pad. 

Yes.

> > (2.0.36 and 35). In the code ...
> > 
> >  /* defined by PTB */
> >  #define APM_DEBUG
> >  #define ALWAYS_CALL_BUSY
> >  /* undef'ed by ptb for TP380 */
> 
> I hadn't heard about this one. But then I have an IBM-560X.
> 
> >  #undef APM_NOINTS

!! Must explain it :-). Isn't this the Enable interrupts during bios
calls that you had?

> > Possibly. I have it the other way round. The crystal driver needs a firmware
> > key sent to it to set itself up. It may have changed.
> 
> Can you explain this to me. What is the purpose of the key? Are you talking
> about encription of some form?

I looked at the driver once and noted that it sends a "key sequence" to a
certain port in order to setup the device. There's this kind of stuff
in the driver:


#define KEY_PORT        0x279   /* Same as LPT1 status port */
#define CSN_NUM         0x99    /* Just a random number */

static unsigned char crystal_key[] =    /* A 32 byte magic key sequence
*/
{
        0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc,
        0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2,
        0xf1, 0xf8, 0x7c, 0x3e, 0x9f, 0x4f, 0x27, 0x13,
        0x09, 0x84, 0x42, 0xa1, 0xd0, 0x68, 0x34, 0x1a
};
            
and you'll see what I mean if you look at the init sequence.

Peter


Index: [thread] [date] [subject] [author]


Write to me! apenwarr@worldvisions.ca