aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
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/platforms
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/platforms')
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c23
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h4
2 files changed, 27 insertions, 0 deletions
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