From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/6] Tegra30: MMC: Add SD bus power-rail and SDMMC pad init routines
Date: Tue, 05 Mar 2013 10:55:34 -0700 [thread overview]
Message-ID: <51363196.6020902@wwwdotorg.org> (raw)
In-Reply-To: <1362500985-13196-4-git-send-email-twarren@nvidia.com>
On 03/05/2013 09:29 AM, Tom Warren wrote:
> T30 requires specific SDMMC pad programming, and bus power-rail bringup.
> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
> +void pad_init_mmc(struct mmc_host *host)
> + if (id == PERIPH_ID_SDMMC1) {
> + val = readl(&gpc->sdio1cfg);
> + val &= padmask;
> + val |= padcfg;
> + writel(val, &gpc->sdio1cfg);
> + debug(" wrote 0x%08X to %p\n", val, &gpc->sdio1cfg);
> + } else {
> + val = readl(&gpc->sdio3cfg);
> + val &= padmask;
> + val |= padcfg;
> + writel(val, &gpc->sdio3cfg);
> + debug(" wrote 0x%08X to %p\n", val, &gpc->sdio3cfg);
> + }
This isn't generic enough, although the problems may not show up for the
SDMMC1/3 controllers since it looks like those controllers always use a
specific set of pins; the pinmux HW doesn't allow those controllers to
be routed to different places.
However, SDMMC1 and SDMMC4 would also need entries in the above if
statement for it to be complete. Those controllers can definitely be
switched between different sets of pins. This function would then
somehow have to know which set of pins to apply the pinmux configuration
to, which would imply searching through the pinmux registers to find the
pins which have their mux function set to point at the controller in
question.
This implies that configuring the pinmux here isn't the right way to do
this. As I wrote in my immediately previous email, I think the pingroup
drive registers (named "*cfg") should be initialized based on a table
provided by the board file (and later by DT; the values are already part
of the DT pinctrl bindings). The table or DT content will be
board-specific, and hence able to describe which pingroup should be
configured based on the board design.
next prev parent reply other threads:[~2013-03-05 17:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 16:29 [U-Boot] [PATCH v2 0/6] Tegra30: MMC: Add DT-based MMC driver for Tegra30/Cardhu Tom Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 1/6] Tegra30: fdt: Add SDMMC (sdhci) nodes for T30 boards (Cardhu for now) Tom Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 2/6] Tegra: MMC: Added/update SDMMC registers/base addresses for T20/T30 Tom Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 3/6] Tegra30: MMC: Add SD bus power-rail and SDMMC pad init routines Tom Warren
2013-03-05 17:55 ` Stephen Warren [this message]
2013-03-05 18:23 ` Tom Warren
2013-03-05 19:10 ` Stephen Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 4/6] mmc: Tegra: Add SD bus power/voltage function and MMC pad init call Tom Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 5/6] Tegra30: mmc: Add Tegra30 SDMMC compatible entry to fdtdec & driver Tom Warren
2013-03-05 16:29 ` [U-Boot] [PATCH v2 6/6] Tegra30: MMC: Enable DT MMC driver support for Tegra30 Cardhu boards 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=51363196.6020902@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