aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-07-08 13:36:32 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-07-16 18:57:37 -0400
commitc0a2015965d42f58d3b50c59bd139bc2419bc7f9 (patch)
tree9de2d4fb0c9c470a0ebac317e689ee64159797a6 /arch
parent76fe1ffce94067fc82d1d958f826eb9f1df53910 (diff)
powerpc/83xx: fix ULPI setup for MPC8315 processors
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> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h4
-rw-r--r--arch/powerpc/platforms/83xx/usb.c24
2 files changed, 19 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 393dfecdbf53..2a7cbabb410a 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -26,6 +26,8 @@
26#define MPC834X_SICRL_USB1 0x20000000 26#define MPC834X_SICRL_USB1 0x20000000
27#define MPC831X_SICRL_USB_MASK 0x00000c00 27#define MPC831X_SICRL_USB_MASK 0x00000c00
28#define MPC831X_SICRL_USB_ULPI 0x00000800 28#define MPC831X_SICRL_USB_ULPI 0x00000800
29#define MPC8315_SICRL_USB_MASK 0x000000fc
30#define MPC8315_SICRL_USB_ULPI 0x00000054
29#define MPC837X_SICRL_USB_MASK 0xf0000000 31#define MPC837X_SICRL_USB_MASK 0xf0000000
30#define MPC837X_SICRL_USB_ULPI 0x50000000 32#define MPC837X_SICRL_USB_ULPI 0x50000000
31 33
@@ -34,6 +36,8 @@
34#define MPC834X_SICRH_USB_UTMI 0x00020000 36#define MPC834X_SICRH_USB_UTMI 0x00020000
35#define MPC831X_SICRH_USB_MASK 0x000000e0 37#define MPC831X_SICRH_USB_MASK 0x000000e0
36#define MPC831X_SICRH_USB_ULPI 0x000000a0 38#define MPC831X_SICRH_USB_ULPI 0x000000a0
39#define MPC8315_SICRH_USB_MASK 0x0000ff00
40#define MPC8315_SICRH_USB_ULPI 0x00000000
37 41
38/* USB Control Register */ 42/* USB Control Register */
39#define FSL_USB2_CONTROL_OFFS 0x500 43#define FSL_USB2_CONTROL_OFFS 0x500
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 64bcf0a33c71..cc99c280aad9 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -137,15 +137,21 @@ int mpc831x_usb_cfg(void)
137 137
138 /* Configure pin mux for ULPI. There is no pin mux for UTMI */ 138 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
139 if (prop && !strcmp(prop, "ulpi")) { 139 if (prop && !strcmp(prop, "ulpi")) {
140 temp = in_be32(immap + MPC83XX_SICRL_OFFS); 140 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) {
141 temp &= ~MPC831X_SICRL_USB_MASK; 141 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
142 temp |= MPC831X_SICRL_USB_ULPI; 142 MPC8315_SICRL_USB_MASK,
143 out_be32(immap + MPC83XX_SICRL_OFFS, temp); 143 MPC8315_SICRL_USB_ULPI);
144 144 clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
145 temp = in_be32(immap + MPC83XX_SICRH_OFFS); 145 MPC8315_SICRH_USB_MASK,
146 temp &= ~MPC831X_SICRH_USB_MASK; 146 MPC8315_SICRH_USB_ULPI);
147 temp |= MPC831X_SICRH_USB_ULPI; 147 } else {
148 out_be32(immap + MPC83XX_SICRH_OFFS, temp); 148 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
149 MPC831X_SICRL_USB_MASK,
150 MPC831X_SICRL_USB_ULPI);
151 clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
152 MPC831X_SICRH_USB_MASK,
153 MPC831X_SICRH_USB_ULPI);
154 }
149 } 155 }
150 156
151 iounmap(immap); 157 iounmap(immap);