public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5 2/4] serial: Add Tegra2 serial port support
Date: Tue, 25 Jan 2011 10:11:41 +0200	[thread overview]
Message-ID: <4D3E85BD.4060201@compulab.co.il> (raw)
In-Reply-To: <1295651217-32421-3-git-send-email-twarren@nvidia.com>

On 01/22/11 01:06, Tom Warren wrote:
> Signed-off-by: Tom Warren <twarren@nvidia.com>
> ---

[ snip ]

> +/*
> + * Routine: pin_mux_uart
> + * Description: setup the pin muxes/tristate values for a UART
> + */
> +static void pin_mux_uart(void)
> +{
> +	pinmux_tri_ctlr *const pmt = (pinmux_tri_ctlr *)NV_PA_APB_MISC_BASE;
> +	u32 reg;
> +
> +#if CONFIG_TEGRA2_ENABLE_UARTA
> +		reg = readl(&pmt->pmt_ctl_c);
> +		reg &= 0xFFF0FFFF;	/* IRRX_/IRTX_SEL [19:16] = 00 UARTA */
> +		writel(reg, &pmt->pmt_ctl_c);
> +
> +		reg = readl(&pmt->pmt_tri_a);
> +		reg &= ~Z_IRRX;		/* Z_IRRX = normal (0) */
> +		reg &= ~Z_IRTX;		/* Z_IRTX = normal (0) */
> +		writel(reg, &pmt->pmt_tri_a);
> +#endif	/* CONFIG_TEGRA2_ENABLE_UARTA */
> +#if CONFIG_TEGRA2_ENABLE_UARTD
> +		reg = readl(&pmt->pmt_ctl_b);
> +		reg &= 0xFFFFFFF3;	/* GMC_SEL [3:2] = 00, UARTD */
> +		writel(reg, &pmt->pmt_ctl_b);
> +
> +		reg = readl(&pmt->pmt_tri_a);
> +		reg &= ~Z_GMC;		/* Z_GMC = normal (0) */
> +		writel(reg, &pmt->pmt_tri_a);
> +#endif	/* CONFIG_TEGRA2_ENABLE_UARTD */

As I've already pointed out (1) this covers only one possibility of UART pin
muxing options. I agree that it makes sense when this is a part of the
board-specific code. However, forcing specific pins configuration in the generic
driver seems problematic to me, even if most Tegra2 boards use the same
configuration.
As a side note, I'd prefer to have all the pin multiplexing defined in one place
in board file rather than scattered among different drivers.

(1) http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/92887/focus=93233


-- 
Sincerely yours,
Mike.

  parent reply	other threads:[~2011-01-25  8:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 23:06 [U-Boot] [PATCH V5 0/4] Add basic NVIDIA Tegra2 SoC support Tom Warren
2011-01-21 23:06 ` [U-Boot] [PATCH V5 1/4] arm: Tegra2: " Tom Warren
2011-01-24 18:58   ` Wolfgang Denk
2011-01-21 23:06 ` [U-Boot] [PATCH V5 2/4] serial: Add Tegra2 serial port support Tom Warren
2011-01-21 23:46   ` Peter Tyser
2011-01-24 17:32     ` Tom Warren
2011-01-24 17:51       ` Peter Tyser
2011-01-24 18:05         ` Tom Warren
2011-01-24 19:09           ` Wolfgang Denk
2011-01-24 19:14           ` Peter Tyser
2011-01-24 20:15             ` Tom Warren
2011-01-24 19:05         ` Wolfgang Denk
2011-01-25  8:11   ` Mike Rapoport [this message]
2011-01-25 16:50     ` Tom Warren
2011-01-25 21:12       ` Mike Rapoport
2011-01-25 21:37         ` Tom Warren
2011-01-25 22:11           ` Tom Warren
2011-01-25 22:24             ` Peter Tyser
2011-01-26  8:13               ` Mike Rapoport
2011-01-26 15:58                 ` Peter Tyser
2011-01-27  7:54                   ` Mike Rapoport
2011-01-26 17:05                 ` Tom Warren
2011-01-27  7:41                   ` Mike Rapoport
2011-01-27 16:08                     ` Tom Warren
2011-01-21 23:06 ` [U-Boot] [PATCH V5 3/4] arm: Tegra2: Add support for NVIDIA Harmony board Tom Warren
2011-01-21 23:06 ` [U-Boot] [PATCH V5 4/4] arm: Tegra2: Add support for NVIDIA Seaboard board Tom Warren

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=4D3E85BD.4060201@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /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