aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31lilly.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-01-03 05:30:28 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-02-11 02:40:45 -0500
commit4bd597b633ae630e09d58957bd99870eac35fcb4 (patch)
tree39b829bee667531ac41ea48d7f392ecb9258f956 /arch/arm/mach-mx3/mach-mx31lilly.c
parentcb07625d1f84fb48e6849cb530762ffcc6f8e458 (diff)
ARM i.MX ehci: do ehci init in board specific functions
The mxc-ehci driver calls SoC specific phy initialization right after calling board specific initialization. To offer greater flexibility for boards to setup the phy and to get rid of some unnecessary flags in platform data this patch lets the boards call the SoC specific phy initialization and remove it from the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31lilly.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31lilly.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c
index 1c3f4913d1ea..be79a0d6301e 100644
--- a/arch/arm/mach-mx3/mach-mx31lilly.c
+++ b/arch/arm/mach-mx3/mach-mx31lilly.c
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/delay.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28#include <linux/interrupt.h> 29#include <linux/interrupt.h>
29#include <linux/smsc911x.h> 30#include <linux/smsc911x.h>
@@ -156,7 +157,9 @@ static int usbotg_init(struct platform_device *pdev)
156 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS"); 157 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS");
157 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0); 158 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0);
158 159
159 return 0; 160 mdelay(10);
161
162 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
160} 163}
161 164
162static int usbh1_init(struct platform_device *pdev) 165static int usbh1_init(struct platform_device *pdev)
@@ -183,7 +186,10 @@ static int usbh1_init(struct platform_device *pdev)
183 186
184 mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true); 187 mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true);
185 188
186 return 0; 189 mdelay(10);
190
191 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
192 MXC_EHCI_INTERFACE_SINGLE_UNI);
187} 193}
188 194
189static int usbh2_init(struct platform_device *pdev) 195static int usbh2_init(struct platform_device *pdev)
@@ -220,25 +226,24 @@ static int usbh2_init(struct platform_device *pdev)
220 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS"); 226 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
221 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0); 227 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
222 228
223 return 0; 229 mdelay(10);
230
231 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
224} 232}
225 233
226static struct mxc_usbh_platform_data usbotg_pdata = { 234static struct mxc_usbh_platform_data usbotg_pdata = {
227 .init = usbotg_init, 235 .init = usbotg_init,
228 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 236 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
229 .flags = MXC_EHCI_POWER_PINS_ENABLED,
230}; 237};
231 238
232static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { 239static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
233 .init = usbh1_init, 240 .init = usbh1_init,
234 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, 241 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
235 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
236}; 242};
237 243
238static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 244static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
239 .init = usbh2_init, 245 .init = usbh2_init,
240 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 246 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
241 .flags = MXC_EHCI_POWER_PINS_ENABLED,
242}; 247};
243 248
244static void lilly1131_usb_init(void) 249static void lilly1131_usb_init(void)