aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-07-24 17:42:30 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:27:51 -0400
commit89f3729642cf33bfbc742b85e134936b562f9731 (patch)
tree482190f135101d766b40f846a0299972262d28ff /arch/powerpc
parentc69328d4b93e6885c897155fbacac69a12c5faef (diff)
powerpc/83xx: Add eSDHC support for MPC837xE-RDB/WLAN boards
Actually, the support is already there, but it requires newer U-Boots (to fill-in clock-frequency, and setup pin multiplexing). Though, it appears that on RDB boards USBB pins aren't multiplexed between USB and eSDHC (unlike MDS boards, where USB and eSDHC share pctl and pwrfault pins). So, for RDB boards we can safely setup pinmux and manually fill-in clock-frequency, thus making eSDHC work even with older u-boots. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts2
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c23
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h4
5 files changed, 30 insertions, 3 deletions
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 4f06dbc0d27e..28e022ac4179 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -174,7 +174,7 @@
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
176 /* Filled in by U-Boot */ 176 /* Filled in by U-Boot */
177 clock-frequency = <0>; 177 clock-frequency = <111111111>;
178 }; 178 };
179 }; 179 };
180 180
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index aabf3437cadf..a11ead8214b4 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -174,7 +174,7 @@
174 interrupts = <42 0x8>; 174 interrupts = <42 0x8>;
175 interrupt-parent = <&ipic>; 175 interrupt-parent = <&ipic>;
176 /* Filled in by U-Boot */ 176 /* Filled in by U-Boot */
177 clock-frequency = <0>; 177 clock-frequency = <111111111>;
178 }; 178 };
179 }; 179 };
180 180
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index 9b1da864d890..e35dfba587c8 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -172,7 +172,7 @@
172 interrupts = <42 0x8>; 172 interrupts = <42 0x8>;
173 interrupt-parent = <&ipic>; 173 interrupt-parent = <&ipic>;
174 /* Filled in by U-Boot */ 174 /* Filled in by U-Boot */
175 clock-frequency = <0>; 175 clock-frequency = <111111111>;
176 }; 176 };
177 }; 177 };
178 178
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 91d19ab3a794..a1908d261240 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -17,10 +17,32 @@
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ipic.h> 18#include <asm/ipic.h>
19#include <asm/udbg.h> 19#include <asm/udbg.h>
20#include <sysdev/fsl_soc.h>
20#include <sysdev/fsl_pci.h> 21#include <sysdev/fsl_pci.h>
21 22
22#include "mpc83xx.h" 23#include "mpc83xx.h"
23 24
25static void mpc837x_rdb_sd_cfg(void)
26{
27 void __iomem *im;
28
29 im = ioremap(get_immrbase(), 0x1000);
30 if (!im) {
31 WARN_ON(1);
32 return;
33 }
34
35 /*
36 * On RDB boards (in contrast to MDS) USBB pins are used for SD only,
37 * so we can safely mux them away from the USB block.
38 */
39 clrsetbits_be32(im + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USBB_MASK,
40 MPC837X_SICRL_SD);
41 clrsetbits_be32(im + MPC83XX_SICRH_OFFS, MPC837X_SICRH_SPI_MASK,
42 MPC837X_SICRH_SD);
43 iounmap(im);
44}
45
24/* ************************************************************************ 46/* ************************************************************************
25 * 47 *
26 * Setup the architecture 48 * Setup the architecture
@@ -42,6 +64,7 @@ static void __init mpc837x_rdb_setup_arch(void)
42 mpc83xx_add_bridge(np); 64 mpc83xx_add_bridge(np);
43#endif 65#endif
44 mpc837x_usb_cfg(); 66 mpc837x_usb_cfg();
67 mpc837x_rdb_sd_cfg();
45} 68}
46 69
47static struct of_device_id mpc837x_ids[] = { 70static struct of_device_id mpc837x_ids[] = {
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index d1dc5b0b4fbf..0fea8811d45b 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -30,6 +30,8 @@
30#define MPC8315_SICRL_USB_ULPI 0x00000054 30#define MPC8315_SICRL_USB_ULPI 0x00000054
31#define MPC837X_SICRL_USB_MASK 0xf0000000 31#define MPC837X_SICRL_USB_MASK 0xf0000000
32#define MPC837X_SICRL_USB_ULPI 0x50000000 32#define MPC837X_SICRL_USB_ULPI 0x50000000
33#define MPC837X_SICRL_USBB_MASK 0x30000000
34#define MPC837X_SICRL_SD 0x20000000
33 35
34/* system i/o configuration register high */ 36/* system i/o configuration register high */
35#define MPC83XX_SICRH_OFFS 0x118 37#define MPC83XX_SICRH_OFFS 0x118
@@ -38,6 +40,8 @@
38#define MPC831X_SICRH_USB_ULPI 0x000000a0 40#define MPC831X_SICRH_USB_ULPI 0x000000a0
39#define MPC8315_SICRH_USB_MASK 0x0000ff00 41#define MPC8315_SICRH_USB_MASK 0x0000ff00
40#define MPC8315_SICRH_USB_ULPI 0x00000000 42#define MPC8315_SICRH_USB_ULPI 0x00000000
43#define MPC837X_SICRH_SPI_MASK 0x00000003
44#define MPC837X_SICRH_SD 0x00000001
41 45
42/* USB Control Register */ 46/* USB Control Register */
43#define FSL_USB2_CONTROL_OFFS 0x500 47#define FSL_USB2_CONTROL_OFFS 0x500