From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/9] Tegra: T30: Add AVP (arm720t) files
Date: Thu, 13 Sep 2012 14:02:08 -0600 [thread overview]
Message-ID: <50523BC0.7040503@wwwdotorg.org> (raw)
In-Reply-To: <1347487855-27077-3-git-send-email-twarren@nvidia.com>
On 09/12/2012 04:10 PM, Tom Warren wrote:
Patch descriptions would be nice.
> diff --git a/arch/arm/cpu/arm720t/tegra30/cpu.c b/arch/arm/cpu/arm720t/tegra30/cpu.c
There's quite a bit of Tegra20-support in this file. Can this file be
shared with Tegra20 rather than forked and enhanced?
> +/* Returns 1 if the current CPU executing is a Cortex-A9, else 0 */
> +int cpu_is_cortexa9(void)
> +{
> + u32 id = readb(NV_PA_PG_UP_BASE + PG_UP_TAG_0);
> + return id == (PG_UP_TAG_0_PID_CPU & 0xff);
> +}
Hmm. Given this is support for the AVP/COP running SPL, shouldn't this
always be true? I thought Allen's SPL patches had cleaned this up.
> +static void enable_cpu_power_rail(void)
> +{
> + struct pmc_ctlr *pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE;
> + u32 reg;
> +
> + debug("enable_cpu_power_rail entry\n");
> + reg = readl(&pmc->pmc_cntrl);
> + reg |= CPUPWRREQ_OE;
> + writel(reg, &pmc->pmc_cntrl);
> +
> + /*
> + * Pulse PWRREQ via I2C. We need to find out what this is
> + * doing, tidy up the code and maybe find a better place for it.
> + */
> + tegra_i2c_ll_write_addr(0x005a, 0x0002);
> + tegra_i2c_ll_write_data(0x2328, 0x0a02);
> + udelay(1000);
> + tegra_i2c_ll_write_data(0x0127, 0x0a02);
> + udelay(10 * 1000);
Those functions access the DVC I2C controller's register space, so
presumably they're doing I2C accesses. Not all boards use the same PMIC,
so it seems like we really do need to factor this out.
> + /*
> + * The TI PMU65861C needs a 3.75ms delay between enabling
> + * the power rail and enabling the CPU clock. This delay
> + * between SM1EN and SM1 is for switching time + the ramp
> + * up of the voltage to the CPU (VDD_CPU from PMU). We use 0xf00 as
> + * is is ARM-friendly (can fit in a single ARMv4T mov immmediate
> + * instruction).
> + */
> + udelay(3840);
The Cardhu board at least does not use the TPS65861. At the very least
the comment isn't quite right. Is this code needed?
> diff --git a/arch/arm/cpu/arm720t/tegra30/spl.c b/arch/arm/cpu/arm720t/tegra30/spl.c
> +void board_init_f(ulong dummy)
> +{
> + board_init_uart_f();
> +
> + /* Initialize periph GPIOs */
> +#ifdef CONFIG_SPI_UART_SWITCH
> + gpio_early_init_uart();
> +#else
> + gpio_config_uart();
> +#endif
Didn't we have patches to get rid of that mess and just use the same
function consistently across all boards, or was that only discussed and
never actually implemented?
next prev parent reply other threads:[~2012-09-13 20:02 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 22:10 [U-Boot] [PATCH 0/9] Add basic Tegra30 (T30) support Tom Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 1/9] Tegra: T30: Add include files Tom Warren
2012-09-13 18:06 ` Tom Rini
2012-09-13 21:10 ` Tom Warren
2012-09-18 19:29 ` Simon Glass
2012-09-18 21:07 ` Tom Warren
2012-09-13 19:35 ` Stephen Warren
2012-09-13 20:51 ` Tom Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 2/9] Tegra: T30: Add AVP (arm720t) files Tom Warren
2012-09-13 20:02 ` Stephen Warren [this message]
2012-09-13 21:00 ` Tom Warren
2012-09-13 21:47 ` Lucas Stach
2012-09-13 22:06 ` Tom Warren
2012-09-18 19:37 ` Simon Glass
2012-09-18 21:19 ` Tom Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 3/9] Tegra: T30: Add CPU (armv7) files Tom Warren
2012-09-13 20:03 ` Stephen Warren
2012-09-13 20:16 ` Tom Warren
2012-09-13 20:30 ` Stephen Warren
2012-09-13 20:33 ` Tom Rini
2012-09-13 21:21 ` Tom Warren
2012-09-13 22:04 ` Tom Rini
2012-09-13 22:16 ` Tom Warren
2012-09-13 22:28 ` Tom Rini
2012-09-12 22:10 ` [U-Boot] [PATCH 4/9] Tegra: T30: Add common Tegra30 CPU files Tom Warren
2012-09-13 22:08 ` Stephen Warren
2012-09-18 19:40 ` Simon Glass
2012-09-12 22:10 ` [U-Boot] [PATCH 5/9] Tegra: DT: Add preliminary device tree files for T30 Cardhu Tom Warren
2012-09-13 22:14 ` Stephen Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 6/9] Tegra30: Add Cardhu board files Tom Warren
2012-09-13 22:23 ` Stephen Warren
2012-09-18 19:44 ` Simon Glass
2012-09-12 22:10 ` [U-Boot] [PATCH 7/9] Tegra30: Add config files (common and Cardhu) Tom Warren
2012-09-13 22:33 ` Stephen Warren
2012-09-13 22:45 ` Tom Rini
2012-09-13 23:38 ` Marek Vasut
2012-09-18 19:46 ` Simon Glass
2012-09-18 21:21 ` Tom Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 8/9] Tegra30: Add common pinmux config in board_early_init_f Tom Warren
2012-09-13 22:37 ` Stephen Warren
2012-09-18 19:53 ` Simon Glass
2012-09-18 21:32 ` Tom Warren
2012-09-18 21:53 ` Stephen Warren
2012-09-12 22:10 ` [U-Boot] [PATCH 9/9] Tegra30: Enable Cardhu build (SPL) Tom Warren
2012-09-13 18:00 ` Tom Rini
2012-09-13 20:02 ` Tom Warren
2012-09-13 22:47 ` Stephen Warren
2012-09-13 18:36 ` [U-Boot] [PATCH 0/9] Add basic Tegra30 (T30) support Stephen Warren
2012-09-13 21:04 ` Tom Rini
2012-09-13 21:25 ` 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=50523BC0.7040503@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