[U-Boot] [PATCH 45/60] ARM: tegra: move custom pinmux.h to

Stephen Warren
2016-04-19T20:59:25Z

From: Stephen Warren <swarren@nvidia.com>

Machine-specific headers should be in this location. Eventually, we'll
move all headers from arch/arm/include to arch/arm/mach-tegra/include,
or find a way to delete them.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/board2.c | 1 -
arch/arm/mach-tegra/cpu.c | 1 -
.../pinmux.h => mach-tegra/include/mach/pinmux_common.h} | 11 +++++------
arch/arm/mach-tegra/pinmux-common.c | 4 ++--
arch/arm/mach-tegra/spl.c | 1 -
arch/arm/mach-tegra/tegra114/cpu.c | 2 +-
arch/arm/mach-tegra/tegra114/funcmux.c | 4 ++--
.../tegra114/include/mach}/pinmux.h | 8 ++++----
arch/arm/mach-tegra/tegra114/pinmux.c | 4 ++--
arch/arm/mach-tegra/tegra124/cpu.c | 2 +-
arch/arm/mach-tegra/tegra124/funcmux.c | 4 ++--
.../tegra124/include/mach}/pinmux.h | 8 ++++----
arch/arm/mach-tegra/tegra124/pinmux.c | 4 ++--
arch/arm/mach-tegra/tegra20/funcmux.c | 3 ++-
.../arch-tegra20 => mach-tegra/tegra20/include/mach}/pinmux.h | 10 +++++-----
arch/arm/mach-tegra/tegra20/pinmux.c | 3 ++-
arch/arm/mach-tegra/tegra20/warmboot.c | 1 -
arch/arm/mach-tegra/tegra20/warmboot_avp.c | 1 -
arch/arm/mach-tegra/tegra210/funcmux.c | 3 +--
.../tegra210/include/mach}/pinmux.h | 8 ++++----
arch/arm/mach-tegra/tegra210/pinmux.c | 4 ++--
arch/arm/mach-tegra/tegra30/funcmux.c | 4 ++--
.../arch-tegra30 => mach-tegra/tegra30/include/mach}/pinmux.h | 8 ++++----
arch/arm/mach-tegra/tegra30/pinmux.c | 4 ++--
board/avionic-design/common/tamonten-ng.c | 2 +-
board/avionic-design/common/tamonten.c | 2 +-
board/compal/paz00/paz00.c | 4 ++--
board/compulab/trimslice/trimslice.c | 4 ++--
board/nvidia/cardhu/cardhu.c | 2 +-
board/nvidia/dalmore/dalmore.c | 2 +-
board/nvidia/e2220-1170/e2220-1170.c | 2 +-
board/nvidia/harmony/harmony.c | 4 ++--
board/nvidia/jetson-tk1/jetson-tk1.c | 2 +-
board/nvidia/nyan-big/nyan-big.c | 2 +-
board/nvidia/p2371-0000/p2371-0000.c | 2 +-
board/nvidia/p2371-2180/p2371-2180.c | 2 +-
board/nvidia/p2571/p2571.c | 2 +-
board/nvidia/seaboard/seaboard.c | 2 +-
board/nvidia/venice2/venice2.c | 2 +-
board/nvidia/whistler/whistler.c | 4 ++--
board/toradex/apalis_t30/apalis_t30.c | 2 +-
board/toradex/colibri_t20/colibri_t20.c | 2 +-
board/toradex/colibri_t30/colibri_t30.c | 2 +-
drivers/i2c/tegra_i2c.c | 1 -
drivers/spi/tegra20_sflash.c | 4 ++--
drivers/video/tegra.c | 2 +-
46 files changed, 75 insertions(+), 81 deletions(-)
rename arch/arm/{include/asm/arch-tegra/pinmux.h => mach-tegra/include/mach/pinmux_common.h} (97%)
rename arch/arm/{include/asm/arch-tegra114 => mach-tegra/tegra114/include/mach}/pinmux.h (98%)
rename arch/arm/{include/asm/arch-tegra124 => mach-tegra/tegra124/include/mach}/pinmux.h (98%)
rename arch/arm/{include/asm/arch-tegra20 => mach-tegra/tegra20/include/mach}/pinmux.h (96%)
rename arch/arm/{include/asm/arch-tegra210 => mach-tegra/tegra210/include/mach}/pinmux.h (98%)
rename arch/arm/{include/asm/arch-tegra30 => mach-tegra/tegra30/include/mach}/pinmux.h (98%)

diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index c3e6fbf2a5a4..2667efe5aa71 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -14,7 +14,6 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include "../../../drivers/usb/host/ehci-tegra-priv.h"
diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c
index e3c27845174a..eb9222b2f23d 100644
--- a/arch/arm/mach-tegra/cpu.c
+++ b/arch/arm/mach-tegra/cpu.c
@@ -7,7 +7,6 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include "cpu.h"
diff --git a/arch/arm/include/asm/arch-tegra/pinmux.h b/arch/arm/mach-tegra/include/mach/pinmux_common.h
similarity index 97%
rename from arch/arm/include/asm/arch-tegra/pinmux.h
rename to arch/arm/mach-tegra/include/mach/pinmux_common.h
index 65eb37334e95..6e98ba29eef7 100644
--- a/arch/arm/include/asm/arch-tegra/pinmux.h
+++ b/arch/arm/mach-tegra/include/mach/pinmux_common.h
@@ -1,17 +1,16 @@
/*
- * (C) Copyright 2010-2014
+ * (C) Copyright 2010-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA_PINMUX_H_
-#define _TEGRA_PINMUX_H_
+#ifndef _TEGRA_PINMUX_COMMON_H
+#define _TEGRA_PINMUX_COMMON_H

+#include <config.h>
#include <linux/types.h>

-#include <asm/arch/tegra.h>
-
/* The pullup/pulldown state of a pin group */
enum pmux_pull {
PMUX_PULL_NORMAL = 0,
@@ -247,4 +246,4 @@ struct pmux_mipipadctrlgrp_desc {
extern const struct pmux_mipipadctrlgrp_desc *tegra_soc_mipipadctrl_groups;
#endif /* TEGRA_PMX_SOC_HAS_MIPI_PAD_CTRL_GRPS */

-#endif /* _TEGRA_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/pinmux-common.c b/arch/arm/mach-tegra/pinmux-common.c
index 5862c4ac3dc6..faa406e077a4 100644
--- a/arch/arm/mach-tegra/pinmux-common.c
+++ b/arch/arm/mach-tegra/pinmux-common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2011 The Chromium OS Authors.
*
* SPDX-License-Identifier: GPL-2.0+
@@ -7,7 +7,7 @@

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

/* return 1 if a pingrp is in range */
#define pmux_pingrp_isvalid(pin) (((pin) >= 0) && ((pin) < PMUX_PINGRP_COUNT))
diff --git a/arch/arm/mach-tegra/spl.c b/arch/arm/mach-tegra/spl.c
index e793700b243e..49af4119e927 100644
--- a/arch/arm/mach-tegra/spl.c
+++ b/arch/arm/mach-tegra/spl.c
@@ -11,7 +11,6 @@

#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/spl.h>
#include <mach/board.h>
diff --git a/arch/arm/mach-tegra/tegra114/cpu.c b/arch/arm/mach-tegra/tegra114/cpu.c
index c06e632bb36a..423ace4a2ebd 100644
--- a/arch/arm/mach-tegra/tegra114/cpu.c
+++ b/arch/arm/mach-tegra/tegra114/cpu.c
@@ -8,9 +8,9 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <mach/pinmux.h>
#include <soc/flow.h>
#include "../cpu.h"
#include "../pmc.h"
diff --git a/arch/arm/mach-tegra/tegra114/funcmux.c b/arch/arm/mach-tegra/tegra114/funcmux.c
index ca9d970abc81..e32b75c8a0b6 100644
--- a/arch/arm/mach-tegra/tegra114/funcmux.c
+++ b/arch/arm/mach-tegra/tegra114/funcmux.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0
*/
@@ -9,7 +9,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

int funcmux_select(enum periph_id id, int config)
{
diff --git a/arch/arm/include/asm/arch-tegra114/pinmux.h b/arch/arm/mach-tegra/tegra114/include/mach/pinmux.h
similarity index 98%
rename from arch/arm/include/asm/arch-tegra114/pinmux.h
rename to arch/arm/mach-tegra/tegra114/include/mach/pinmux.h
index c96fd096695b..af2e4be55fdf 100644
--- a/arch/arm/include/asm/arch-tegra114/pinmux.h
+++ b/arch/arm/mach-tegra/tegra114/include/mach/pinmux.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA114_PINMUX_H_
-#define _TEGRA114_PINMUX_H_
+#ifndef _TEGRA114_PINMUX_H
+#define _TEGRA114_PINMUX_H

enum pmux_pingrp {
PMUX_PINGRP_ULPI_DATA0_PO1,
@@ -330,6 +330,6 @@ enum pmux_func {
#define TEGRA_PMX_PINS_HAVE_OD
#define TEGRA_PMX_PINS_HAVE_IO_RESET
#define TEGRA_PMX_PINS_HAVE_RCV_SEL
-#include <asm/arch-tegra/pinmux.h>
+#include <mach/pinmux_common.h>

-#endif /* _TEGRA114_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/tegra114/pinmux.c b/arch/arm/mach-tegra/tegra114/pinmux.c
index 3e5acb93ce28..e4d768637878 100644
--- a/arch/arm/mach-tegra/tegra114/pinmux.c
+++ b/arch/arm/mach-tegra/tegra114/pinmux.c
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

#define PIN(pin, f0, f1, f2, f3) \
{ \
diff --git a/arch/arm/mach-tegra/tegra124/cpu.c b/arch/arm/mach-tegra/tegra124/cpu.c
index 527c4a186e68..c01d36c11c4b 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -8,9 +8,9 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <mach/pinmux.h>
#include <soc/flow.h>
#include "../cpu.h"
#include "../pmc.h"
diff --git a/arch/arm/mach-tegra/tegra124/funcmux.c b/arch/arm/mach-tegra/tegra124/funcmux.c
index cced787e6b6d..cdbe73f319a6 100644
--- a/arch/arm/mach-tegra/tegra124/funcmux.c
+++ b/arch/arm/mach-tegra/tegra124/funcmux.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2013
+ * (C) Copyright 2013-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -10,7 +10,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

int funcmux_select(enum periph_id id, int config)
{
diff --git a/arch/arm/include/asm/arch-tegra124/pinmux.h b/arch/arm/mach-tegra/tegra124/include/mach/pinmux.h
similarity index 98%
rename from arch/arm/include/asm/arch-tegra124/pinmux.h
rename to arch/arm/mach-tegra/tegra124/include/mach/pinmux.h
index 31b921f4ae71..4b4424460e5e 100644
--- a/arch/arm/include/asm/arch-tegra124/pinmux.h
+++ b/arch/arm/mach-tegra/tegra124/include/mach/pinmux.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA124_PINMUX_H_
-#define _TEGRA124_PINMUX_H_
+#ifndef _TEGRA124_PINMUX_H
+#define _TEGRA124_PINMUX_H

enum pmux_pingrp {
PMUX_PINGRP_ULPI_DATA0_PO1,
@@ -361,6 +361,6 @@ enum pmux_func {
#define TEGRA_PMX_PINS_HAVE_OD
#define TEGRA_PMX_PINS_HAVE_IO_RESET
#define TEGRA_PMX_PINS_HAVE_RCV_SEL
-#include <asm/arch-tegra/pinmux.h>
+#include <mach/pinmux_common.h>

-#endif /* _TEGRA124_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/tegra124/pinmux.c b/arch/arm/mach-tegra/tegra124/pinmux.c
index 4629b4676c4a..d5b4cdb9a686 100644
--- a/arch/arm/mach-tegra/tegra124/pinmux.c
+++ b/arch/arm/mach-tegra/tegra124/pinmux.c
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2013-2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

#define PIN(pin, f0, f1, f2, f3) \
{ \
diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
index 44a85c5f1dc9..348507aee2d6 100644
--- a/arch/arm/mach-tegra/tegra20/funcmux.c
+++ b/arch/arm/mach-tegra/tegra20/funcmux.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors.
+ * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -8,7 +9,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

/*
* The PINMUX macro is used to set up pinmux tables.
diff --git a/arch/arm/include/asm/arch-tegra20/pinmux.h b/arch/arm/mach-tegra/tegra20/include/mach/pinmux.h
similarity index 96%
rename from arch/arm/include/asm/arch-tegra20/pinmux.h
rename to arch/arm/mach-tegra/tegra20/include/mach/pinmux.h
index bf35d50ba316..f05e993b34cc 100644
--- a/arch/arm/include/asm/arch-tegra20/pinmux.h
+++ b/arch/arm/mach-tegra/tegra20/include/mach/pinmux.h
@@ -1,12 +1,12 @@
/*
- * (C) Copyright 2010,2011
+ * (C) Copyright 2010-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA20_PINMUX_H_
-#define _TEGRA20_PINMUX_H_
+#ifndef _TEGRA20_PINMUX_H
+#define _TEGRA20_PINMUX_H

/*
* Pin groups which we adjust. There are three basic attributes of each pin
@@ -234,6 +234,6 @@ enum pmux_func {
};

#define TEGRA_PMX_SOC_DRV_GROUP_BASE_REG 0x868
-#include <asm/arch-tegra/pinmux.h>
+#include <mach/pinmux_common.h>

-#endif /* _TEGRA20_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/tegra20/pinmux.c b/arch/arm/mach-tegra/tegra20/pinmux.c
index e484f991bf81..bfcef743a998 100644
--- a/arch/arm/mach-tegra/tegra20/pinmux.c
+++ b/arch/arm/mach-tegra/tegra20/pinmux.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors.
+ * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -8,7 +9,7 @@

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

/*
* This defines the order of the pin mux control bits in the registers. For
diff --git a/arch/arm/mach-tegra/tegra20/warmboot.c b/arch/arm/mach-tegra/tegra20/warmboot.c
index dc9727ab3f5f..26db8a1477a5 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot.c
@@ -9,7 +9,6 @@
#include <asm/io.h>
#include <asm/errno.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include "../apb_misc.h"
diff --git a/arch/arm/mach-tegra/tegra20/warmboot_avp.c b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
index ace6e8d4f59b..07aa542c11b0 100644
--- a/arch/arm/mach-tegra/tegra20/warmboot_avp.c
+++ b/arch/arm/mach-tegra/tegra20/warmboot_avp.c
@@ -8,7 +8,6 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include <soc/flow.h>
diff --git a/arch/arm/mach-tegra/tegra210/funcmux.c b/arch/arm/mach-tegra/tegra210/funcmux.c
index 618d2282e6aa..bd7c2521caf3 100644
--- a/arch/arm/mach-tegra/tegra210/funcmux.c
+++ b/arch/arm/mach-tegra/tegra210/funcmux.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2013-2015
+ * (C) Copyright 2013-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -10,7 +10,6 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>

int funcmux_select(enum periph_id id, int config)
{
diff --git a/arch/arm/include/asm/arch-tegra210/pinmux.h b/arch/arm/mach-tegra/tegra210/include/mach/pinmux.h
similarity index 98%
rename from arch/arm/include/asm/arch-tegra210/pinmux.h
rename to arch/arm/mach-tegra/tegra210/include/mach/pinmux.h
index 4772d96101c9..59144bfa388b 100644
--- a/arch/arm/include/asm/arch-tegra210/pinmux.h
+++ b/arch/arm/mach-tegra/tegra210/include/mach/pinmux.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA210_PINMUX_H_
-#define _TEGRA210_PINMUX_H_
+#ifndef _TEGRA210_PINMUX_H
+#define _TEGRA210_PINMUX_H

enum pmux_pingrp {
PMUX_PINGRP_SDMMC1_CLK_PM0,
@@ -417,6 +417,6 @@ enum pmux_func {
#define TEGRA_PMX_PINS_HAVE_LOCK
#define TEGRA_PMX_PINS_HAVE_OD
#define TEGRA_PMX_PINS_HAVE_E_IO_HV
-#include <asm/arch-tegra/pinmux.h>
+#include <mach/pinmux_common.h>

-#endif /* _TEGRA210_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/tegra210/pinmux.c b/arch/arm/mach-tegra/tegra210/pinmux.c
index a29c76b1fae6..abd4600985d0 100644
--- a/arch/arm/mach-tegra/tegra210/pinmux.c
+++ b/arch/arm/mach-tegra/tegra210/pinmux.c
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

#define PIN(pin, f0, f1, f2, f3) \
{ \
diff --git a/arch/arm/mach-tegra/tegra30/funcmux.c b/arch/arm/mach-tegra/tegra30/funcmux.c
index 8c6833904378..c627574d61de 100644
--- a/arch/arm/mach-tegra/tegra30/funcmux.c
+++ b/arch/arm/mach-tegra/tegra30/funcmux.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
*/
@@ -9,7 +9,7 @@
#include <common.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

int funcmux_select(enum periph_id id, int config)
{
diff --git a/arch/arm/include/asm/arch-tegra30/pinmux.h b/arch/arm/mach-tegra/tegra30/include/mach/pinmux.h
similarity index 98%
rename from arch/arm/include/asm/arch-tegra30/pinmux.h
rename to arch/arm/mach-tegra/tegra30/include/mach/pinmux.h
index 6f4e2899b963..7717370f00eb 100644
--- a/arch/arm/include/asm/arch-tegra30/pinmux.h
+++ b/arch/arm/mach-tegra/tegra30/include/mach/pinmux.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA30_PINMUX_H_
-#define _TEGRA30_PINMUX_H_
+#ifndef _TEGRA30_PINMUX_H
+#define _TEGRA30_PINMUX_H

enum pmux_pingrp {
PMUX_PINGRP_ULPI_DATA0_PO1,
@@ -406,6 +406,6 @@ enum pmux_func {
#define TEGRA_PMX_PINS_HAVE_LOCK
#define TEGRA_PMX_PINS_HAVE_OD
#define TEGRA_PMX_PINS_HAVE_IO_RESET
-#include <asm/arch-tegra/pinmux.h>
+#include <mach/pinmux_common.h>

-#endif /* _TEGRA30_PINMUX_H_ */
+#endif
diff --git a/arch/arm/mach-tegra/tegra30/pinmux.c b/arch/arm/mach-tegra/tegra30/pinmux.c
index 7eb05743b4bc..fd1f9464a014 100644
--- a/arch/arm/mach-tegra/tegra30/pinmux.c
+++ b/arch/arm/mach-tegra/tegra30/pinmux.c
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/

#include <common.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>

#define PIN(pin, f0, f1, f2, f3) \
{ \
diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c
index 6bff3285c73c..9955af3f6bbb 100644
--- a/board/avionic-design/common/tamonten-ng.c
+++ b/board/avionic-design/common/tamonten-ng.c
@@ -11,7 +11,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include "pinmux-config-tamonten-ng.h"

#define PMU_I2C_ADDRESS 0x2D
diff --git a/board/avionic-design/common/tamonten.c b/board/avionic-design/common/tamonten.c
index c369d13e7f50..7d3a5e72bc19 100644
--- a/board/avionic-design/common/tamonten.c
+++ b/board/avionic-design/common/tamonten.c
@@ -14,10 +14,10 @@
#include <asm/gpio.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/arch-tegra/clk_rst.h>
#include <mach/board.h>
+#include <mach/pinmux.h>

#ifdef CONFIG_BOARD_EARLY_INIT_F
void gpio_early_init(void)
diff --git a/board/compal/paz00/paz00.c b/board/compal/paz00/paz00.c
index 43931b0653a3..8ae07d396474 100644
--- a/board/compal/paz00/paz00.c
+++ b/board/compal/paz00/paz00.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved.
*
* See file CREDITS for list of people who contributed to this
* project.
@@ -10,8 +10,8 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/tegra.h>
-#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
+#include <mach/pinmux.h>

#ifdef CONFIG_TEGRA_MMC
/*
diff --git a/board/compulab/trimslice/trimslice.c b/board/compulab/trimslice/trimslice.c
index 723293fef35a..a1f4f2213dc8 100644
--- a/board/compulab/trimslice/trimslice.c
+++ b/board/compulab/trimslice/trimslice.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2010-2012
+ * (C) Copyright 2010-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -10,8 +10,8 @@
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
+#include <mach/pinmux.h>
#include <i2c.h>

void pin_mux_usb(void)
diff --git a/board/nvidia/cardhu/cardhu.c b/board/nvidia/cardhu/cardhu.c
index edfe960428ac..b78d2bf46d24 100644
--- a/board/nvidia/cardhu/cardhu.c
+++ b/board/nvidia/cardhu/cardhu.c
@@ -10,7 +10,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include "pinmux-config-cardhu.h"

#define PMU_I2C_ADDRESS 0x2D
diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c
index 09adc74e0ede..ad9214d1e37a 100644
--- a/board/nvidia/dalmore/dalmore.c
+++ b/board/nvidia/dalmore/dalmore.c
@@ -6,7 +6,7 @@

#include <common.h>
#include <dm.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include "pinmux-config-dalmore.h"
#include <i2c.h>

diff --git a/board/nvidia/e2220-1170/e2220-1170.c b/board/nvidia/e2220-1170/e2220-1170.c
index c2b5e5e09d21..5d2f3589b678 100644
--- a/board/nvidia/e2220-1170/e2220-1170.c
+++ b/board/nvidia/e2220-1170/e2220-1170.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "../p2571/max77620_init.h"
#include "pinmux-config-e2220-1170.h"
diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c
index c892a25751f9..4f3df8fe9655 100644
--- a/board/nvidia/harmony/harmony.c
+++ b/board/nvidia/harmony/harmony.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2010,2011
+ * (C) Copyright 2010-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -10,9 +10,9 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/tegra.h>
#include <asm/gpio.h>
+#include <mach/pinmux.h>

#ifdef CONFIG_TEGRA_MMC
/*
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index 422a18a4e530..bac2d0c36101 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -9,7 +9,7 @@
#include <dt-bindings/gpio/tegra-gpio.h>
#include <power/as3722.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "pinmux-config-jetson-tk1.h"

diff --git a/board/nvidia/nyan-big/nyan-big.c b/board/nvidia/nyan-big/nyan-big.c
index db2874ed93ac..fd9669ba0bb5 100644
--- a/board/nvidia/nyan-big/nyan-big.c
+++ b/board/nvidia/nyan-big/nyan-big.c
@@ -12,9 +12,9 @@
#include <power/pmic.h>
#include <asm/gpio.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "pinmux-config-nyan-big.h"

diff --git a/board/nvidia/p2371-0000/p2371-0000.c b/board/nvidia/p2371-0000/p2371-0000.c
index a23dfc8afaef..a63f95f1f4f1 100644
--- a/board/nvidia/p2371-0000/p2371-0000.c
+++ b/board/nvidia/p2371-0000/p2371-0000.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "../p2571/max77620_init.h"
#include "pinmux-config-p2371-0000.h"
diff --git a/board/nvidia/p2371-2180/p2371-2180.c b/board/nvidia/p2371-2180/p2371-2180.c
index 3989ab8bde32..c9884bd70335 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "../p2571/max77620_init.h"
#include "pinmux-config-p2371-2180.h"
diff --git a/board/nvidia/p2571/p2571.c b/board/nvidia/p2571/p2571.c
index 7faec788f3cf..58e5c56c5b16 100644
--- a/board/nvidia/p2571/p2571.c
+++ b/board/nvidia/p2571/p2571.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "max77620_init.h"
#include "pinmux-config-p2571.h"
diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c
index 913679e888d3..cc017554548a 100644
--- a/board/nvidia/seaboard/seaboard.c
+++ b/board/nvidia/seaboard/seaboard.c
@@ -12,8 +12,8 @@
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <mach/board.h>
+#include <mach/pinmux.h>

/* TODO: Remove this code when the SPI switch is working */
#if (CONFIG_MACH_TYPE != MACH_TYPE_VENTANA)
diff --git a/board/nvidia/venice2/venice2.c b/board/nvidia/venice2/venice2.c
index 5791e0d73522..9b02afd16040 100644
--- a/board/nvidia/venice2/venice2.c
+++ b/board/nvidia/venice2/venice2.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include <mach/tegra_gpio.h>
#include "pinmux-config-venice2.h"

diff --git a/board/nvidia/whistler/whistler.c b/board/nvidia/whistler/whistler.c
index 3476f1159fea..b2c71a361afd 100644
--- a/board/nvidia/whistler/whistler.c
+++ b/board/nvidia/whistler/whistler.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2010-2012
+ * (C) Copyright 2010-2016
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
@@ -11,8 +11,8 @@
#include <asm/arch/tegra.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/gpio.h>
+#include <mach/pinmux.h>
#include <i2c.h>

#ifdef CONFIG_TEGRA_MMC
diff --git a/board/toradex/apalis_t30/apalis_t30.c b/board/toradex/apalis_t30/apalis_t30.c
index e2a40db1afdd..06fddec6e0fe 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -7,10 +7,10 @@
*/

#include <common.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch-tegra/tegra.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <mach/pinmux.h>
#include <dm.h>
#include <i2c.h>

diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index 2505104b78fe..87dfcd5f3f19 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -12,9 +12,9 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch-tegra/tegra.h>
#include <mach/board.h>
+#include <mach/pinmux.h>

#define PMU_I2C_ADDRESS 0x34
#define MAX_I2C_RETRY 3
diff --git a/board/toradex/colibri_t30/colibri_t30.c b/board/toradex/colibri_t30/colibri_t30.c
index e0e7deef579a..1be24b86fdc4 100644
--- a/board/toradex/colibri_t30/colibri_t30.c
+++ b/board/toradex/colibri_t30/colibri_t30.c
@@ -11,8 +11,8 @@
#include <dt-bindings/gpio/tegra-gpio.h>
#include <asm/gpio.h>
#include <asm/io.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch-tegra/tegra.h>
+#include <mach/pinmux.h>
#include "pinmux-config-colibri_t30.h"

int arch_misc_init(void)
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index f1b8877be228..4eb68b6e11b5 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -14,7 +14,6 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch-tegra/clk_rst.h>
#include <mach/tegra_i2c.h>
#include "tegra_i2c_priv.h"
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 6888a96139a7..4e51b252e6a2 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 NVIDIA Corporation
+ * Copyright (c) 2010-2016 NVIDIA Corporation
* With help from the mpc8xxx SPI driver
* With more help from omap3_spi SPI driver
*
@@ -12,8 +12,8 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/clock.h>
-#include <asm/arch/pinmux.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <mach/pinmux.h>
#include <spi.h>
#include <fdtdec.h>
#include "tegra_spi.h"
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 45a2876d4030..5b778777619f 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -15,7 +15,7 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
-#include <asm/arch/pinmux.h>
+#include <mach/pinmux.h>
#include "tegra_dc.h"

DECLARE_GLOBAL_DATA_PTR;
--
2.8.1