linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Chenhui Zhao <chenhui.zhao@freescale.com>
Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
	<Jason.Jin@freescale.com>
Subject: Re: [PATCH 3/4] powerpc: pm: add EPU FSM configuration for deep sleep
Date: Fri, 31 Jul 2015 19:41:51 -0500	[thread overview]
Message-ID: <1438389711.19345.99.camel@freescale.com> (raw)
In-Reply-To: <1438347186-8462-3-git-send-email-chenhui.zhao@freescale.com>

On Fri, 2015-07-31 at 20:53 +0800, Chenhui Zhao wrote:
> In the last stage of deep sleep, software will trigger a Finite
> State Machine (FSM) to control the hardware precedure, such as
> board isolation, killing PLLs, removing power, and so on.
> 
> When the system is waked up by an interrupt, the FSM controls the
> hardware to complete the early resume precedure.
> 
> This patch configure the EPU FSM preparing for deep sleep.
> 
> Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
> ---
>  arch/powerpc/platforms/85xx/Makefile    |   2 +-
>  arch/powerpc/platforms/85xx/sleep_fsm.c | 256 
> ++++++++++++++++++++++++++++++++
>  arch/powerpc/platforms/85xx/sleep_fsm.h | 104 +++++++++++++
>  3 files changed, 361 insertions(+), 1 deletion(-)
>  create mode 100644 arch/powerpc/platforms/85xx/sleep_fsm.c
>  create mode 100644 arch/powerpc/platforms/85xx/sleep_fsm.h

When I asked why this was in drivers/platform[1], you said it was to share 
with LS1, and that the values used were the same -- so why did you move it to 
arch/powerpc?

[1] Note that other proposed patches create a drivers/soc/fsl instead of 
drivers/platform/fsl...  We need one of them, not both.

> +void fsl_fsm_setup(void __iomem *base, struct fsm_reg_vals *val)
> +{
> +     struct fsm_reg_vals *data = val;
> +
> +     BUG_ON(!base || !data);

This BUG_ON is useless.  If one of those is NULL you'll get an oops anyway.

> diff --git a/arch/powerpc/platforms/85xx/sleep_fsm.h 
> b/arch/powerpc/platforms/85xx/sleep_fsm.h
> new file mode 100644
> index 0000000..2c60b40
> --- /dev/null
> +++ b/arch/powerpc/platforms/85xx/sleep_fsm.h
> @@ -0,0 +1,104 @@
> +/*
> + * Freescale deep sleep FSM (finite-state machine) configuration
> + *
> + * Copyright 2015 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 as published by the
> + * Free Software Foundation;  either version 2 of the  License, or (at your
> + * option) any later version.
> + */
> +#ifndef _FSL_SLEEP_FSM_H
> +#define _FSL_SLEEP_FSM_H
> +
> +#define FSL_STRIDE_4B        4
> +#define FSL_STRIDE_8B        8

Why not just use 4/8 directly?

> 
> +/* Block offsets */
> +#define RCPM_BLOCK_OFFSET    0x00022000
> +#define EPU_BLOCK_OFFSET     0x00000000
> +#define NPC_BLOCK_OFFSET     0x00001000

I thought you said OK to not putting these offsets in the kernel source...

-Scott

  reply	other threads:[~2015-08-01  0:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 12:53 [PATCH 1/4] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM Chenhui Zhao
2015-07-31 12:53 ` [PATCH 2/4] powerpc: get the physical base address of DCSR Chenhui Zhao
2015-07-31 12:53 ` [PATCH 3/4] powerpc: pm: add EPU FSM configuration for deep sleep Chenhui Zhao
2015-08-01  0:41   ` Scott Wood [this message]
2015-08-03 12:01     ` Chenhui Zhao
2015-08-03 21:22       ` Scott Wood
2015-07-31 12:53 ` [PATCH 4/4] powerpc: pm: support deep sleep feature on T104x Chenhui Zhao
2015-08-01  2:49   ` 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=1438389711.19345.99.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=Jason.Jin@freescale.com \
    --cc=chenhui.zhao@freescale.com \
    --cc=linux-kernel@vger.kernel.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).