All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one
@ 2009-06-30 12:48 Valeriy Glushkov
  2009-06-30 12:48 ` [U-Boot] [PATCH 2/2] usb: mpx8349itx: added support of loading images from USB storage (MPH/DR) Valeriy Glushkov
  2009-07-14 22:13 ` [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Kim Phillips
  0 siblings, 2 replies; 3+ messages in thread
From: Valeriy Glushkov @ 2009-06-30 12:48 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
---
 cpu/mpc83xx/cpu_init.c       |    2 ++
 include/asm-ppc/immap_83xx.h |   11 ++++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc83xx/cpu_init.c b/cpu/mpc83xx/cpu_init.c
index 414565c..2fb9f99 100644
--- a/cpu/mpc83xx/cpu_init.c
+++ b/cpu/mpc83xx/cpu_init.c
@@ -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;
 
@@ -310,6 +311,7 @@ void cpu_init_f (volatile immap_t * im)
 		temp = in_be32((void *)ehci->control);
 		udelay(1000);
 	} while (!(temp & PHY_CLK_VALID));
+#endif	
 #endif
 }
 
diff --git a/include/asm-ppc/immap_83xx.h b/include/asm-ppc/immap_83xx.h
index 8f945a1..fa0dee8 100644
--- a/include/asm-ppc/immap_83xx.h
+++ b/include/asm-ppc/immap_83xx.h
@@ -693,6 +693,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 */
@@ -897,7 +903,10 @@ typedef struct immap {
 
 #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__ */
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 2/2] usb: mpx8349itx: added support of loading images from USB storage (MPH/DR)
  2009-06-30 12:48 [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Valeriy Glushkov
@ 2009-06-30 12:48 ` Valeriy Glushkov
  2009-07-14 22:13 ` [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Kim Phillips
  1 sibling, 0 replies; 3+ messages in thread
From: Valeriy Glushkov @ 2009-06-30 12:48 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
---
 include/configs/MPC8349ITX.h |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index f2e574b..0ff09a0 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -79,6 +79,7 @@
 #define CONFIG_COMPACT_FLASH	/* The CF card interface on the back of the board */
 #define CONFIG_VSC7385_ENET	/* VSC7385 ethernet support */
 #define CONFIG_SATA_SIL3114	/* SIL3114 SATA controller */
+#define CONFIG_SYS_USB_HOST	/* use the EHCI USB controller */
 #endif
 
 #define CONFIG_PCI
@@ -155,6 +156,25 @@
 
 #endif
 
+#ifdef CONFIG_SYS_USB_HOST
+/*
+ * Support USB
+ */
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_FSL
+
+/* Current USB implementation supports the only USB controller,
+ * so we have to choose between the MPH or the DR ones */
+#if 1
+#define CONFIG_HAS_FSL_MPH_USB
+#else
+#define CONFIG_HAS_FSL_DR_USB
+#endif
+
+#endif
+
 /*
  * DDR Setup
  */
@@ -463,9 +483,11 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_SDRAM
 
-#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114)
+#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) \
+    || defined(CONFIG_USB_STORAGE)
     #define CONFIG_DOS_PARTITION
     #define CONFIG_CMD_FAT
+    #define CONFIG_SUPPORT_VFAT
 #endif
 
 #ifdef CONFIG_COMPACT_FLASH
@@ -474,6 +496,9 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #ifdef CONFIG_SATA_SIL3114
     #define CONFIG_CMD_SATA
+#endif
+
+#if defined(CONFIG_SATA_SIL3114) || defined(CONFIG_USB_STORAGE)
     #define CONFIG_CMD_EXT2
 #endif
 
@@ -567,12 +592,14 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_SPCR_TSEC2EP	3	/* TSEC2 emergency priority (0-3) */
 #define CONFIG_SYS_SCCR_TSEC1CM	1	/* TSEC1 clock mode (0-3) */
 #define CONFIG_SYS_SCCR_TSEC2CM	1	/* TSEC2 & I2C0 clock mode (0-3) */
+#define CONFIG_SYS_SCCR_USBMPHCM 3	/* USB MPH controller's clock */
+#define CONFIG_SYS_SCCR_USBDRCM	0	/* USB DR controller's clock */
 
 /*
  * System IO Config
  */
 #define CONFIG_SYS_SICRH SICRH_TSOBI1	/* Needed for gigabit to work on TSEC 1 */
-#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1)
+#define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1)	/* USB DR as device + USB MPH as host */
 
 #define CONFIG_SYS_HID0_INIT	0x000000000
 #define CONFIG_SYS_HID0_FINAL	CONFIG_SYS_HID0_INIT
-- 
1.5.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one
  2009-06-30 12:48 [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Valeriy Glushkov
  2009-06-30 12:48 ` [U-Boot] [PATCH 2/2] usb: mpx8349itx: added support of loading images from USB storage (MPH/DR) Valeriy Glushkov
@ 2009-07-14 22:13 ` Kim Phillips
  1 sibling, 0 replies; 3+ messages in thread
From: Kim Phillips @ 2009-07-14 22:13 UTC (permalink / raw)
  To: u-boot

On Tue, 30 Jun 2009 15:48:40 +0300
Valeriy Glushkov <gvv@lstec.com> wrote:

> 
> Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
> ---
applied 1-2/2.

Thanks,

Kim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-14 22:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 12:48 [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Valeriy Glushkov
2009-06-30 12:48 ` [U-Boot] [PATCH 2/2] usb: mpx8349itx: added support of loading images from USB storage (MPH/DR) Valeriy Glushkov
2009-07-14 22:13 ` [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one Kim Phillips

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.