[U-Boot] [PATCH 20/60] ARM: tegra: move pmc.h

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


From: Stephen Warren <swarren at nvidia.com>

This header is only needed by code local to mach-tegra, so move it there
to avoid polluting the global include path.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
 arch/arm/mach-tegra/ap.c                              | 2 +-
 arch/arm/mach-tegra/board.c                           | 2 +-
 arch/arm/mach-tegra/board2.c                          | 2 +-
 arch/arm/mach-tegra/clock.c                           | 2 +-
 arch/arm/mach-tegra/cmd_enterrcm.c                    | 4 ++--
 arch/arm/mach-tegra/cpu.c                             | 4 ++--
 arch/arm/{include/asm/arch-tegra => mach-tegra}/pmc.h | 6 +++---
 arch/arm/mach-tegra/tegra114/cpu.c                    | 4 ++--
 arch/arm/mach-tegra/tegra124/cpu.c                    | 2 +-
 arch/arm/mach-tegra/tegra124/psci.c                   | 2 +-
 arch/arm/mach-tegra/tegra20/cpu.c                     | 4 ++--
 arch/arm/mach-tegra/tegra20/warmboot.c                | 2 +-
 arch/arm/mach-tegra/tegra20/warmboot_avp.c            | 2 +-
 arch/arm/mach-tegra/tegra30/cpu.c                     | 2 +-
 board/nvidia/nyan-big/nyan-big.c                      | 1 -
 15 files changed, 20 insertions(+), 21 deletions(-)
 rename arch/arm/{include/asm/arch-tegra => mach-tegra}/pmc.h (99%)

diff --git a/arch/arm/mach-tegra/ap.c b/arch/arm/mach-tegra/ap.c
index d226d546a1e5..94cc124979c6 100644
--- a/arch/arm/mach-tegra/ap.c
+++ b/arch/arm/mach-tegra/ap.c
@@ -13,12 +13,12 @@
 #include <asm/arch/gp_padctrl.h>
 #include <asm/arch/mc.h>
 #include <asm/arch-tegra/clock.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/scu.h>
 #include <asm/arch-tegra/tegra.h>
 #include <asm/arch-tegra/warmboot.h>
 #include "cpu.h"
 #include "fuse.h"
+#include "pmc.h"
 
 int tegra_get_chip(void)
 {
diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c
index 098547ab1e88..2f80e2e0c696 100644
--- a/arch/arm/mach-tegra/board.c
+++ b/arch/arm/mach-tegra/board.c
@@ -15,9 +15,9 @@
 #include <asm/arch/mc.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/board.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/sys_proto.h>
 #include <asm/arch-tegra/warmboot.h>
+#include "pmc.h"
 
 void save_boot_params_ret(void);
 
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 35ae69fbbe29..c630fd18fdfe 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -19,7 +19,6 @@
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/board.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/sys_proto.h>
 #include <asm/arch-tegra/warmboot.h>
 #ifdef CONFIG_TEGRA_CLOCK_SCALING
@@ -38,6 +37,7 @@
 #include <spi.h>
 #include "emc.h"
 #include "gpu.h"
+#include "pmc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 80d6fccf2551..1a6fc0151a60 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -12,9 +12,9 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <div64.h>
 #include <fdtdec.h>
+#include "pmc.h"
 
 /*
  * This is our record of the current clock rate of each clock. We don't
diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c
index a94ec93e7be1..d5205c39ab79 100644
--- a/arch/arm/mach-tegra/cmd_enterrcm.c
+++ b/arch/arm/mach-tegra/cmd_enterrcm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * Derived from code (arch/arm/lib/reset.c) that is:
  *
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <asm/arch/tegra.h>
-#include <asm/arch-tegra/pmc.h>
+#include "pmc.h"
 
 static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc,
 		       char * const argv[])
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index a3ebb57f20b2..09d15974dd9b 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -11,9 +11,9 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/scu.h>
 #include "cpu.h"
+#include "pmc.h"
 
 int get_num_cpus(void)
 {
diff --git a/arch/arm/include/asm/arch-tegra/pmc.h b/arch/arm/mach-tegra/pmc.h
similarity index 99%
rename from arch/arm/include/asm/arch-tegra/pmc.h
rename to arch/arm/mach-tegra/pmc.h
index 9c9b67448985..be38f007bc94 100644
--- a/arch/arm/include/asm/arch-tegra/pmc.h
+++ b/arch/arm/mach-tegra/pmc.h
@@ -5,8 +5,8 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#ifndef _PMC_H_
-#define _PMC_H_
+#ifndef _TEGRA_PMC_H
+#define _TEGRA_PMC_H
 
 /* Power Management Controller (APBDEV_PMC_) registers */
 struct pmc_ctlr {
@@ -374,4 +374,4 @@ struct pmc_ctlr {
 /* APBDEV_PMC_CNTRL2_0 0x440 */
 #define HOLD_CKE_LOW_EN				(1 << 12)
 
-#endif	/* PMC_H */
+#endif
diff --git a/arch/arm/mach-tegra/tegra114/cpu.c b/arch/arm/mach-tegra/tegra114/cpu.c
index 272a2ea281ee..41e337fcfb57 100644
--- a/arch/arm/mach-tegra/tegra114/cpu.c
+++ b/arch/arm/mach-tegra/tegra114/cpu.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2010-2014
+ * (C) Copyright 2010-2016
  * NVIDIA Corporation <www.nvidia.com>
  *
  * SPDX-License-Identifier:     GPL-2.0+
@@ -12,8 +12,8 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include "../cpu.h"
+#include "../pmc.h"
 
 /* Tegra114-specific CPU init code */
 static void enable_cpu_power_rail(void)
diff --git a/arch/arm/mach-tegra/tegra124/cpu.c b/arch/arm/mach-tegra/tegra124/cpu.c
index be31cb4ac881..e8c8c507c404 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -12,8 +12,8 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include "../cpu.h"
+#include "../pmc.h"
 
 /* Tegra124-specific CPU init code */
 
diff --git a/arch/arm/mach-tegra/tegra124/psci.c b/arch/arm/mach-tegra/tegra124/psci.c
index 08225e32dbd4..739cf352676e 100644
--- a/arch/arm/mach-tegra/tegra124/psci.c
+++ b/arch/arm/mach-tegra/tegra124/psci.c
@@ -11,8 +11,8 @@
 #include <asm/psci.h>
 #include <asm/arch/flow.h>
 #include <asm/arch/powergate.h>
-#include <asm/arch-tegra/pmc.h>
 #include "../cpu.h"
+#include "../pmc.h"
 
 static void park_cpu(void)
 {
diff --git a/arch/arm/mach-tegra/tegra20/cpu.c b/arch/arm/mach-tegra/tegra20/cpu.c
index 7fbc2e28655c..10205dca5e53 100644
--- a/arch/arm/mach-tegra/tegra20/cpu.c
+++ b/arch/arm/mach-tegra/tegra20/cpu.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * SPDX-License-Identifier:	GPL-2.0
  */
@@ -7,8 +7,8 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/tegra.h>
-#include <asm/arch-tegra/pmc.h>
 #include "../cpu.h"
+#include "../pmc.h"
 
 static void enable_cpu_power_rail(void)
 {
diff --git a/arch/arm/mach-tegra/tegra20/warmboot.c b/arch/arm/mach-tegra/tegra20/warmboot.c
index ba996d1801da..5a0390b72a4a 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot.c
@@ -15,10 +15,10 @@
 #include <asm/arch/sdram_param.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/warmboot.h>
 #include "../apb_misc.h"
 #include "../fuse.h"
+#include "../pmc.h"
 #include "crypto.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-tegra/tegra20/warmboot_avp.c b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
index 0ae401c569b6..d7f03c29df86 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot_avp.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
@@ -12,10 +12,10 @@
 #include <asm/arch/pinmux.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <asm/arch-tegra/warmboot.h>
 #include "../apb_misc.h"
 #include "../cpu.h"
+#include "../pmc.h"
 #include "warmboot_avp.h"
 
 #define DEBUG_RESET_CORESIGHT
diff --git a/arch/arm/mach-tegra/tegra30/cpu.c b/arch/arm/mach-tegra/tegra30/cpu.c
index 774207354064..392c8d3bb76e 100644
--- a/arch/arm/mach-tegra/tegra30/cpu.c
+++ b/arch/arm/mach-tegra/tegra30/cpu.c
@@ -10,9 +10,9 @@
 #include <asm/arch/flow.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <mach/tegra_i2c.h>
 #include "../cpu.h"
+#include "../pmc.h"
 
 /* Tegra30-specific CPU init code */
 
diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index 64d98f59a4c7..efd3c18ba740 100644
--- a/board/nvidia/nyan-big/nyan-big.c
+++ b/board/nvidia/nyan-big/nyan-big.c
@@ -16,7 +16,6 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/mc.h>
 #include <asm/arch-tegra/clk_rst.h>
-#include <asm/arch-tegra/pmc.h>
 #include <mach/tegra_gpio.h>
 #include "pinmux-config-nyan-big.h"
 
-- 
2.8.1



More information about the U-Boot mailing list