platform: tegra: USB platform support
Suresh Mangipudi [Wed, 20 Feb 2013 09:31:17 +0000 (14:31 +0530)]
1. Move the dependence of USB phy on PMC and pad_ctrl.
2. Remove the code related to ULPI (Link/Null) and ICUSB.

Change-Id: I0c61acddc27600903ee9c7795f5a4ba618ebe9b8
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>

arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/include/mach/tegra_usb_pad_ctrl.h
arch/arm/mach-tegra/include/mach/tegra_usb_pmc.h
drivers/platform/Makefile
drivers/platform/tegra/Makefile [new file with mode: 0644]
drivers/platform/tegra/tegra_usb_pad_ctrl.c [moved from arch/arm/mach-tegra/tegra_usb_pad_ctrl.c with 99% similarity]
drivers/platform/tegra/tegra_usb_pmc.c [moved from arch/arm/mach-tegra/tegra_usb_pmc.c with 99% similarity]

index 178ecf6..934767b 100644 (file)
@@ -76,8 +76,6 @@ obj-y                                   += tegra_fuse.o
 obj-y                                   += kfuse.o
 obj-y                                   += csi.o
 obj-$(CONFIG_USB_SUPPORT)               += xusb.o
-obj-$(CONFIG_USB_SUPPORT)               += tegra_usb_pmc.o
-obj-$(CONFIG_USB_SUPPORT)               += tegra_usb_pad_ctrl.o
 
 obj-y                                   += powergate.o
 obj-y                                   += powergate-ops-txx.o
index 23207e7..d937766 100644 (file)
 #define   UTMIPLL_HW_PWRDN_CFG0_IDDQ_SWCTL     (1<<0)
 
 #define UTMIP_BIAS_CFG0                0x80c
-#define   UTMIP_OTGPD                  (1 << 11)
-#define   UTMIP_BIASPD                 (1 << 10)
-#define   UTMIP_HSSQUELCH_LEVEL(x)     (((x) & 0x3) << 0)
-#define   UTMIP_HSDISCON_LEVEL(x)      (((x) & 0x3) << 2)
-#define   UTMIP_HSDISCON_LEVEL_MSB     (1 << 24)
+#define UTMIP_OTGPD                    (1 << 11)
+#define UTMIP_BIASPD                   (1 << 10)
+#define UTMIP_HSSQUELCH_LEVEL(x)       (((x) & 0x3) << 0)
+#define UTMIP_HSDISCON_LEVEL(x)        (((x) & 0x3) << 2)
+#define UTMIP_HSDISCON_LEVEL_MSB       (1 << 24)
 
 /* xusb padctl regs for pad programming of t124 pcie */
 #define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_0        0x40
index e6417fe..e0df039 100644 (file)
@@ -227,7 +227,7 @@ enum tegra_usb_controller_type {
 /**
  * defines USB port speeds
  */
-enum usb_pmc_port_speed {
+enum tegra_usb_port_speed {
        USB_PMC_PORT_SPEED_FULL = 0,
        USB_PMC_PORT_SPEED_LOW,
        USB_PMC_PORT_SPEED_HIGH,
@@ -256,7 +256,7 @@ struct tegra_usb_pmc_data {
        u8 instance;
        enum tegra_usb_controller_type controller_type;
        enum tegra_usb_phy_interface phy_type;
-       enum usb_pmc_port_speed port_speed;
+       enum tegra_usb_port_speed port_speed;
        struct tegra_usb_pmc_ops *pmc_ops;
        void __iomem *usb_base;
        u32 utmip_rctrl_val;
index 8a44a4c..42acb42 100644 (file)
@@ -5,3 +5,4 @@
 obj-$(CONFIG_X86)              += x86/
 obj-$(CONFIG_OLPC)             += olpc/
 obj-$(CONFIG_GOLDFISH)         += goldfish/
+obj-$(CONFIG_ARCH_TEGRA)       += tegra/
diff --git a/drivers/platform/tegra/Makefile b/drivers/platform/tegra/Makefile
new file mode 100644 (file)
index 0000000..13487e6
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Makefile for linux/drivers/platform/tegra
+# Tegra Platform-Specific Drivers
+#
+obj-$(CONFIG_USB_SUPPORT)               += tegra_usb_pmc.o
+obj-$(CONFIG_USB_SUPPORT)               += tegra_usb_pad_ctrl.o
similarity index 99%
rename from arch/arm/mach-tegra/tegra_usb_pad_ctrl.c
rename to drivers/platform/tegra/tegra_usb_pad_ctrl.c
index f3d53c2..7999b53 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <mach/tegra_usb_pad_ctrl.h>
 
-#include "iomap.h"
+#include "../../../arch/arm/mach-tegra/iomap.h"
 
 static DEFINE_SPINLOCK(utmip_pad_lock);
 static DEFINE_SPINLOCK(xusb_padctl_lock);
similarity index 99%
rename from arch/arm/mach-tegra/tegra_usb_pmc.c
rename to drivers/platform/tegra/tegra_usb_pmc.c
index 7910afb..5de8107 100644 (file)
@@ -30,7 +30,7 @@
 #include <mach/pinmux-t11.h>
 #include <mach/tegra_usb_pmc.h>
 
-#include "iomap.h"
+#include "../../../arch/arm/mach-tegra/iomap.h"
 
 static void __iomem *pmc_base;
 static unsigned long flags;