aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-04-17 01:17:56 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-06-07 01:26:32 -0400
commitca7bb309485e4ec89a9addd47beaa1d079841b7d (patch)
treedae3f259ea02653d66e8df391478adf0bf4eed4e /arch
parent6e267030252ab5309e074c3a19c92ceb7a01fc8b (diff)
ARM: shmobile: bockw: add SDHI0 support
This patch is directly accessing to PUPR4 register which can control SDHI0 CD/WP pin pull-up setting. It should be replaced in the future. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 4d6571590135..2b6103e55c34 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -18,6 +18,8 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20 20
21#include <linux/mfd/tmio.h>
22#include <linux/mmc/host.h>
21#include <linux/pinctrl/machine.h> 23#include <linux/pinctrl/machine.h>
22#include <linux/platform_device.h> 24#include <linux/platform_device.h>
23#include <linux/regulator/fixed.h> 25#include <linux/regulator/fixed.h>
@@ -54,16 +56,28 @@ static struct resource smsc911x_resources[] = {
54 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ 56 DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */
55}; 57};
56 58
59/* SDHI */
60static struct sh_mobile_sdhi_info sdhi0_info = {
61 .tmio_caps = MMC_CAP_SD_HIGHSPEED,
62 .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34,
63 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
64};
65
57static const struct pinctrl_map bockw_pinctrl_map[] = { 66static const struct pinctrl_map bockw_pinctrl_map[] = {
58 /* SCIF0 */ 67 /* SCIF0 */
59 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", 68 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
60 "scif0_data_a", "scif0"), 69 "scif0_data_a", "scif0"),
61 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", 70 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
62 "scif0_ctrl", "scif0"), 71 "scif0_ctrl", "scif0"),
72 /* SDHI0 */
73 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
74 "sdhi0", "sdhi0"),
63}; 75};
64 76
65#define FPGA 0x18200000 77#define FPGA 0x18200000
66#define IRQ0MR 0x30 78#define IRQ0MR 0x30
79#define PFC 0xfffc0000
80#define PUPR4 0x110
67static void __init bockw_init(void) 81static void __init bockw_init(void)
68{ 82{
69 void __iomem *base; 83 void __iomem *base;
@@ -76,6 +90,7 @@ static void __init bockw_init(void)
76 ARRAY_SIZE(bockw_pinctrl_map)); 90 ARRAY_SIZE(bockw_pinctrl_map));
77 r8a7778_pinmux_init(); 91 r8a7778_pinmux_init();
78 92
93 /* for SMSC */
79 base = ioremap_nocache(FPGA, SZ_1M); 94 base = ioremap_nocache(FPGA, SZ_1M);
80 if (base) { 95 if (base) {
81 /* 96 /*
@@ -98,6 +113,20 @@ static void __init bockw_init(void)
98 smsc911x_resources, ARRAY_SIZE(smsc911x_resources), 113 smsc911x_resources, ARRAY_SIZE(smsc911x_resources),
99 &smsc911x_data, sizeof(smsc911x_data)); 114 &smsc911x_data, sizeof(smsc911x_data));
100 } 115 }
116
117 /* for SDHI */
118 base = ioremap_nocache(PFC, 0x200);
119 if (base) {
120 /*
121 * FIXME
122 *
123 * SDHI CD/WP pin needs pull-up
124 */
125 iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4);
126 iounmap(base);
127
128 r8a7778_sdhi_init(0, &sdhi0_info);
129 }
101} 130}
102 131
103static const char *bockw_boards_compat_dt[] __initdata = { 132static const char *bockw_boards_compat_dt[] __initdata = {