[U-Boot] [PATCH 41/60] ARM: tegra: remove tegra_get_sku_info()

Stephen Warren swarren at wwwdotorg.org
Tue Apr 19 22:59:21 CEST 2016


From: Stephen Warren <swarren at nvidia.com>

This is part of the internal implementation of tegra_get_chip_sku().

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
 arch/arm/mach-tegra/ap.c  | 14 +++-----------
 arch/arm/mach-tegra/cpu.c |  5 +----
 arch/arm/mach-tegra/cpu.h |  6 ------
 3 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index a8e3e8b7dfcb..f354f7d87b14 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -18,23 +18,15 @@
 #include "pmc.h"
 #include "scu.h"
 
-int tegra_get_sku_info(void)
+int tegra_get_chip_sku(void)
 {
-	int sku_id;
+#ifdef CONFIG_TEGRA20
 	struct fuse_regs *fuse = (struct fuse_regs *)NV_PA_FUSE_BASE;
+	uint sku_id;
 
 	sku_id = readl(&fuse->sku_info) & 0xff;
 	debug("%s: SKU info byte is 0x%02X\n", __func__, sku_id);
 
-	return sku_id;
-}
-
-int tegra_get_chip_sku(void)
-{
-#ifdef CONFIG_TEGRA20
-	uint sku_id;
-
-	sku_id = tegra_get_sku_info();
 	switch (sku_id) {
 	case SKU_ID_T20_7:
 	case SKU_ID_T20:
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index 30964dde8b19..f7285eb0de8c 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -206,15 +206,12 @@ void init_pllx(void)
 {
 	struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE;
 	struct clk_pll_simple *pll = &clkrst->crc_pll_simple[SIMPLE_PLLX];
-	int sku_info, chip_sku;
+	int chip_sku;
 	enum clock_osc_freq osc;
 	struct clk_pll_table *sel;
 	debug("%s entry\n", __func__);
 
 	/* get SKU info */
-	sku_info = tegra_get_sku_info();
-	debug("%s: SKU info byte = 0x%02X\n", __func__, sku_info);
-
 	/* get chip SKU, combo of the above info */
 	chip_sku = tegra_get_chip_sku();
 	debug("%s: Chip SKU = %d\n", __func__, chip_sku);
diff --git a/arch/arm/mach-tegra/cpu.h b/arch/arm/mach-tegra/cpu.h
index ee4f7868baf7..9e5bf39ebfd7 100644
--- a/arch/arm/mach-tegra/cpu.h
+++ b/arch/arm/mach-tegra/cpu.h
@@ -64,12 +64,6 @@ void powerup_cpu(void);
 void reset_A9_cpu(int reset);
 void start_cpu(u32 reset_vector);
 /**
- * Returns the SKU ID from the sku_info register
- *
- * @return	SKU ID - see SKU_ID_Txx...
- */
-int tegra_get_sku_info(void);
-/**
  * Works out the SOC/SKU type used for clocks settings
  *
  * @return	SOC type - see TEGRA_SOC...
-- 
2.8.1



More information about the U-Boot mailing list