Patchwork [U-Boot] ARM: tegra: support T33 SKU of Tegra30

login
register
mail settings
Submitter Stephen Warren
Date March 27, 2013, 7:37 p.m.
Message ID <1364413022-23599-1-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/231816/
State Accepted
Delegated to: Tom Warren
Headers show

Comments

Stephen Warren - March 27, 2013, 7:37 p.m.
From: Stephen Warren <swarren@nvidia.com>

Make U-Boot aware of the T33 SKU of Tegra30, and treat it identically
to any other Tegra30.

An alternative would be to simply remove the SKU checking from
tegra_get_chip_type(); most use of the value most likely simply wants
to know the current chip, not the specific SKU. Or, the function could
be split into separate tegra_get_chip() and tegra_get_sku() for the
cases where differentiation really is required.

I wonder whether tegra_get_chip_type() should printf() whenever any
unkown chip/SKU is found, although perhaps the function is called so
early that the printf() wouldn't actually make it to the UART anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/cpu/tegra-common/ap.c          |    1 +
 arch/arm/include/asm/arch-tegra/tegra.h |    1 +
 2 files changed, 2 insertions(+)
Simon Glass - March 30, 2013, 8:57 p.m.
On Wed, Mar 27, 2013 at 12:37 PM, Stephen Warren <swarren@wwwdotorg.org>wrote:

> From: Stephen Warren <swarren@nvidia.com>
>
> Make U-Boot aware of the T33 SKU of Tegra30, and treat it identically
> to any other Tegra30.
>
> An alternative would be to simply remove the SKU checking from
> tegra_get_chip_type(); most use of the value most likely simply wants
> to know the current chip, not the specific SKU. Or, the function could
> be split into separate tegra_get_chip() and tegra_get_sku() for the
> cases where differentiation really is required.
>
> I wonder whether tegra_get_chip_type() should printf() whenever any
> unkown chip/SKU is found, although perhaps the function is called so
> early that the printf() wouldn't actually make it to the UART anyway.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>

Acked-by: Simon Glass <sjg@chromium.org>

Patch

diff --git a/arch/arm/cpu/tegra-common/ap.c b/arch/arm/cpu/tegra-common/ap.c
index 236cda8..3f30805 100644
--- a/arch/arm/cpu/tegra-common/ap.c
+++ b/arch/arm/cpu/tegra-common/ap.c
@@ -65,6 +65,7 @@  int tegra_get_chip_type(void)
 		break;
 	case CHIPID_TEGRA30:
 		switch (tegra_sku_id) {
+		case SKU_ID_T33:
 		case SKU_ID_T30:
 			return TEGRA_SOC_T30;
 		}
diff --git a/arch/arm/include/asm/arch-tegra/tegra.h b/arch/arm/include/asm/arch-tegra/tegra.h
index bf7229d..3e642e9 100644
--- a/arch/arm/include/asm/arch-tegra/tegra.h
+++ b/arch/arm/include/asm/arch-tegra/tegra.h
@@ -78,6 +78,7 @@  enum {
 	SKU_ID_T25		= 0x18,
 	SKU_ID_AP25E		= 0x1b,
 	SKU_ID_T25E		= 0x1c,
+	SKU_ID_T33		= 0x80,
 	SKU_ID_T30		= 0x81, /* Cardhu value */
 	SKU_ID_T114_ENG		= 0x00, /* Dalmore value, unfused */
 };