From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tegra: pinmux: fix FUNCMUX_NDFLASH_KBC_8_BIT
Date: Tue, 24 Mar 2015 09:21:02 -0600 [thread overview]
Message-ID: <551180DE.6030402@wwwdotorg.org> (raw)
In-Reply-To: <1427200154-9975-1-git-send-email-marcel@ziswiler.com>
On 03/24/2015 06:29 AM, Marcel Ziswiler wrote:
> From: Lucas Stach <dev@lynxeye.de>
>
> Even the 8-bit case needs KBCB configured, as pin D7 is located in this
> pingroup. Also pingroup ATC seems to come out of reset with config set
> to NAND, so we need to explictly configure some other function to this
> group in order to avoid clashing settings.
I would rather not touch ATC like this; see below.
> diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
Note that this will conflict with:
09f455dca749 ARM: tegra: collect SoC sources into mach-tegra
... which moved that file.
> @@ -252,17 +252,25 @@ int funcmux_select(enum periph_id id, int config)
...
> case FUNCMUX_NDFLASH_KBC_8_BIT:
...
> + /*
> + * configure pingroup ATC to something unrelated to
> + * avoid ATC overriding KBC
> + */
> + pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_GMI);
What if ATC is actually used for some purpose other than GMI? This will
corrupt the pinmux for that pingroup, and prevent the other peripheral
from working. For example, PERIPH_ID_SDMMC4/FUNCMUX_SDMMC4_ATC_ATD_8BIT
actively uses ATC, and this change might break it if both are used
together on one board.
The best approach is to simply not use funcmux at all, but rather
program the entire pinmux from a table. That guarantees no conflicts.
Boards using later SoCs take this approach.
Alternatively, have the board code (rather than funcmux) select some
other value for ATC. This allows the board code to select the exact
correct value for that pingroup once (thus avoiding multiple changes to
the pinmux for that pingroup, which could cause glitches), and
guarantees that the common code will never corrupt that setting.
next prev parent reply other threads:[~2015-03-24 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 12:29 [U-Boot] [PATCH] tegra: pinmux: fix FUNCMUX_NDFLASH_KBC_8_BIT Marcel Ziswiler
2015-03-24 15:21 ` Stephen Warren [this message]
2015-03-25 7:42 ` Marcel Ziswiler
2015-03-25 17:46 ` Marcel Ziswiler
2015-03-25 18:08 ` Stephen Warren
-- strict thread matches above, loose matches on Subject: below --
2013-01-22 0:20 Lucas Stach
2013-01-22 16:24 ` Stephen Warren
2013-01-22 22:27 ` Lucas Stach
2013-01-23 1:55 ` Allen Martin
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=551180DE.6030402@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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