All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valeriy Glushkov <gvv@lstec.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] usb: mpc834x: added support of the MPH USB controller in addition to the DR one
Date: Tue, 30 Jun 2009 15:48:40 +0300	[thread overview]
Message-ID: <12463661212355-git-send-email-gvv@lstec.com> (raw)


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

             reply	other threads:[~2009-06-30 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 12:48 Valeriy Glushkov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12463661212355-git-send-email-gvv@lstec.com \
    --to=gvv@lstec.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.