]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/83xx/usb.c
[POWERPC] 83xx: mpc8315 - fix USB UTMI Host setup
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 83xx / usb.c
index 471fdd8f41084b629bc962534bc58dce2fadee93..64bcf0a33c71903fa3978de2c28d9b4df8c4bbba 100644 (file)
@@ -129,7 +129,7 @@ int mpc831x_usb_cfg(void)
        if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
                clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
                                MPC8315_SCCR_USB_MASK,
-                               MPC8315_SCCR_USB_DRCM_11);
+                               MPC8315_SCCR_USB_DRCM_01);
        else
                clrsetbits_be32(immap + MPC83XX_SCCR_OFFS,
                                MPC83XX_SCCR_USB_MASK,
@@ -164,9 +164,15 @@ int mpc831x_usb_cfg(void)
        /* Using on-chip PHY */
        if (prop && (!strcmp(prop, "utmi_wide") ||
                     !strcmp(prop, "utmi"))) {
-               /* Set UTMI_PHY_EN, REFSEL to 48MHZ */
+               u32 refsel;
+
+               if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
+                       refsel = CONTROL_REFSEL_24MHZ;
+               else
+                       refsel = CONTROL_REFSEL_48MHZ;
+               /* Set UTMI_PHY_EN and REFSEL */
                out_be32(usb_regs + FSL_USB2_CONTROL_OFFS,
-                               CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ);
+                               CONTROL_UTMI_PHY_EN | refsel);
        /* Using external UPLI PHY */
        } else if (prop && !strcmp(prop, "ulpi")) {
                /* Set PHY_CLK_SEL to ULPI */