* [PATCH 1/2] powerpc/83xx: fix ULPI setup for MPC8315 processors
@ 2008-07-08 17:36 Anton Vorontsov
2008-07-15 13:21 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Anton Vorontsov @ 2008-07-08 17:36 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
We must not use MPC831X_SICR[HL]_* definitions for the MPC8315 processors,
because SICR USB bits locations are not compatible with MPC8313.
This patch fixes ULPI workability on MPC8315E-RDB boards.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/platforms/83xx/mpc83xx.h | 4 ++++
arch/powerpc/platforms/83xx/usb.c | 24 +++++++++++++++---------
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 88a3b5c..a8dcb81 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -26,6 +26,8 @@
#define MPC834X_SICRL_USB1 0x20000000
#define MPC831X_SICRL_USB_MASK 0x00000c00
#define MPC831X_SICRL_USB_ULPI 0x00000800
+#define MPC8315_SICRL_USB_MASK 0x000000fc
+#define MPC8315_SICRL_USB_ULPI 0x00000054
#define MPC837X_SICRL_USB_MASK 0xf0000000
#define MPC837X_SICRL_USB_ULPI 0x50000000
@@ -34,6 +36,8 @@
#define MPC834X_SICRH_USB_UTMI 0x00020000
#define MPC831X_SICRH_USB_MASK 0x000000e0
#define MPC831X_SICRH_USB_ULPI 0x000000a0
+#define MPC8315_SICRH_USB_MASK 0x0000ff00
+#define MPC8315_SICRH_USB_ULPI 0x00000000
/* USB Control Register */
#define FSL_USB2_CONTROL_OFFS 0x500
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 64bcf0a..cc99c28 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -137,15 +137,21 @@ int mpc831x_usb_cfg(void)
/* Configure pin mux for ULPI. There is no pin mux for UTMI */
if (prop && !strcmp(prop, "ulpi")) {
- temp = in_be32(immap + MPC83XX_SICRL_OFFS);
- temp &= ~MPC831X_SICRL_USB_MASK;
- temp |= MPC831X_SICRL_USB_ULPI;
- out_be32(immap + MPC83XX_SICRL_OFFS, temp);
-
- temp = in_be32(immap + MPC83XX_SICRH_OFFS);
- temp &= ~MPC831X_SICRH_USB_MASK;
- temp |= MPC831X_SICRH_USB_ULPI;
- out_be32(immap + MPC83XX_SICRH_OFFS, temp);
+ if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) {
+ clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
+ MPC8315_SICRL_USB_MASK,
+ MPC8315_SICRL_USB_ULPI);
+ clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
+ MPC8315_SICRH_USB_MASK,
+ MPC8315_SICRH_USB_ULPI);
+ } else {
+ clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
+ MPC831X_SICRL_USB_MASK,
+ MPC831X_SICRL_USB_ULPI);
+ clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
+ MPC831X_SICRH_USB_MASK,
+ MPC831X_SICRH_USB_ULPI);
+ }
}
iounmap(immap);
--
1.5.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] powerpc/83xx: fix ULPI setup for MPC8315 processors
2008-07-08 17:36 [PATCH 1/2] powerpc/83xx: fix ULPI setup for MPC8315 processors Anton Vorontsov
@ 2008-07-15 13:21 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2008-07-15 13:21 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
On Jul 8, 2008, at 12:36 PM, Anton Vorontsov wrote:
> We must not use MPC831X_SICR[HL]_* definitions for the MPC8315
> processors,
> because SICR USB bits locations are not compatible with MPC8313.
>
> This patch fixes ULPI workability on MPC8315E-RDB boards.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/platforms/83xx/mpc83xx.h | 4 ++++
> arch/powerpc/platforms/83xx/usb.c | 24 +++++++++++++++---------
> 2 files changed, 19 insertions(+), 9 deletions(-)
applied.
- k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-15 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 17:36 [PATCH 1/2] powerpc/83xx: fix ULPI setup for MPC8315 processors Anton Vorontsov
2008-07-15 13:21 ` Kumar Gala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).