[U-Boot] [PATCH 07/60] usb: tegra: move header file to driver directory

Stephen Warren
2016-04-19T20:58:47Z

From: Stephen Warren <swarren@nvidia.com>

Tegra's usb.h only contains private definitions for use inside the Tegra
EHCI driver. Move it out of the global include directory since nothing
should need to access them.

One access to these registers does exist; a boot-time cleanup of any
previous USB device-mode session. Hopefully this can be moved into the
EHCI controller probe/bind at some point, presuming that USB devices get
probed/bound at boot even before USB is used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/board2.c | 2 +-
.../asm/arch-tegra/usb.h => drivers/usb/host/ehci-tegra-priv.h | 6 +++---
drivers/usb/host/ehci-tegra.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
rename arch/arm/include/asm/arch-tegra/usb.h => drivers/usb/host/ehci-tegra-priv.h (99%)

diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 05e83268cd40..3ee65ee3f921 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -26,7 +26,7 @@
#ifdef CONFIG_TEGRA_CLOCK_SCALING
#include <asm/arch/emc.h>
#endif
-#include <asm/arch-tegra/usb.h>
+#include "../../../drivers/usb/host/ehci-tegra-priv.h"
#ifdef CONFIG_USB_EHCI_TEGRA
#include <usb.h>
#endif
diff --git a/arch/arm/include/asm/arch-tegra/usb.h b/drivers/usb/host/ehci-tegra-priv.h
similarity index 99%
rename from arch/arm/include/asm/arch-tegra/usb.h
rename to drivers/usb/host/ehci-tegra-priv.h
index 24198e4a33d0..72d8a1a7eb9c 100644
--- a/arch/arm/include/asm/arch-tegra/usb.h
+++ b/drivers/usb/host/ehci-tegra-priv.h
@@ -5,8 +5,8 @@
* SPDX-License-Identifier: GPL-2.0+
*/

-#ifndef _TEGRA_USB_H_
-#define _TEGRA_USB_H_
+#ifndef _EHCI_TEGRA_PRIV_H
+#define _EHCI_TEGRA_PRIV_H

/* USB Controller (USBx_CONTROLLER_) regs */
struct usb_ctlr {
@@ -355,4 +355,4 @@ struct usb_ctlr {
#define VBUS_B_SESS_VLD_SW_VALUE (1 << 12)
#define VBUS_B_SESS_VLD_SW_EN (1 << 11)

-#endif /* _TEGRA_USB_H_ */
+#endif
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 31d54ab285bf..9bf069382605 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors.
- * Copyright (c) 2009-2015 NVIDIA Corporation
+ * Copyright (c) 2009-2016 NVIDIA Corporation
* Copyright (c) 2013 Lucas Stach
*
* SPDX-License-Identifier: GPL-2.0+
@@ -12,7 +12,6 @@
#include <asm/io.h>
#include <asm-generic/gpio.h>
#include <asm/arch/clock.h>
-#include <asm/arch-tegra/usb.h>
#include <asm/arch-tegra/clk_rst.h>
#include <usb.h>
#include <usb/ulpi.h>
@@ -20,6 +19,7 @@
#include <fdtdec.h>

#include "ehci.h"
+#include "ehci-tegra-priv.h"

DECLARE_GLOBAL_DATA_PTR;

--
2.8.1