aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-cpuimx51sd.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-mx5/board-cpuimx51sd.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-mx5/board-cpuimx51sd.c')
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51sd.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 6c3b445e3951..f38b341ac405 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -167,7 +167,10 @@ static int initialize_otg_port(struct platform_device *pdev)
167 v |= MX51_USB_PLL_DIV_19_2_MHZ; 167 v |= MX51_USB_PLL_DIV_19_2_MHZ;
168 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 168 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
169 iounmap(usb_base); 169 iounmap(usb_base);
170 return 0; 170
171 mdelay(10);
172
173 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
171} 174}
172 175
173static int initialize_usbh1_port(struct platform_device *pdev) 176static int initialize_usbh1_port(struct platform_device *pdev)
@@ -186,13 +189,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
186 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, 189 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
187 usbother_base + MX51_USB_CTRL_1_OFFSET); 190 usbother_base + MX51_USB_CTRL_1_OFFSET);
188 iounmap(usb_base); 191 iounmap(usb_base);
189 return 0; 192
193 mdelay(10);
194
195 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
196 MXC_EHCI_ITC_NO_THRESHOLD);
190} 197}
191 198
192static struct mxc_usbh_platform_data dr_utmi_config = { 199static struct mxc_usbh_platform_data dr_utmi_config = {
193 .init = initialize_otg_port, 200 .init = initialize_otg_port,
194 .portsc = MXC_EHCI_UTMI_16BIT, 201 .portsc = MXC_EHCI_UTMI_16BIT,
195 .flags = MXC_EHCI_INTERNAL_PHY,
196}; 202};
197 203
198static struct fsl_usb2_platform_data usb_pdata = { 204static struct fsl_usb2_platform_data usb_pdata = {
@@ -203,7 +209,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
203static struct mxc_usbh_platform_data usbh1_config = { 209static struct mxc_usbh_platform_data usbh1_config = {
204 .init = initialize_usbh1_port, 210 .init = initialize_usbh1_port,
205 .portsc = MXC_EHCI_MODE_ULPI, 211 .portsc = MXC_EHCI_MODE_ULPI,
206 .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
207}; 212};
208 213
209static int otg_mode_host; 214static int otg_mode_host;