diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2013-05-24 19:22:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:54:01 -0400 |
commit | a39ca2740c58ddef91efc5ea6889ecee1c314c42 (patch) | |
tree | 43f45d7d1884302ef9df7f13b8a18e1b859844ee /drivers/misc | |
parent | 1f7190fd1ef23c3c0423cf4471572b6ec2b57c8b (diff) |
misc/ep93xx_pwm: remove ep93xx_pwm_{write,read}l() inline functions
These are simple wrappers around writel() and readl(). Remove them.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ep93xx_pwm.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c index af01fb9fcd7e..06f0c63e8b44 100644 --- a/drivers/misc/ep93xx_pwm.c +++ b/drivers/misc/ep93xx_pwm.c | |||
@@ -39,61 +39,49 @@ struct ep93xx_pwm { | |||
39 | u32 duty_percent; | 39 | u32 duty_percent; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static inline void ep93xx_pwm_writel(struct ep93xx_pwm *pwm, | ||
43 | unsigned int val, unsigned int off) | ||
44 | { | ||
45 | writel(val, pwm->mmio_base + off); | ||
46 | } | ||
47 | |||
48 | static inline unsigned int ep93xx_pwm_readl(struct ep93xx_pwm *pwm, | ||
49 | unsigned int off) | ||
50 | { | ||
51 | return readl(pwm->mmio_base + off); | ||
52 | } | ||
53 | |||
54 | static inline void ep93xx_pwm_write_tc(struct ep93xx_pwm *pwm, u16 value) | 42 | static inline void ep93xx_pwm_write_tc(struct ep93xx_pwm *pwm, u16 value) |
55 | { | 43 | { |
56 | ep93xx_pwm_writel(pwm, value, EP93XX_PWMx_TERM_COUNT); | 44 | writel(value, pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); |
57 | } | 45 | } |
58 | 46 | ||
59 | static inline u16 ep93xx_pwm_read_tc(struct ep93xx_pwm *pwm) | 47 | static inline u16 ep93xx_pwm_read_tc(struct ep93xx_pwm *pwm) |
60 | { | 48 | { |
61 | return ep93xx_pwm_readl(pwm, EP93XX_PWMx_TERM_COUNT); | 49 | return readl(pwm->mmio_base + EP93XX_PWMx_TERM_COUNT); |
62 | } | 50 | } |
63 | 51 | ||
64 | static inline void ep93xx_pwm_write_dc(struct ep93xx_pwm *pwm, u16 value) | 52 | static inline void ep93xx_pwm_write_dc(struct ep93xx_pwm *pwm, u16 value) |
65 | { | 53 | { |
66 | ep93xx_pwm_writel(pwm, value, EP93XX_PWMx_DUTY_CYCLE); | 54 | writel(value, pwm->mmio_base + EP93XX_PWMx_DUTY_CYCLE); |
67 | } | 55 | } |
68 | 56 | ||
69 | static inline void ep93xx_pwm_enable(struct ep93xx_pwm *pwm) | 57 | static inline void ep93xx_pwm_enable(struct ep93xx_pwm *pwm) |
70 | { | 58 | { |
71 | ep93xx_pwm_writel(pwm, 0x1, EP93XX_PWMx_ENABLE); | 59 | writel(0x1, pwm->mmio_base + EP93XX_PWMx_ENABLE); |
72 | } | 60 | } |
73 | 61 | ||
74 | static inline void ep93xx_pwm_disable(struct ep93xx_pwm *pwm) | 62 | static inline void ep93xx_pwm_disable(struct ep93xx_pwm *pwm) |
75 | { | 63 | { |
76 | ep93xx_pwm_writel(pwm, 0x0, EP93XX_PWMx_ENABLE); | 64 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_ENABLE); |
77 | } | 65 | } |
78 | 66 | ||
79 | static inline int ep93xx_pwm_is_enabled(struct ep93xx_pwm *pwm) | 67 | static inline int ep93xx_pwm_is_enabled(struct ep93xx_pwm *pwm) |
80 | { | 68 | { |
81 | return ep93xx_pwm_readl(pwm, EP93XX_PWMx_ENABLE) & 0x1; | 69 | return readl(pwm->mmio_base + EP93XX_PWMx_ENABLE) & 0x1; |
82 | } | 70 | } |
83 | 71 | ||
84 | static inline void ep93xx_pwm_invert(struct ep93xx_pwm *pwm) | 72 | static inline void ep93xx_pwm_invert(struct ep93xx_pwm *pwm) |
85 | { | 73 | { |
86 | ep93xx_pwm_writel(pwm, 0x1, EP93XX_PWMx_INVERT); | 74 | writel(0x1, pwm->mmio_base + EP93XX_PWMx_INVERT); |
87 | } | 75 | } |
88 | 76 | ||
89 | static inline void ep93xx_pwm_normal(struct ep93xx_pwm *pwm) | 77 | static inline void ep93xx_pwm_normal(struct ep93xx_pwm *pwm) |
90 | { | 78 | { |
91 | ep93xx_pwm_writel(pwm, 0x0, EP93XX_PWMx_INVERT); | 79 | writel(0x0, pwm->mmio_base + EP93XX_PWMx_INVERT); |
92 | } | 80 | } |
93 | 81 | ||
94 | static inline int ep93xx_pwm_is_inverted(struct ep93xx_pwm *pwm) | 82 | static inline int ep93xx_pwm_is_inverted(struct ep93xx_pwm *pwm) |
95 | { | 83 | { |
96 | return ep93xx_pwm_readl(pwm, EP93XX_PWMx_INVERT) & 0x1; | 84 | return readl(pwm->mmio_base + EP93XX_PWMx_INVERT) & 0x1; |
97 | } | 85 | } |
98 | 86 | ||
99 | /* | 87 | /* |