From 5e18150a7b4139e15e1ed7d7c938dd91f7f12354 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Tue, 15 Jan 2013 15:49:30 +0530 Subject: usb: phy: remove unused APIs from Tegra PHY. As tegra_usb_phy_clk_disable/enable() are not being used, removing them. Signed-off-by: Venu Byravarasu Signed-off-by: Stephen Warren --- include/linux/usb/tegra_usb_phy.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index 176b1ca06ae4..34e6355a15e3 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h @@ -64,10 +64,6 @@ struct tegra_usb_phy { struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); -void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy); - -void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy); - void tegra_usb_phy_preresume(struct tegra_usb_phy *phy); void tegra_usb_phy_postresume(struct tegra_usb_phy *phy); -- cgit v1.2.3 From 3a55c6a8b96f055783a1b9d5497f66b56a9ea0d7 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Wed, 16 Jan 2013 03:30:20 +0000 Subject: USB: PHY: tegra: get rid of instance number to differentiate legacy controller Tegra20 USB has 3 PHY instances. Instance 0 is based on legacy PHY interface and other two are standard interfaces. As instance number was used to differentiate legacy from standard interfaces, used DT param to get this info and processed accordingly. Signed-off-by: Venu Byravarasu Acked-by: Felipe Balbi Signed-off-by: Stephen Warren --- include/linux/usb/tegra_usb_phy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index 34e6355a15e3..f03e157abaa8 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h @@ -59,6 +59,7 @@ struct tegra_usb_phy { struct usb_phy *ulpi; struct usb_phy u_phy; struct device *dev; + bool is_legacy_phy; }; struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, -- cgit v1.2.3 From 3f9db1a19a8a17f6000973194c6a1d63c5cebf21 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Wed, 16 Jan 2013 03:30:21 +0000 Subject: USB: PHY: tegra: Get rid of instance number to differentiate PHY type Tegra20 USB has 3 PHY instances: Instance 1 and 3 are UTMI. Instance 2 is ULPI. As instance number was used to differentiate ULPI from UTMI, used DT param to get this info and processed accordingly. Signed-off-by: Venu Byravarasu Acked-by: Felipe Balbi [swarren: moved assignment of phy->is_ulpi_phy into this patch out of next patch.] Signed-off-by: Stephen Warren --- include/linux/usb/tegra_usb_phy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index f03e157abaa8..a6a89d4866f4 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h @@ -60,6 +60,7 @@ struct tegra_usb_phy { struct usb_phy u_phy; struct device *dev; bool is_legacy_phy; + bool is_ulpi_phy; }; struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, -- cgit v1.2.3 From bbdabdb62d86090511410728644a19291bf300cf Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Thu, 17 Jan 2013 20:15:37 +0000 Subject: usb: add APIs to access host registers from Tegra PHY As Tegra PHY driver needs to access one of the host registers, added few APIs. Signed-off-by: Venu Byravarasu Acked-by: Alan Stern [swarren: moved assignment of phy->is_ulpi_phy to previous patch.] Signed-off-by: Stephen Warren --- include/linux/usb/tegra_usb_phy.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index a6a89d4866f4..9259d4659582 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h @@ -75,4 +75,8 @@ void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy); +void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val); + +void tegra_ehci_set_phcd(struct usb_phy *x, bool enable); + #endif /* __TEGRA_USB_PHY_H */ -- cgit v1.2.3 From ab137d04db5a4b32250ce5ef1b288ce6cf06adf6 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Thu, 24 Jan 2013 15:57:03 +0530 Subject: usb: host: tegra: make use of PHY pointer of HCD As pointer to PHY structure can be stored in struct usb_hcd making use of it, to call Tegra PHY APIs. Call to usb_phy_shutdown() is moved up in tegra_ehci_remove(), so that to avoid dereferencing of hcd after its freed up. Signed-off-by: Venu Byravarasu Acked-by: Alan Stern Acked-by: Felipe Balbi Acked-by: Greg Kroah-Hartman Signed-off-by: Stephen Warren --- include/linux/usb/tegra_usb_phy.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index 9259d4659582..9ebebe906925 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h @@ -66,14 +66,14 @@ struct tegra_usb_phy { struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); -void tegra_usb_phy_preresume(struct tegra_usb_phy *phy); +void tegra_usb_phy_preresume(struct usb_phy *phy); -void tegra_usb_phy_postresume(struct tegra_usb_phy *phy); +void tegra_usb_phy_postresume(struct usb_phy *phy); -void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, +void tegra_ehci_phy_restore_start(struct usb_phy *phy, enum tegra_usb_phy_port_speed port_speed); -void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy); +void tegra_ehci_phy_restore_end(struct usb_phy *phy); void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val); -- cgit v1.2.3