Message ID | 1426693992-31163-7-git-send-email-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Le 18/03/2015 16:53, Ben Dooks a écrit : > Fix the use of __raw IO accessor with the readl/writel_relaxed versions > to allow the code to be used on a system running in big endian. > > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> > -- > CC: Daniel Lezcano <daniel.lezcano@linaro.org> > CC: Thomas Gleixner <tglx@linutronix.de> > CC: Linux Kernel <linux-kernel@vger.kernel.org> > CC: Linux ARM Kernel <linux-arm-kernel@lists.infradead.org> > CC: Andrew Victor <linux@maxim.org.za> > CC: Nicolas Ferre <nicolas.ferre@atmel.com> Yes: Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Daniel, do you want to take it? > CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> > --- > drivers/clocksource/timer-atmel-pit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c > index b5b4d45..c0304ff 100644 > --- a/drivers/clocksource/timer-atmel-pit.c > +++ b/drivers/clocksource/timer-atmel-pit.c > @@ -61,12 +61,12 @@ static inline struct pit_data *clkevt_to_pit_data(struct clock_event_device *clk > > static inline unsigned int pit_read(void __iomem *base, unsigned int reg_offset) > { > - return __raw_readl(base + reg_offset); > + return readl_relaxed(base + reg_offset); > } > > static inline void pit_write(void __iomem *base, unsigned int reg_offset, unsigned long value) > { > - __raw_writel(value, base + reg_offset); > + writel_relaxed(value, base + reg_offset); > } > > /* >
On 03/23/2015 12:27 PM, Nicolas Ferre wrote: > Le 18/03/2015 16:53, Ben Dooks a écrit : >> Fix the use of __raw IO accessor with the readl/writel_relaxed versions >> to allow the code to be used on a system running in big endian. >> >> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> >> -- >> CC: Daniel Lezcano <daniel.lezcano@linaro.org> >> CC: Thomas Gleixner <tglx@linutronix.de> >> CC: Linux Kernel <linux-kernel@vger.kernel.org> >> CC: Linux ARM Kernel <linux-arm-kernel@lists.infradead.org> >> CC: Andrew Victor <linux@maxim.org.za> >> CC: Nicolas Ferre <nicolas.ferre@atmel.com> > > Yes: > Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> > > Daniel, do you want to take it? Yep. >> CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> >> --- >> drivers/clocksource/timer-atmel-pit.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c >> index b5b4d45..c0304ff 100644 >> --- a/drivers/clocksource/timer-atmel-pit.c >> +++ b/drivers/clocksource/timer-atmel-pit.c >> @@ -61,12 +61,12 @@ static inline struct pit_data *clkevt_to_pit_data(struct clock_event_device *clk >> >> static inline unsigned int pit_read(void __iomem *base, unsigned int reg_offset) >> { >> - return __raw_readl(base + reg_offset); >> + return readl_relaxed(base + reg_offset); >> } >> >> static inline void pit_write(void __iomem *base, unsigned int reg_offset, unsigned long value) >> { >> - __raw_writel(value, base + reg_offset); >> + writel_relaxed(value, base + reg_offset); >> } >> >> /* >> > >
diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c index b5b4d45..c0304ff 100644 --- a/drivers/clocksource/timer-atmel-pit.c +++ b/drivers/clocksource/timer-atmel-pit.c @@ -61,12 +61,12 @@ static inline struct pit_data *clkevt_to_pit_data(struct clock_event_device *clk static inline unsigned int pit_read(void __iomem *base, unsigned int reg_offset) { - return __raw_readl(base + reg_offset); + return readl_relaxed(base + reg_offset); } static inline void pit_write(void __iomem *base, unsigned int reg_offset, unsigned long value) { - __raw_writel(value, base + reg_offset); + writel_relaxed(value, base + reg_offset); } /*
Fix the use of __raw IO accessor with the readl/writel_relaxed versions to allow the code to be used on a system running in big endian. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> -- CC: Daniel Lezcano <daniel.lezcano@linaro.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Linux Kernel <linux-kernel@vger.kernel.org> CC: Linux ARM Kernel <linux-arm-kernel@lists.infradead.org> CC: Andrew Victor <linux@maxim.org.za> CC: Nicolas Ferre <nicolas.ferre@atmel.com> CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> --- drivers/clocksource/timer-atmel-pit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)