* [PATCH 1/2] thermal/spear_thermal: Replace readl/writel with lighter _relaxed variants
@ 2012-02-27 4:11 Viresh Kumar
2012-02-27 4:11 ` [PATCH 2/2] thermal/spear_thermal: Add compilation dependency on PLAT_SPEAR Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Viresh Kumar @ 2012-02-27 4:11 UTC (permalink / raw)
To: akpm, rui.zhang
Cc: armando.visconti, shiraz.hashim, vipin.kumar, rajeev-dlh.kumar,
deepak.sikri, vipulkumar.samar, amit.virdi, viresh.kumar,
pratyush.anand, bhupesh.sharma, viresh.linux, bhavna.yadav,
vincenzo.frascino, mirko.gardi, salvatore.dedominicis,
linux-kernel, len.brown
readl/writel versions for ARM contain memory barrier instruction for
synchronizing DMA buffers. These are not required atleast on this module. So use
lighter _relaxed variants.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
Hi Andrew,
These patches are rebased over all three patches you have applied on your tree.
drivers/thermal/spear_thermal.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c
index 880bf28..be94413 100644
--- a/drivers/thermal/spear_thermal.c
+++ b/drivers/thermal/spear_thermal.c
@@ -46,7 +46,7 @@ static inline int thermal_get_temp(struct thermal_zone_device *thermal,
* Data are ready to be read after 628 usec from POWERDOWN signal
* (PDN) = 1
*/
- *temp = (readl(stdev->thermal_base) & 0x7F) * MD_FACTOR;
+ *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR;
return 0;
}
@@ -63,8 +63,8 @@ static int spear_thermal_suspend(struct device *dev)
unsigned int actual_mask = 0;
/* Disable SPEAr Thermal Sensor */
- actual_mask = readl(stdev->thermal_base);
- writel(actual_mask & ~stdev->flags, stdev->thermal_base);
+ actual_mask = readl_relaxed(stdev->thermal_base);
+ writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base);
clk_disable(stdev->clk);
dev_info(dev, "Suspended.\n");
@@ -87,8 +87,8 @@ static int spear_thermal_resume(struct device *dev)
}
/* Enable SPEAr Thermal Sensor */
- actual_mask = readl(stdev->thermal_base);
- writel(actual_mask | stdev->flags, stdev->thermal_base);
+ actual_mask = readl_relaxed(stdev->thermal_base);
+ writel_relaxed(actual_mask | stdev->flags, stdev->thermal_base);
dev_info(dev, "Resumed.\n");
@@ -145,7 +145,7 @@ static int spear_thermal_probe(struct platform_device *pdev)
}
stdev->flags = pdata->thermal_flags;
- writel(stdev->flags, stdev->thermal_base);
+ writel_relaxed(stdev->flags, stdev->thermal_base);
spear_thermal = thermal_zone_device_register("spear_thermal", 0,
stdev, &ops, 0, 0, 0, 0);
@@ -180,8 +180,8 @@ static int spear_thermal_exit(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
/* Disable SPEAr Thermal Sensor */
- actual_mask = readl(stdev->thermal_base);
- writel(actual_mask & ~stdev->flags, stdev->thermal_base);
+ actual_mask = readl_relaxed(stdev->thermal_base);
+ writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base);
clk_disable(stdev->clk);
clk_put(stdev->clk);
--
1.7.8.110.g4cb5d
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] thermal/spear_thermal: Add compilation dependency on PLAT_SPEAR
2012-02-27 4:11 [PATCH 1/2] thermal/spear_thermal: Replace readl/writel with lighter _relaxed variants Viresh Kumar
@ 2012-02-27 4:11 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2012-02-27 4:11 UTC (permalink / raw)
To: akpm, rui.zhang
Cc: armando.visconti, shiraz.hashim, vipin.kumar, rajeev-dlh.kumar,
deepak.sikri, vipulkumar.samar, amit.virdi, viresh.kumar,
pratyush.anand, bhupesh.sharma, viresh.linux, bhavna.yadav,
vincenzo.frascino, mirko.gardi, salvatore.dedominicis,
linux-kernel, len.brown
spear_thermal is a proprietary module used for SPEAr machines only. Add compile
dependency in Kconfig for PLAT_SPEAR.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
drivers/thermal/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 2633fe0..514a691 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -22,6 +22,7 @@ config THERMAL_HWMON
config SPEAR_THERMAL
bool "SPEAr thermal sensor driver"
depends on THERMAL
+ depends on PLAT_SPEAR
help
Enable this to plug the SPEAr thermal sensor driver into the Linux
thermal framework
--
1.7.8.110.g4cb5d
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-27 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 4:11 [PATCH 1/2] thermal/spear_thermal: Replace readl/writel with lighter _relaxed variants Viresh Kumar
2012-02-27 4:11 ` [PATCH 2/2] thermal/spear_thermal: Add compilation dependency on PLAT_SPEAR Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).