]> git.sur5r.net Git - u-boot/commitdiff
usb: mpc834x: added support of the MPH USB controller in addition to the DR one
authorValeriy Glushkov <gvv@lstec.com>
Tue, 30 Jun 2009 12:48:40 +0000 (15:48 +0300)
committerKim Phillips <kim.phillips@freescale.com>
Tue, 14 Jul 2009 19:53:52 +0000 (14:53 -0500)
Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/cpu_init.c
include/asm-ppc/immap_83xx.h

index 03b6c86349cc795299dbeb174e9e97e53943ab4e..5c930d38880f431b29c80ab2ad69b8ab49a2d1c0 100644 (file)
@@ -299,6 +299,7 @@ void cpu_init_f (volatile immap_t * im)
        im->gpio[1].dir = CONFIG_SYS_GPIO2_DIR;
 #endif
 #ifdef CONFIG_USB_EHCI_FSL
+#ifndef CONFIG_MPC834x
        uint32_t temp;
        struct usb_ehci *ehci = (struct usb_ehci *)CONFIG_SYS_MPC8xxx_USB_ADDR;
 
@@ -311,6 +312,7 @@ void cpu_init_f (volatile immap_t * im)
                udelay(1000);
        } while (!(temp & PHY_CLK_VALID));
 #endif
+#endif
 }
 
 int cpu_init_r (void)
index 7c6a15185e1ef86bba0d7ea0508c6611d194cda6..c60a7d21c3244da5849a8f6dd53805a4e6e8c42a 100644 (file)
@@ -650,6 +650,12 @@ typedef struct immap {
        u8                      res7[0xC0000];
 } immap_t;
 
+#ifdef CONFIG_HAS_FSL_MPH_USB
+#define CONFIG_SYS_MPC83xx_USB_OFFSET  0x22000 /* use the MPH controller */
+#else
+#define CONFIG_SYS_MPC83xx_USB_OFFSET  0x23000 /* use the DR controller */
+#endif
+
 #elif defined(CONFIG_MPC8313)
 typedef struct immap {
        sysconf83xx_t           sysconf;        /* System configuration */
@@ -856,7 +862,10 @@ typedef struct immap {
 #define CONFIG_SYS_MPC83xx_DMA_ADDR    (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_DMA_OFFSET)
 #define CONFIG_SYS_MPC83xx_ESDHC_OFFSET        (0x2e000)
 #define CONFIG_SYS_MPC83xx_ESDHC_ADDR  (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_ESDHC_OFFSET)
-#define CONFIG_SYS_MPC83xx_USB_OFFSET  0x23000
+
+#ifndef CONFIG_SYS_MPC83xx_USB_OFFSET
+#define CONFIG_SYS_MPC83xx_USB_OFFSET  0x23000
+#endif
 #define CONFIG_SYS_MPC83xx_USB_ADDR \
                        (CONFIG_SYS_IMMR + CONFIG_SYS_MPC83xx_USB_OFFSET)
 #endif                         /* __IMMAP_83xx__ */