From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Tegra: Split tegra_get_chip_type() into _soc and _sku functions
Date: Tue, 02 Apr 2013 15:24:51 -0600 [thread overview]
Message-ID: <515B4CA3.9010008@wwwdotorg.org> (raw)
In-Reply-To: <1364936149-2494-1-git-send-email-twarren@nvidia.com>
On 04/02/2013 02:55 PM, Tom Warren wrote:
> As suggested by Stephen Warren, use tegra_get_soc_type() to return
> the pure CHIPID for a Tegra SoC (i.e. 0x20 for Tegra20, 0x30 for
> Tegra30, etc.) and rename tegra_get_chip_type() to reflect its true
> function, i.e. tegra_get_soc_sku(), which returns an ID like
> TEGRA_SOC_T25, TEGRA_SOC_T33, etc.
> diff --git a/arch/arm/cpu/arm720t/tegra-common/cpu.c b/arch/arm/cpu/arm720t/tegra-common/cpu.c
> @@ -150,7 +150,7 @@ void init_pllx(void)
> debug("init_pllx entry\n");
>
> /* get chip type */
> - chip_type = tegra_get_chip_type();
> + chip_type = tegra_get_soc_sku();
> debug(" init_pllx: chip_type = %d\n", chip_type);
Here, I think you need to retrieve both soc_type and soc_sku; the code
immediately after the above that accesss pll_x_table arguably wants to
use the SKU, yet the code that conditionally calls
adjust_pllp_out_freqs() probably only cares about soc_type.
> @@ -303,7 +303,7 @@ void clock_enable_coresight(int enable)
> - chip = tegra_get_chip_type();
> + chip = tegra_get_soc_sku();
I think this should be converted to soc_type not soc_sku, since
Tegra20/25 are handled identically, so the SKU is irrelevant. Tegra30/33
will likely also be identical here.
> if (chip == TEGRA_SOC_T30 || chip == TEGRA_SOC_T114)
> src = CLK_DIVIDER(NVBL_PLLP_KHZ, 204000);
> else if (chip == TEGRA_SOC_T20 || chip == TEGRA_SOC_T25)
> diff --git a/arch/arm/cpu/arm720t/tegra-common/cpu.h b/arch/arm/cpu/arm720t/tegra-common/cpu.h
> -int tegra_get_chip_type(void);
> +int tegra_get_soc_sku(void);
Aren't both tegra_get_soc_type() and tegra_get_soc_sku() going to be
used, and hence need prototyping?
Oh, I guess you didn't mean to add tegra_get_soc_sku() here, since this
patch protoypes both new functions in arch/arm/include/asm/arch-tegra/ap.h.
prev parent reply other threads:[~2013-04-02 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 20:55 [U-Boot] [PATCH] Tegra: Split tegra_get_chip_type() into _soc and _sku functions Tom Warren
2013-04-02 21:24 ` Stephen Warren [this message]
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=515B4CA3.9010008@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