From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Terje Bergstrom <tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Arto Merilainen
<amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 2/6] ARM: tegra: Add auxiliary data for nvhost
Date: Sat, 24 Nov 2012 00:45:27 +0100 [thread overview]
Message-ID: <20121123234527.GE21555@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <1353577684-7896-3-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4383 bytes --]
On Thu, Nov 22, 2012 at 11:48:00AM +0200, Terje Bergstrom wrote:
> Add SoC specific auxiliary data to host1x and gr2d. nvhost uses
> this data.
>
> Change-Id: Idb04b262c8b6432e56cffb6c7ed64cf7ef4545b3
> Signed-off-by: Terje Bergstrom <tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm/mach-tegra/board-dt-tegra20.c | 38 ++++++++++++++++++++++++++++-
> arch/arm/mach-tegra/board-dt-tegra30.c | 38 ++++++++++++++++++++++++++++-
> arch/arm/mach-tegra/tegra20_clocks_data.c | 8 +++---
> arch/arm/mach-tegra/tegra30_clocks_data.c | 2 ++
> 4 files changed, 80 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
> index 1d30eac..c695392 100644
> --- a/arch/arm/mach-tegra/board-dt-tegra20.c
> +++ b/arch/arm/mach-tegra/board-dt-tegra20.c
> @@ -33,6 +33,7 @@
> #include <linux/i2c.h>
> #include <linux/i2c-tegra.h>
> #include <linux/usb/tegra_usb_phy.h>
> +#include <linux/nvhost.h>
>
> #include <asm/hardware/gic.h>
> #include <asm/mach-types.h>
> @@ -45,6 +46,38 @@
> #include "common.h"
> #include "iomap.h"
>
> +static const char *host1x_syncpt_names[32] = {
> + [0] = "gfx_host",
> + [NVSYNCPT_2D_0] = "2d_0",
> + [NVSYNCPT_2D_1] = "2d_1",
> + [NVSYNCPT_VBLANK0] = "vblank0",
> + [NVSYNCPT_VBLANK1] = "vblank1",
> +};
I think I remember a discussion about this back when we designed the DT
bindings. The result I seem to remember was that since syncpoints can be
arbitrarily assigned they wouldn't have to be statically allocated at
compile time.
Instead we could just have them allocated when a host1x client registers
with host1x. Or have each client request its required syncpoints
explicitly. The latter would make it trivial to associate a label with
it.
> +
> +static struct host1x_device_info host1x_info = {
> + .nb_channels = 8,
> + .nb_pts = 32,
> + .nb_mlocks = 16,
> + .nb_bases = 8,
> + .syncpt_names = host1x_syncpt_names,
> + .client_managed = NVSYNCPTS_CLIENT_MANAGED,
> +};
> +
> +static struct nvhost_device_data tegra_host1x_info = {
> + .clocks = { {"host1x", UINT_MAX} },
> + NVHOST_MODULE_NO_POWERGATE_IDS,
> + .private_data = &host1x_info,
> +};
> +
> +static struct nvhost_device_data tegra_gr2d_info = {
> + .index = 2,
> + .syncpts = BIT(NVSYNCPT_2D_0) | BIT(NVSYNCPT_2D_1),
> + .clocks = { {"gr2d", UINT_MAX, true}, {"epp", UINT_MAX, true} },
> + NVHOST_MODULE_NO_POWERGATE_IDS,
> + .clockgate_delay = 0,
> + .serialize = true,
> +};
Again, this doesn't seem like it should be statically configured in the
board data.
The same comments apply to the Tegra30 hunk that I've left out.
> diff --git a/arch/arm/mach-tegra/tegra20_clocks_data.c b/arch/arm/mach-tegra/tegra20_clocks_data.c
> index 7f049ac..3314e50 100644
> --- a/arch/arm/mach-tegra/tegra20_clocks_data.c
> +++ b/arch/arm/mach-tegra/tegra20_clocks_data.c
> @@ -1041,10 +1041,10 @@ static struct clk_duplicate tegra_clk_duplicates[] = {
> CLK_DUPLICATE("usbd", "utmip-pad", NULL),
> CLK_DUPLICATE("usbd", "tegra-ehci.0", NULL),
> CLK_DUPLICATE("usbd", "tegra-otg", NULL),
> - CLK_DUPLICATE("2d", "tegra_grhost", "gr2d"),
> - CLK_DUPLICATE("3d", "tegra_grhost", "gr3d"),
> - CLK_DUPLICATE("epp", "tegra_grhost", "epp"),
> - CLK_DUPLICATE("mpe", "tegra_grhost", "mpe"),
> + CLK_DUPLICATE("2d", NULL, "gr2d"),
> + CLK_DUPLICATE("3d", NULL, "gr3d"),
> + CLK_DUPLICATE("epp", NULL, "epp"),
> + CLK_DUPLICATE("mpe", NULL, "mpe"),
Are these actually required here?
> CLK_DUPLICATE("cop", "tegra-avp", "cop"),
> CLK_DUPLICATE("vde", "tegra-aes", "vde"),
> CLK_DUPLICATE("cclk", NULL, "cpu"),
> diff --git a/arch/arm/mach-tegra/tegra30_clocks_data.c b/arch/arm/mach-tegra/tegra30_clocks_data.c
> index 6942c7a..f30bd54 100644
> --- a/arch/arm/mach-tegra/tegra30_clocks_data.c
> +++ b/arch/arm/mach-tegra/tegra30_clocks_data.c
> @@ -1338,6 +1338,8 @@ struct clk_duplicate tegra_clk_duplicates[] = {
> CLK_DUPLICATE("pll_p", "tegradc.0", "parent"),
> CLK_DUPLICATE("pll_p", "tegradc.1", "parent"),
> CLK_DUPLICATE("pll_d2_out0", "hdmi", "parent"),
> + CLK_DUPLICATE("2d", NULL, "gr2d"),
> + CLK_DUPLICATE("epp", NULL, "epp"),
Same here.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-11-23 23:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 9:47 [PATCH 0/6] Support for Tegra 2D hardware Terje Bergstrom
[not found] ` <1353577684-7896-1-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-22 9:47 ` [PATCH 1/6] video: tegra: Add nvhost driver Terje Bergstrom
[not found] ` <1353577684-7896-2-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-23 23:38 ` Thierry Reding
[not found] ` <20121123233855.GD21555-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-24 7:00 ` Terje Bergström
[not found] ` <50B07084.40707-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-24 19:04 ` Thierry Reding
[not found] ` <20121124190416.GC26154-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-24 20:02 ` Terje Bergström
2012-11-26 8:21 ` Terje Bergström
[not found] ` <50B32690.7020102-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-26 9:25 ` Thierry Reding
[not found] ` <20121126092524.GB8602-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-26 9:33 ` Terje Bergström
2012-11-26 13:42 ` Terje Bergström
2012-11-22 9:48 ` [PATCH 2/6] ARM: tegra: Add auxiliary data for nvhost Terje Bergstrom
[not found] ` <1353577684-7896-3-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-23 23:45 ` Thierry Reding [this message]
[not found] ` <20121123234527.GE21555-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-24 7:09 ` Terje Bergström
[not found] ` <50B07297.3090001-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-24 19:11 ` Thierry Reding
[not found] ` <20121124191103.GD26154-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-26 9:40 ` Terje Bergström
[not found] ` <50B338F2.5060501-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-26 22:53 ` Stephen Warren
2012-11-26 13:56 ` Terje Bergström
2012-11-22 9:48 ` [PATCH 3/6] gpu: drm: tegra: Remove redundant host1x Terje Bergstrom
[not found] ` <1353577684-7896-4-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-23 23:19 ` Thierry Reding
2012-11-22 9:48 ` [PATCH 4/6] gpu: drm: tegra: Free platform data on remove Terje Bergstrom
[not found] ` <1353577684-7896-5-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-23 21:53 ` Thierry Reding
[not found] ` <20121123215305.GA21555-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-26 7:33 ` Arto Merilainen
2012-11-22 9:48 ` [PATCH 5/6] gpu: drm: tegra: Prime support Terje Bergstrom
[not found] ` <1353577684-7896-6-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-23 21:55 ` Thierry Reding
[not found] ` <20121123215528.GB21555-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-24 7:11 ` Terje Bergström
[not found] ` <50B0733D.4040002-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-24 19:14 ` Thierry Reding
[not found] ` <20121124191445.GE26154-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-24 19:59 ` Terje Bergström
[not found] ` <50B12724.7020503-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-26 7:33 ` Arto Merilainen
[not found] ` <7DC9167CA73B39468DFA1D07FF67A6A85150E61DDB-LZBqo6t42cZDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-11-26 9:30 ` Terje Bergström
2012-11-22 9:48 ` [PATCH 6/6] drm: tegra: Add gr2d device Terje Bergstrom
-- strict thread matches above, loose matches on Subject: below --
2012-11-22 12:16 [PATCH 0/6] Support for Tegra 2D hardware Terje Bergstrom
[not found] ` <1353586614-7308-1-git-send-email-tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-22 12:16 ` [PATCH 2/6] ARM: tegra: Add auxiliary data for nvhost Terje Bergstrom
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=20121123234527.GE21555@avionic-0098.adnet.avionic-design.de \
--to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tbergstrom-DDmLM1+adcrQT0dZR+AlfA@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.