diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-10-04 16:57:00 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-04 16:57:51 -0400 |
commit | c37d6154c0b9163c27e53cc1d0be3867b4abd760 (patch) | |
tree | 7a24522c56d1cb284dff1d3c225bbdaba0901bb5 /arch/arm/mach-shmobile/board-marzen.c | |
parent | e7a570ff7dff9af6e54ff5e580a61ec7652137a0 (diff) | |
parent | 8a1ab3155c2ac7fbe5f2038d6e26efeb607a1498 (diff) |
Merge branch 'disintegrate-asm-generic' of git://git.infradead.org/users/dhowells/linux-headers into asm-generic
Patches from David Howells <dhowells@redhat.com>:
This is to complete part of the UAPI disintegration for which the
preparatory patches were pulled recently.
Note that there are some fixup patches which are at the base of the
branch aimed at you, plus all arches get the asm-generic branch merged in too.
* 'disintegrate-asm-generic' of git://git.infradead.org/users/dhowells/linux-headers:
UAPI: (Scripted) Disintegrate include/asm-generic
UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
c6x: remove c6x signal.h
UAPI: Split compound conditionals containing __KERNEL__ in Arm64
UAPI: Fix the guards on various asm/unistd.h files
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-shmobile/board-marzen.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index fcf5a47f4772..b8a7525a4e2f 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/regulator/fixed.h> | 30 | #include <linux/regulator/fixed.h> |
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/smsc911x.h> | 32 | #include <linux/smsc911x.h> |
33 | #include <linux/mmc/sh_mobile_sdhi.h> | ||
34 | #include <linux/mfd/tmio.h> | ||
33 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
34 | #include <mach/r8a7779.h> | 36 | #include <mach/r8a7779.h> |
35 | #include <mach/common.h> | 37 | #include <mach/common.h> |
@@ -39,6 +41,12 @@ | |||
39 | #include <asm/hardware/gic.h> | 41 | #include <asm/hardware/gic.h> |
40 | #include <asm/traps.h> | 42 | #include <asm/traps.h> |
41 | 43 | ||
44 | /* Fixed 3.3V regulator to be used by SDHI0 */ | ||
45 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { | ||
46 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), | ||
47 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), | ||
48 | }; | ||
49 | |||
42 | /* Dummy supplies, where voltage doesn't matter */ | 50 | /* Dummy supplies, where voltage doesn't matter */ |
43 | static struct regulator_consumer_supply dummy_supplies[] = { | 51 | static struct regulator_consumer_supply dummy_supplies[] = { |
44 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | 52 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
@@ -75,13 +83,61 @@ static struct platform_device eth_device = { | |||
75 | .num_resources = ARRAY_SIZE(smsc911x_resources), | 83 | .num_resources = ARRAY_SIZE(smsc911x_resources), |
76 | }; | 84 | }; |
77 | 85 | ||
86 | static struct resource sdhi0_resources[] = { | ||
87 | [0] = { | ||
88 | .name = "sdhi0", | ||
89 | .start = 0xffe4c000, | ||
90 | .end = 0xffe4c0ff, | ||
91 | .flags = IORESOURCE_MEM, | ||
92 | }, | ||
93 | [1] = { | ||
94 | .start = gic_spi(104), | ||
95 | .flags = IORESOURCE_IRQ, | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct sh_mobile_sdhi_info sdhi0_platform_data = { | ||
100 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, | ||
101 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | ||
102 | }; | ||
103 | |||
104 | static struct platform_device sdhi0_device = { | ||
105 | .name = "sh_mobile_sdhi", | ||
106 | .num_resources = ARRAY_SIZE(sdhi0_resources), | ||
107 | .resource = sdhi0_resources, | ||
108 | .id = 0, | ||
109 | .dev = { | ||
110 | .platform_data = &sdhi0_platform_data, | ||
111 | } | ||
112 | }; | ||
113 | |||
114 | /* Thermal */ | ||
115 | static struct resource thermal_resources[] = { | ||
116 | [0] = { | ||
117 | .start = 0xFFC48000, | ||
118 | .end = 0xFFC48038 - 1, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, | ||
121 | }; | ||
122 | |||
123 | static struct platform_device thermal_device = { | ||
124 | .name = "rcar_thermal", | ||
125 | .resource = thermal_resources, | ||
126 | .num_resources = ARRAY_SIZE(thermal_resources), | ||
127 | }; | ||
128 | |||
78 | static struct platform_device *marzen_devices[] __initdata = { | 129 | static struct platform_device *marzen_devices[] __initdata = { |
79 | ð_device, | 130 | ð_device, |
131 | &sdhi0_device, | ||
132 | &thermal_device, | ||
80 | }; | 133 | }; |
81 | 134 | ||
82 | static void __init marzen_init(void) | 135 | static void __init marzen_init(void) |
83 | { | 136 | { |
84 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 137 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, |
138 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
139 | regulator_register_fixed(1, dummy_supplies, | ||
140 | ARRAY_SIZE(dummy_supplies)); | ||
85 | 141 | ||
86 | r8a7779_pinmux_init(); | 142 | r8a7779_pinmux_init(); |
87 | 143 | ||
@@ -97,11 +153,22 @@ static void __init marzen_init(void) | |||
97 | gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */ | 153 | gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */ |
98 | gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */ | 154 | gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */ |
99 | 155 | ||
156 | /* SD0 (CN20) */ | ||
157 | gpio_request(GPIO_FN_SD0_CLK, NULL); | ||
158 | gpio_request(GPIO_FN_SD0_CMD, NULL); | ||
159 | gpio_request(GPIO_FN_SD0_DAT0, NULL); | ||
160 | gpio_request(GPIO_FN_SD0_DAT1, NULL); | ||
161 | gpio_request(GPIO_FN_SD0_DAT2, NULL); | ||
162 | gpio_request(GPIO_FN_SD0_DAT3, NULL); | ||
163 | gpio_request(GPIO_FN_SD0_CD, NULL); | ||
164 | gpio_request(GPIO_FN_SD0_WP, NULL); | ||
165 | |||
100 | r8a7779_add_standard_devices(); | 166 | r8a7779_add_standard_devices(); |
101 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 167 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
102 | } | 168 | } |
103 | 169 | ||
104 | MACHINE_START(MARZEN, "marzen") | 170 | MACHINE_START(MARZEN, "marzen") |
171 | .smp = smp_ops(r8a7779_smp_ops), | ||
105 | .map_io = r8a7779_map_io, | 172 | .map_io = r8a7779_map_io, |
106 | .init_early = r8a7779_add_early_devices, | 173 | .init_early = r8a7779_add_early_devices, |
107 | .nr_irqs = NR_IRQS_LEGACY, | 174 | .nr_irqs = NR_IRQS_LEGACY, |