diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-03-26 02:18:15 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-04-01 21:58:25 -0400 |
commit | c91cf2fad00f24bfe268d30b75e4015aaa326c04 (patch) | |
tree | d6280345b468c4e0dc314989c693a4844e415263 /arch/arm/mach-shmobile/setup-r8a73a4.c | |
parent | 6722f6cb763203cab775297b6e9d00834af0d6d7 (diff) |
ARM: shmobile: r8a73a4: add thermal driver support
You can get current thermal by
> cat /sys/class/thermal/thermal_zone?/temp
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a73a4.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a73a4.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index c2d86f30cde4..c5a75a7a508f 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -155,6 +155,20 @@ static const struct resource irqc1_resources[] = { | |||
155 | &irqc##idx##_data, \ | 155 | &irqc##idx##_data, \ |
156 | sizeof(struct renesas_irqc_config)) | 156 | sizeof(struct renesas_irqc_config)) |
157 | 157 | ||
158 | /* Thermal0 -> Thermal2 */ | ||
159 | static const struct resource thermal0_resources[] = { | ||
160 | DEFINE_RES_MEM(0xe61f0000, 0x14), | ||
161 | DEFINE_RES_MEM(0xe61f0100, 0x38), | ||
162 | DEFINE_RES_MEM(0xe61f0200, 0x38), | ||
163 | DEFINE_RES_MEM(0xe61f0300, 0x38), | ||
164 | DEFINE_RES_IRQ(gic_spi(69)), | ||
165 | }; | ||
166 | |||
167 | #define r8a73a4_register_thermal() \ | ||
168 | platform_device_register_simple("rcar_thermal", -1, \ | ||
169 | thermal0_resources, \ | ||
170 | ARRAY_SIZE(thermal0_resources)) | ||
171 | |||
158 | void __init r8a73a4_add_standard_devices(void) | 172 | void __init r8a73a4_add_standard_devices(void) |
159 | { | 173 | { |
160 | r8a73a4_register_scif(SCIFA0); | 174 | r8a73a4_register_scif(SCIFA0); |
@@ -165,6 +179,7 @@ void __init r8a73a4_add_standard_devices(void) | |||
165 | r8a73a4_register_scif(SCIFB3); | 179 | r8a73a4_register_scif(SCIFB3); |
166 | r8a73a4_register_irqc(0); | 180 | r8a73a4_register_irqc(0); |
167 | r8a73a4_register_irqc(1); | 181 | r8a73a4_register_irqc(1); |
182 | r8a73a4_register_thermal(); | ||
168 | } | 183 | } |
169 | 184 | ||
170 | #ifdef CONFIG_USE_OF | 185 | #ifdef CONFIG_USE_OF |