aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-03-12 00:22:14 -0400
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 14:14:31 -0400
commitd2e8919bcfb63b662945d0e5cb9338f0f2229d10 (patch)
treef1b4e176b7c0b73c0b146ea24745ffed0506e16a /drivers/watchdog
parentbfae14b679063d85f10579bbfd532db58b122e29 (diff)
watchdog: sp805: 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: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/sp805_wdt.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 3e4edda261d1..6e751573a2d1 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -113,10 +113,10 @@ static u32 wdt_timeleft(void)
113 rate = clk_get_rate(wdt->clk); 113 rate = clk_get_rate(wdt->clk);
114 114
115 spin_lock(&wdt->lock); 115 spin_lock(&wdt->lock);
116 load = readl(wdt->base + WDTVALUE); 116 load = readl_relaxed(wdt->base + WDTVALUE);
117 117
118 /*If the interrupt is inactive then time left is WDTValue + WDTLoad. */ 118 /*If the interrupt is inactive then time left is WDTValue + WDTLoad. */
119 if (!(readl(wdt->base + WDTRIS) & INT_MASK)) 119 if (!(readl_relaxed(wdt->base + WDTRIS) & INT_MASK))
120 load += wdt->load_val + 1; 120 load += wdt->load_val + 1;
121 spin_unlock(&wdt->lock); 121 spin_unlock(&wdt->lock);
122 122
@@ -128,14 +128,14 @@ static void wdt_enable(void)
128{ 128{
129 spin_lock(&wdt->lock); 129 spin_lock(&wdt->lock);
130 130
131 writel(UNLOCK, wdt->base + WDTLOCK); 131 writel_relaxed(UNLOCK, wdt->base + WDTLOCK);
132 writel(wdt->load_val, wdt->base + WDTLOAD); 132 writel_relaxed(wdt->load_val, wdt->base + WDTLOAD);
133 writel(INT_MASK, wdt->base + WDTINTCLR); 133 writel_relaxed(INT_MASK, wdt->base + WDTINTCLR);
134 writel(INT_ENABLE | RESET_ENABLE, wdt->base + WDTCONTROL); 134 writel_relaxed(INT_ENABLE | RESET_ENABLE, wdt->base + WDTCONTROL);
135 writel(LOCK, wdt->base + WDTLOCK); 135 writel_relaxed(LOCK, wdt->base + WDTLOCK);
136 136
137 /* Flush posted writes. */ 137 /* Flush posted writes. */
138 readl(wdt->base + WDTLOCK); 138 readl_relaxed(wdt->base + WDTLOCK);
139 spin_unlock(&wdt->lock); 139 spin_unlock(&wdt->lock);
140} 140}
141 141
@@ -144,12 +144,12 @@ static void wdt_disable(void)
144{ 144{
145 spin_lock(&wdt->lock); 145 spin_lock(&wdt->lock);
146 146
147 writel(UNLOCK, wdt->base + WDTLOCK); 147 writel_relaxed(UNLOCK, wdt->base + WDTLOCK);
148 writel(0, wdt->base + WDTCONTROL); 148 writel_relaxed(0, wdt->base + WDTCONTROL);
149 writel(LOCK, wdt->base + WDTLOCK); 149 writel_relaxed(LOCK, wdt->base + WDTLOCK);
150 150
151 /* Flush posted writes. */ 151 /* Flush posted writes. */
152 readl(wdt->base + WDTLOCK); 152 readl_relaxed(wdt->base + WDTLOCK);
153 spin_unlock(&wdt->lock); 153 spin_unlock(&wdt->lock);
154} 154}
155 155