diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 23:02:10 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 23:02:10 -0500 |
commit | 485773f3e401fca31c112c1ff24797e42ff87afd (patch) | |
tree | 3bfa40da48f4e8484b6a6c60f0a3cb4e14c248a9 /arch/sh/include/asm | |
parent | 9d56dd3b083a3bec56e9da35ce07baca81030b03 (diff) |
sh: flag ctrl_in/outX as __deprecated.
These routines are unsuitable for cross-platform use and no new code
should be using them, flag them as deprecated in order to give drivers
sufficient time to migrate over.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r-- | arch/sh/include/asm/io.h | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index e4f563f472eb..98c62fa168c2 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -80,16 +80,51 @@ | |||
80 | #define writel(v,a) ({ __raw_writel((v),(a)); mb(); }) | 80 | #define writel(v,a) ({ __raw_writel((v),(a)); mb(); }) |
81 | #define writeq(v,a) ({ __raw_writeq((v),(a)); mb(); }) | 81 | #define writeq(v,a) ({ __raw_writeq((v),(a)); mb(); }) |
82 | 82 | ||
83 | /* SuperH on-chip I/O functions */ | 83 | /* |
84 | #define ctrl_inb __raw_readb | 84 | * Legacy SuperH on-chip I/O functions |
85 | #define ctrl_inw __raw_readw | 85 | * |
86 | #define ctrl_inl __raw_readl | 86 | * These are all deprecated, all new (and especially cross-platform) code |
87 | #define ctrl_inq __raw_readq | 87 | * should be using the __raw_xxx() routines directly. |
88 | 88 | */ | |
89 | #define ctrl_outb __raw_writeb | 89 | static inline u8 __deprecated ctrl_inb(unsigned long addr) |
90 | #define ctrl_outw __raw_writew | 90 | { |
91 | #define ctrl_outl __raw_writel | 91 | return __raw_readb(addr); |
92 | #define ctrl_outq __raw_writeq | 92 | } |
93 | |||
94 | static inline u16 __deprecated ctrl_inw(unsigned long addr) | ||
95 | { | ||
96 | return __raw_readw(addr); | ||
97 | } | ||
98 | |||
99 | static inline u32 __deprecated ctrl_inl(unsigned long addr) | ||
100 | { | ||
101 | return __raw_readl(addr); | ||
102 | } | ||
103 | |||
104 | static inline u64 __deprecated ctrl_inq(unsigned long addr) | ||
105 | { | ||
106 | return __raw_readq(addr); | ||
107 | } | ||
108 | |||
109 | static inline void __deprecated ctrl_outb(u8 v, unsigned long addr) | ||
110 | { | ||
111 | __raw_writeb(v, addr); | ||
112 | } | ||
113 | |||
114 | static inline void __deprecated ctrl_outw(u16 v, unsigned long addr) | ||
115 | { | ||
116 | __raw_writew(v, addr); | ||
117 | } | ||
118 | |||
119 | static inline void __deprecated ctrl_outl(u32 v, unsigned long addr) | ||
120 | { | ||
121 | __raw_writel(v, addr); | ||
122 | } | ||
123 | |||
124 | static inline void __deprecated ctrl_outq(u64 v, unsigned long addr) | ||
125 | { | ||
126 | __raw_writeq(v, addr); | ||
127 | } | ||
93 | 128 | ||
94 | extern unsigned long generic_io_base; | 129 | extern unsigned long generic_io_base; |
95 | 130 | ||