All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Javier Martinez Canillas
	<javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>,
	mikko.perttunen-/1wQRMveznE@public.gmane.org,
	acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	Mikko Perttunen
	<mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Peter De Schrijver
	<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Prashant Gaikwad
	<pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 11/13] clk: tegra: Add EMC clock driver
Date: Wed, 12 Nov 2014 17:18:11 +0100	[thread overview]
Message-ID: <20141112161809.GA17305@ulmo> (raw)
In-Reply-To: <1415779051-26410-12-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

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

On Wed, Nov 12, 2014 at 08:56:34AM +0100, Tomeu Vizoso wrote:
[...]
> diff --git a/drivers/clk/tegra/clk-emc.c b/drivers/clk/tegra/clk-emc.c
[...]
> +#include <linux/clk-provider.h>
> +#include <linux/clk.h>
> +#include <linux/clkdev.h>
> +#include <linux/delay.h>
> +#include <linux/module.h>
> +#include <linux/of_address.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/sort.h>
> +#include <linux/string.h>
> +
> +#include <soc/tegra/fuse.h>
> +#include <soc/tegra/memory.h>

You should include "clk.h" here to avoid a sparse warning.

> +
> +#define CLK_SOURCE_EMC 0x19c
> +
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_SHIFT 0
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_MASK 0xff
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_MASK) << \
> +					      CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_SHIFT)
> +
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT 29
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK 0x7
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK) << \
> +					  CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT)
> +
> +const char *emc_parent_clk_names[] = {

This can be static.

> +	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud",
> +	"pll_c2", "pll_c3", "pll_c_ud"
> +};
> +
> +/*
> + * List of clock sources for various parents the EMC clock can have.
> + * When we change the timing to a timing with a parent that has the same
> + * clock source as the current parent, we must first change to a backup
> + * timing that has a different clock source.
> + */
> +
> +#define EMC_SRC_PLL_M 0
> +#define EMC_SRC_PLL_C 1
> +#define EMC_SRC_PLL_P 2
> +#define EMC_SRC_CLK_M 3
> +#define EMC_SRC_PLL_C2 4
> +#define EMC_SRC_PLL_C3 5
> +const char emc_parent_clk_sources[] = {

This can be static. And a blank line between the above two would be good
aswell.

> +const struct clk_ops tegra_clk_emc_ops = {

This can be static.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: linux-tegra@vger.kernel.org,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	mikko.perttunen@kapsi.fi, acourbot@nvidia.com,
	Mikko Perttunen <mperttunen@nvidia.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Mike Turquette <mturquette@linaro.org>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 11/13] clk: tegra: Add EMC clock driver
Date: Wed, 12 Nov 2014 17:18:11 +0100	[thread overview]
Message-ID: <20141112161809.GA17305@ulmo> (raw)
In-Reply-To: <1415779051-26410-12-git-send-email-tomeu.vizoso@collabora.com>

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

On Wed, Nov 12, 2014 at 08:56:34AM +0100, Tomeu Vizoso wrote:
[...]
> diff --git a/drivers/clk/tegra/clk-emc.c b/drivers/clk/tegra/clk-emc.c
[...]
> +#include <linux/clk-provider.h>
> +#include <linux/clk.h>
> +#include <linux/clkdev.h>
> +#include <linux/delay.h>
> +#include <linux/module.h>
> +#include <linux/of_address.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <linux/sort.h>
> +#include <linux/string.h>
> +
> +#include <soc/tegra/fuse.h>
> +#include <soc/tegra/memory.h>

You should include "clk.h" here to avoid a sparse warning.

> +
> +#define CLK_SOURCE_EMC 0x19c
> +
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_SHIFT 0
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_MASK 0xff
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_MASK) << \
> +					      CLK_SOURCE_EMC_EMC_2X_CLK_DIVISOR_SHIFT)
> +
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT 29
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK 0x7
> +#define CLK_SOURCE_EMC_EMC_2X_CLK_SRC(x) (((x) & CLK_SOURCE_EMC_EMC_2X_CLK_SRC_MASK) << \
> +					  CLK_SOURCE_EMC_EMC_2X_CLK_SRC_SHIFT)
> +
> +const char *emc_parent_clk_names[] = {

This can be static.

> +	"pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud",
> +	"pll_c2", "pll_c3", "pll_c_ud"
> +};
> +
> +/*
> + * List of clock sources for various parents the EMC clock can have.
> + * When we change the timing to a timing with a parent that has the same
> + * clock source as the current parent, we must first change to a backup
> + * timing that has a different clock source.
> + */
> +
> +#define EMC_SRC_PLL_M 0
> +#define EMC_SRC_PLL_C 1
> +#define EMC_SRC_PLL_P 2
> +#define EMC_SRC_CLK_M 3
> +#define EMC_SRC_PLL_C2 4
> +#define EMC_SRC_PLL_C3 5
> +const char emc_parent_clk_sources[] = {

This can be static. And a blank line between the above two would be good
aswell.

> +const struct clk_ops tegra_clk_emc_ops = {

This can be static.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-11-12 16:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12  7:56 [PATCH v4 00/13] Tegra124 EMC (external memory controller) support Tomeu Vizoso
2014-11-12  7:56 ` Tomeu Vizoso
2014-11-12  7:56 ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 01/13] clk: tegra124: Remove old emc clock Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 02/13] of: Document long-ram-code property in nvidia,tegra20-apbmisc Tomeu Vizoso
     [not found] ` <1415779051-26410-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-12  7:56   ` [PATCH v4 03/13] soc/tegra: Add ram code reader helper Tomeu Vizoso
2014-11-12  7:56     ` Tomeu Vizoso
2014-11-12  7:56   ` [PATCH v4 04/13] of: document new emc-timings subnode in nvidia,tegra124-car Tomeu Vizoso
2014-11-12  7:56     ` Tomeu Vizoso
     [not found]     ` <1415779051-26410-5-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-12 14:18       ` Thierry Reding
2014-11-12 14:18         ` Thierry Reding
2014-11-13  9:36         ` Tomeu Vizoso
2014-11-13  9:36           ` Tomeu Vizoso
2014-11-12  7:56   ` [PATCH v4 13/13] clk: tegra: Set the EMC clock as the parent of the MC clock Tomeu Vizoso
2014-11-12  7:56     ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 05/13] of: Document timings subnode of nvidia,tegra-mc Tomeu Vizoso
     [not found]   ` <1415779051-26410-6-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-12 14:22     ` Thierry Reding
2014-11-12 14:22       ` Thierry Reding
2014-11-13  9:33       ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 06/13] of: Add Tegra124 EMC bindings Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 07/13] ARM: tegra: Add EMC to Tegra124 device tree Tomeu Vizoso
2014-11-12  7:56   ` Tomeu Vizoso
2014-11-12  7:56   ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 08/13] ARM: tegra: Add EMC timings to Jetson TK1 " Tomeu Vizoso
2014-11-12  7:56   ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 09/13] memory: tegra: Add API needed by the EMC driver Tomeu Vizoso
2014-11-12 14:44   ` Thierry Reding
2014-11-12  7:56 ` [PATCH v4 10/13] memory: tegra: Add EMC (external memory controller) driver Tomeu Vizoso
     [not found]   ` <1415779051-26410-11-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-12 15:45     ` Thierry Reding
2014-11-12 15:45       ` Thierry Reding
2014-11-12 16:25       ` Mikko Perttunen
2014-11-12 16:25         ` Mikko Perttunen
2014-11-14 16:18       ` Tomeu Vizoso
2014-11-14 16:18         ` Tomeu Vizoso
2014-11-12  7:56 ` [PATCH v4 11/13] clk: tegra: Add EMC clock driver Tomeu Vizoso
     [not found]   ` <1415779051-26410-12-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-12 16:18     ` Thierry Reding [this message]
2014-11-12 16:18       ` Thierry Reding
2014-11-13 10:51     ` Nikolaus Schulz
2014-11-13 10:51       ` Nikolaus Schulz
2014-11-12  7:56 ` [PATCH v4 12/13] memory: tegra: Add debugfs entry for getting and setting the EMC rate Tomeu Vizoso

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=20141112161809.GA17305@ulmo \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mikko.perttunen-/1wQRMveznE@public.gmane.org \
    --cc=mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.