Linux clock framework development
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Johannes Stezenbach <js@sig21.net>, Takashi Iwai <tiwai@suse.de>,
	 Andy Shevchenko <andy@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	 Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	 "H . Peter Anvin" <hpa@zytor.com>,
	 Michael Turquette <mturquette@baylibre.com>,
	 Stephen Boyd <sboyd@kernel.org>,
	platform-driver-x86@vger.kernel.org,  x86@kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v2 1/5] clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h
Date: Mon, 8 Jan 2024 12:58:31 +0200 (EET)	[thread overview]
Message-ID: <a9c2c296-38f0-1cf-a5d9-3169786adf@linux.intel.com> (raw)
In-Reply-To: <20240107140310.46512-2-hdegoede@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]

On Sun, 7 Jan 2024, Hans de Goede wrote:

> Move the register defines for the Atom (Bay Trail, Cherry Trail) PMC
> clocks to include/linux/platform_data/x86/pmc_atom.h.
> 
> This is a preparation patch to extend the S0i3 readiness checks
> in drivers/platform/x86/pmc_atom.c with checking that the PMC
> clocks are off on suspend entry.
> 
> Note these are added to include/linux/platform_data/x86/pmc_atom.h rather
> then to include/linux/platform_data/x86/clk-pmc-atom.h because the former
> already has all the other Atom PMC register defines.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/clk/x86/clk-pmc-atom.c             | 13 +------------
>  include/linux/platform_data/x86/pmc_atom.h | 13 +++++++++++++
>  2 files changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c
> index 2974dd0ec6f4..5ec9255e33fa 100644
> --- a/drivers/clk/x86/clk-pmc-atom.c
> +++ b/drivers/clk/x86/clk-pmc-atom.c
> @@ -11,23 +11,12 @@
>  #include <linux/err.h>
>  #include <linux/io.h>
>  #include <linux/platform_data/x86/clk-pmc-atom.h>
> +#include <linux/platform_data/x86/pmc_atom.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
>  
>  #define PLT_CLK_NAME_BASE	"pmc_plt_clk"
>  
> -#define PMC_CLK_CTL_OFFSET		0x60
> -#define PMC_CLK_CTL_SIZE		4
> -#define PMC_CLK_NUM			6
> -#define PMC_CLK_CTL_GATED_ON_D3		0x0
> -#define PMC_CLK_CTL_FORCE_ON		0x1
> -#define PMC_CLK_CTL_FORCE_OFF		0x2
> -#define PMC_CLK_CTL_RESERVED		0x3
> -#define PMC_MASK_CLK_CTL		GENMASK(1, 0)
> -#define PMC_MASK_CLK_FREQ		BIT(2)
> -#define PMC_CLK_FREQ_XTAL		(0 << 2)	/* 25 MHz */
> -#define PMC_CLK_FREQ_PLL		(1 << 2)	/* 19.2 MHz */
> -
>  struct clk_plt_fixed {
>  	struct clk_hw *clk;
>  	struct clk_lookup *lookup;
> diff --git a/include/linux/platform_data/x86/pmc_atom.h b/include/linux/platform_data/x86/pmc_atom.h
> index b8a701c77fd0..557622ef0390 100644
> --- a/include/linux/platform_data/x86/pmc_atom.h
> +++ b/include/linux/platform_data/x86/pmc_atom.h
> @@ -43,6 +43,19 @@
>  				BIT_ORED_DEDICATED_IRQ_GPSC | \
>  				BIT_SHARED_IRQ_GPSS)
>  
> +/* External clk generator settings */
> +#define PMC_CLK_CTL_OFFSET		0x60
> +#define PMC_CLK_CTL_SIZE		4
> +#define PMC_CLK_NUM			6
> +#define PMC_CLK_CTL_GATED_ON_D3		0x0
> +#define PMC_CLK_CTL_FORCE_ON		0x1
> +#define PMC_CLK_CTL_FORCE_OFF		0x2
> +#define PMC_CLK_CTL_RESERVED		0x3
> +#define PMC_MASK_CLK_CTL		GENMASK(1, 0)
> +#define PMC_MASK_CLK_FREQ		BIT(2)
> +#define PMC_CLK_FREQ_XTAL		(0 << 2)	/* 25 MHz */
> +#define PMC_CLK_FREQ_PLL		(1 << 2)	/* 19.2 MHz */

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Noting the last two look like:
#define PMC_CLK_FREQ_XTAL	FIELD_PREP(PMC_MASK_CLK_FREQ, 0) /* 25 MHz */
#define PMC_CLK_FREQ_PLL	FIELD_PREP(PMC_MASK_CLK_FREQ, 1) /* 19.2 MHz */


-- 
 i.

  reply	other threads:[~2024-01-08 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-07 14:03 [PATCH v2 0/5] x86: atom-punit/-pmc s2idle device state checks Hans de Goede
2024-01-07 14:03 ` [PATCH v2 1/5] clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h Hans de Goede
2024-01-08 10:58   ` Ilpo Järvinen [this message]
2024-01-08 23:33   ` Stephen Boyd
2024-01-07 14:03 ` [PATCH v2 2/5] platform/x86: pmc_atom: Annotate d3_sts register bit defines Hans de Goede
2024-01-07 14:03 ` [PATCH v2 3/5] platform/x86: pmc_atom: Check state of PMC managed devices on s2idle Hans de Goede
2024-01-08 11:18   ` Ilpo Järvinen
2024-01-08 12:25     ` Hans de Goede
2024-01-08 12:38       ` Hans de Goede
2024-01-07 14:03 ` [PATCH v2 4/5] platform/x86: pmc_atom: Check state of PMC clocks " Hans de Goede
2024-01-08 11:27   ` Ilpo Järvinen
2024-01-08 12:31     ` Hans de Goede
2024-01-07 14:03 ` [PATCH v2 5/5] x86/platform/atom: Check state of Punit managed devices " Hans de Goede
2024-01-08 11:39   ` Ilpo Järvinen
2024-01-07 16:09 ` [PATCH v2 0/5] x86: atom-punit/-pmc s2idle device state checks Borislav Petkov

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=a9c2c296-38f0-1cf-a5d9-3169786adf@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=js@sig21.net \
    --cc=linux-clk@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mturquette@baylibre.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=x86@kernel.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