From: Bjorn Helgaas <bhelgaas@google.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: "Stephen Warren" <swarren@nvidia.com>,
treding@nvidia.com, pdeschrijver@nvidia.com,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Terje Bergström" <tbergstrom@nvidia.com>,
"David Airlie" <airlied@linux.ie>,
"DRI mailing list" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 10/31] ARM: tegra: pass reset to tegra_powergate_sequence_power_up()
Date: Fri, 15 Nov 2013 14:17:12 -0700 [thread overview]
Message-ID: <CAErSpo7i_rGBNvjCb002VeXuL9xpkZ+Nx3APFA1OYH1PyMQ3yQ@mail.gmail.com> (raw)
In-Reply-To: <1384548866-13141-11-git-send-email-swarren@wwwdotorg.org>
On Fri, Nov 15, 2013 at 1:54 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Tegra's clock driver now provides an implementation of the common
> reset API (include/linux/reset.h). Use this instead of the old Tegra-
> specific API; that will soon be removed.
>
> Cc: treding@nvidia.com
> Cc: pdeschrijver@nvidia.com
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: Terje Bergström <tbergstrom@nvidia.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> This patch is part of a series with strong internal depdendencies. I'm
> looking for an ack so that I can take the entire series through the Tegra
> and arm-soc trees. The series will be part of a stable branch that can be
> merged into other subsystems if needed to avoid/resolve dependencies.
> ---
> arch/arm/mach-tegra/powergate.c | 8 +++++---
> drivers/gpu/drm/tegra/gr3d.c | 6 ++++--
> drivers/pci/host/pci-tegra.c | 3 ++-
> include/linux/tegra-powergate.h | 4 +++-
> 4 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
> index 85d28e756bb7..f6f5b54ff95e 100644
> --- a/arch/arm/mach-tegra/powergate.c
> +++ b/arch/arm/mach-tegra/powergate.c
> @@ -25,6 +25,7 @@
> #include <linux/export.h>
> #include <linux/init.h>
> #include <linux/io.h>
> +#include <linux/reset.h>
> #include <linux/seq_file.h>
> #include <linux/spinlock.h>
> #include <linux/clk/tegra.h>
> @@ -144,11 +145,12 @@ int tegra_powergate_remove_clamping(int id)
> }
>
> /* Must be called with clk disabled, and returns with clk enabled */
> -int tegra_powergate_sequence_power_up(int id, struct clk *clk)
> +int tegra_powergate_sequence_power_up(int id, struct clk *clk,
> + struct reset_control *rst)
> {
> int ret;
>
> - tegra_periph_reset_assert(clk);
> + reset_control_assert(rst);
>
> ret = tegra_powergate_power_on(id);
> if (ret)
> @@ -165,7 +167,7 @@ int tegra_powergate_sequence_power_up(int id, struct clk *clk)
> goto err_clamp;
>
> udelay(10);
> - tegra_periph_reset_deassert(clk);
> + reset_control_deassert(rst);
>
> return 0;
>
> diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
> index f629e38b00e4..0cbb24b1ae04 100644
> --- a/drivers/gpu/drm/tegra/gr3d.c
> +++ b/drivers/gpu/drm/tegra/gr3d.c
> @@ -279,7 +279,8 @@ static int gr3d_probe(struct platform_device *pdev)
> }
> }
>
> - err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk);
> + err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk,
> + gr3d->rst);
> if (err < 0) {
> dev_err(&pdev->dev, "failed to power up 3D unit\n");
> return err;
> @@ -287,7 +288,8 @@ static int gr3d_probe(struct platform_device *pdev)
>
> if (gr3d->clk_secondary) {
> err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D1,
> - gr3d->clk_secondary);
> + gr3d->clk_secondary,
> + gr3d->rst_secondary);
> if (err < 0) {
> dev_err(&pdev->dev,
> "failed to power up secondary 3D unit\n");
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 174a5bc2d993..aace19edc469 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -956,7 +956,8 @@ static int tegra_pcie_power_on(struct tegra_pcie *pcie)
> }
>
> err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE,
> - pcie->pex_clk);
> + pcie->pex_clk,
> + pcie->pex_rst);
> if (err) {
> dev_err(pcie->dev, "powerup sequence failed: %d\n", err);
> return err;
> diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h
> index c98cfa406952..b5ad64aca071 100644
> --- a/include/linux/tegra-powergate.h
> +++ b/include/linux/tegra-powergate.h
> @@ -19,6 +19,7 @@
> #define _MACH_TEGRA_POWERGATE_H_
>
> struct clk;
> +struct reset_control;
>
> #define TEGRA_POWERGATE_CPU 0
> #define TEGRA_POWERGATE_3D 1
> @@ -51,6 +52,7 @@ int tegra_powergate_power_off(int id);
> int tegra_powergate_remove_clamping(int id);
>
> /* Must be called with clk disabled, and returns with clk enabled */
> -int tegra_powergate_sequence_power_up(int id, struct clk *clk);
> +int tegra_powergate_sequence_power_up(int id, struct clk *clk,
> + struct reset_control *rst);
>
> #endif /* _MACH_TEGRA_POWERGATE_H_ */
> --
> 1.8.1.5
>
next prev parent reply other threads:[~2013-11-15 21:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1384548866-13141-1-git-send-email-swarren@wwwdotorg.org>
2013-11-15 20:54 ` [PATCH 08/31] pci: tegra: use reset framework Stephen Warren
2013-11-15 21:16 ` Bjorn Helgaas
2013-11-29 13:29 ` Thierry Reding
2013-11-29 13:33 ` Thierry Reding
2013-11-15 20:54 ` [PATCH 10/31] ARM: tegra: pass reset to tegra_powergate_sequence_power_up() Stephen Warren
2013-11-15 21:17 ` Bjorn Helgaas [this message]
2013-11-29 13:45 ` Thierry Reding
2013-11-29 13:46 ` Thierry Reding
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=CAErSpo7i_rGBNvjCb002VeXuL9xpkZ+Nx3APFA1OYH1PyMQ3yQ@mail.gmail.com \
--to=bhelgaas@google.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tbergstrom@nvidia.com \
--cc=treding@nvidia.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).