From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
Date: Thu, 17 Oct 2013 13:23:38 -0600 [thread overview]
Message-ID: <5260393A.4000609@wwwdotorg.org> (raw)
In-Reply-To: <1382020192-1747-3-git-send-email-alban.bedel@avionic-design.de>
On 10/17/2013 08:29 AM, Alban Bedel wrote:
> Add support for the new Tamonten? NG platform from Avionic Design.
> Currently only I2C, MMC, USB and ethernet have been tested.
> diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c
> +void pmu_write(uchar reg, uchar data)
> +{
> + int i;
> + i2c_set_bus_num(0); /* PMU is on bus 0 */
> + for (i = 0; i < MAX_I2C_RETRY; ++i) {
> + if (i2c_write(PMU_I2C_ADDRESS, reg, 1, &data, 1))
> + udelay(100);
Why the need for retries here? This really shouldn't fail.
> +void power_init_board(void)
> +{
> + /* Set the periphs in reset */
> + gpio_request(GPIO_PI4, "nRST_PERIPH");
> + gpio_direction_output(GPIO_PI4, 0);
> +
> + /* Disable the PCIe power */
> + gpio_request(GPIO_PT3, "EN_3V3_PEX_HVDD");
> + gpio_direction_output(GPIO_PT3, 0);
> +
> + /* Disable the SATA power */
> + gpio_request(GPIO_PK3, "EN_3V3_SATA_HVDD");
> + gpio_direction_output(GPIO_PK3, 0);
> +
> + /* Disable LDO1 for PCIe and SATA */
> + pmu_write(PMU_REG_LDO1, PMU_LDO1(OFF, 1050));
> +
> + /* Turn on the alive signal */
> + gpio_request(GPIO_PV2, "ALIVE");
> + gpio_direction_output(GPIO_PV2, 1);
> +
> + /* Wait for the periph to finish their reset */
> + udelay(1000);
> + gpio_direction_output(GPIO_PI4, 1);
> +}
Aren't all these the HW defaults? Even if not, I'm not sure there's a
need to explicitly turn everything off at boot; why not do this in the
individual drivers?
Aside from that, this patch looks fine.
next prev parent reply other threads:[~2013-10-17 19:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 14:29 [U-Boot] [PATCH v2 0/2] ARM: tegra: Add the Tamonten-NG Evaluation carrier boards Alban Bedel
2013-10-17 14:29 ` [U-Boot] [PATCH v2 1/2] ARM: tegra: support SKU b1 of Tegra30 Alban Bedel
2013-10-17 19:20 ` Stephen Warren
2013-10-17 14:29 ` [U-Boot] [PATCH v2 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board Alban Bedel
2013-10-17 19:23 ` Stephen Warren [this message]
2013-10-21 14:28 ` [U-Boot] [PATCH v3] " Alban Bedel
2013-10-28 13:02 ` Tom Warren
2013-10-28 22:00 ` Stephen Warren
2013-10-30 11:19 ` Alban Bedel
2013-10-30 15:35 ` Stephen 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=5260393A.4000609@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