linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/3] mpc83xx: Power Management support
Date: Wed, 2 Jul 2008 11:03:42 -0500	[thread overview]
Message-ID: <AEE09588-1480-450B-BEDF-237E2D59D3D0@kernel.crashing.org> (raw)
In-Reply-To: <20080625215051.GA11784@loki.buserror.net>

> diff --git a/arch/powerpc/platforms/83xx/suspend-asm.S b/arch/ 
> powerpc/platforms/83xx/suspend-asm.S
> new file mode 100644
> index 0000000..03e29a2
> --- /dev/null
> +++ b/arch/powerpc/platforms/83xx/suspend-asm.S
> @@ -0,0 +1,539 @@
> +/*
> + * Enter and leave sleep state on MPC83xx
> + *
> + * Author: Scott Wood <scottwood@freescale.com>
> + *
> + * Copyright (c) 2006 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or  
> modify it
> + * under the terms of the GNU General Public License version 2 as  
> published
> + * by the Free Software Foundation.
> + */
> +
> +#include <asm/page.h>
> +#include <asm/ppc_asm.h>
> +#include <asm/reg.h>
> +#include <asm/asm-offsets.h>
> +
> +#define SS_MEMSAVE	0x00
> +#define SS_HID		0x08 /* 3 HIDs */
> +#define SS_IABR		0x14 /* 2 IABRs */
> +#define SS_IBCR		0x1c
> +#define SS_DABR		0x20 /* 2 DABRs */
> +#define SS_DBCR		0x28
> +#define SS_SP		0x2c
> +#define SS_SR		0x30 /* 16 segment registers */
> +#define SS_CURRENT	0x70
> +#define SS_MSR		0x74
> +#define SS_SDR1		0x78
> +#define SS_LR		0x7c
> +#define SS_SPRG		0x80 /* 4 SPRGs */
> +#define SS_DBAT		0x90 /* 8 DBATs */
> +#define SS_IBAT		0xd0 /* 8 IBATs */
> +#define SS_TB		0x110
> +#define SS_CR		0x118
> +#define SS_GPREG	0x11c /* r12-r31 */
> +#define STATE_SAVE_SIZE 0x16c
> +
> +	.section .data
> +	.align	5
> +
> +mpc83xx_sleep_save_area:
> +	.space	STATE_SAVE_SIZE
> +immrbase:
> +	.long	0

If we are going to allocate space for save area like this, can't we do  
this in C code.  Its less error prone and easier to extend over time.   
I know the powermac code does something similar but it places the save  
area on the stack.

It also seems like the core register save/restore should be shared  
between 83xx and 5{1,2}xx but that would be a longer term goal.

- k

  parent reply	other threads:[~2008-07-02 16:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 21:50 [PATCH 1/3] mpc83xx: Power Management support Scott Wood
2008-06-26 13:43 ` Kumar Gala
2008-06-26 14:07   ` Scott Wood
2008-06-26 14:39   ` Liu Dave
2008-06-26 14:54     ` Kumar Gala
2008-07-02 16:03 ` Kumar Gala [this message]
2008-07-02 16:38   ` Scott Wood
2008-07-02 17:06 ` Kumar Gala
2008-07-02 17:12   ` Scott Wood
2008-07-02 17:37     ` Kumar Gala
2008-07-02 17:46       ` Scott Wood

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=AEE09588-1480-450B-BEDF-237E2D59D3D0@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /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).