diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-21 15:55:03 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-22 01:06:43 -0400 |
commit | de716e32e61fae5d1f0d000008d3f641cec5c9dd (patch) | |
tree | ca4d94ded63a6a3da3313dd54e16465f60d65659 /drivers/thermal/spear_thermal.c | |
parent | 6a92c36688bd6d8e68e19ca9b5e41e8197921b59 (diff) |
thermal/spear_thermal: replace readl/writel with lighter _relaxed variants
readl/writel versions for ARM contain memory barrier instruction for
synchronizing DMA buffers. These are not required at least on this
module. So use lighter _relaxed variants.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/thermal/spear_thermal.c')
-rw-r--r-- | 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 880bf289aa64..be94413b95a3 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, | |||
46 | * Data are ready to be read after 628 usec from POWERDOWN signal | 46 | * Data are ready to be read after 628 usec from POWERDOWN signal |
47 | * (PDN) = 1 | 47 | * (PDN) = 1 |
48 | */ | 48 | */ |
49 | *temp = (readl(stdev->thermal_base) & 0x7F) * MD_FACTOR; | 49 | *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR; |
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
52 | 52 | ||
@@ -63,8 +63,8 @@ static int spear_thermal_suspend(struct device *dev) | |||
63 | unsigned int actual_mask = 0; | 63 | unsigned int actual_mask = 0; |
64 | 64 | ||
65 | /* Disable SPEAr Thermal Sensor */ | 65 | /* Disable SPEAr Thermal Sensor */ |
66 | actual_mask = readl(stdev->thermal_base); | 66 | actual_mask = readl_relaxed(stdev->thermal_base); |
67 | writel(actual_mask & ~stdev->flags, stdev->thermal_base); | 67 | writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); |
68 | 68 | ||
69 | clk_disable(stdev->clk); | 69 | clk_disable(stdev->clk); |
70 | dev_info(dev, "Suspended.\n"); | 70 | dev_info(dev, "Suspended.\n"); |
@@ -87,8 +87,8 @@ static int spear_thermal_resume(struct device *dev) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | /* Enable SPEAr Thermal Sensor */ | 89 | /* Enable SPEAr Thermal Sensor */ |
90 | actual_mask = readl(stdev->thermal_base); | 90 | actual_mask = readl_relaxed(stdev->thermal_base); |
91 | writel(actual_mask | stdev->flags, stdev->thermal_base); | 91 | writel_relaxed(actual_mask | stdev->flags, stdev->thermal_base); |
92 | 92 | ||
93 | dev_info(dev, "Resumed.\n"); | 93 | dev_info(dev, "Resumed.\n"); |
94 | 94 | ||
@@ -145,7 +145,7 @@ static int spear_thermal_probe(struct platform_device *pdev) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | stdev->flags = pdata->thermal_flags; | 147 | stdev->flags = pdata->thermal_flags; |
148 | writel(stdev->flags, stdev->thermal_base); | 148 | writel_relaxed(stdev->flags, stdev->thermal_base); |
149 | 149 | ||
150 | spear_thermal = thermal_zone_device_register("spear_thermal", 0, | 150 | spear_thermal = thermal_zone_device_register("spear_thermal", 0, |
151 | stdev, &ops, 0, 0, 0, 0); | 151 | stdev, &ops, 0, 0, 0, 0); |
@@ -180,8 +180,8 @@ static int spear_thermal_exit(struct platform_device *pdev) | |||
180 | platform_set_drvdata(pdev, NULL); | 180 | platform_set_drvdata(pdev, NULL); |
181 | 181 | ||
182 | /* Disable SPEAr Thermal Sensor */ | 182 | /* Disable SPEAr Thermal Sensor */ |
183 | actual_mask = readl(stdev->thermal_base); | 183 | actual_mask = readl_relaxed(stdev->thermal_base); |
184 | writel(actual_mask & ~stdev->flags, stdev->thermal_base); | 184 | writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); |
185 | 185 | ||
186 | clk_disable(stdev->clk); | 186 | clk_disable(stdev->clk); |
187 | clk_put(stdev->clk); | 187 | clk_put(stdev->clk); |