mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
m68k: coldfire: use ColdFire specific IO access in headers
Convert all m68k/ColdFire specific header file code to only use the newly created internal register access methods. This is replacing the mixed and inconsistent use of readx/writex and __raw_readx/__raw_writex for internal SoC registers. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
parent
13cb6440d8
commit
8c22702db6
|
|
@ -95,8 +95,8 @@ static inline void gpio_free(unsigned gpio)
|
|||
|
||||
#define MCFGPIO_PORTTYPE u8
|
||||
#define MCFGPIO_PORTSIZE 8
|
||||
#define mcfgpio_read(port) __raw_readb(port)
|
||||
#define mcfgpio_write(data, port) __raw_writeb(data, port)
|
||||
#define mcfgpio_read(port) mcf_read8(port)
|
||||
#define mcfgpio_write(data, port) mcf_write8(data, port)
|
||||
|
||||
#elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272)
|
||||
|
||||
|
|
@ -104,8 +104,8 @@ static inline void gpio_free(unsigned gpio)
|
|||
|
||||
#define MCFGPIO_PORTTYPE u16
|
||||
#define MCFGPIO_PORTSIZE 16
|
||||
#define mcfgpio_read(port) __raw_readw(port)
|
||||
#define mcfgpio_write(data, port) __raw_writew(data, port)
|
||||
#define mcfgpio_read(port) mcf_read16(port)
|
||||
#define mcfgpio_write(data, port) mcf_write16(data, port)
|
||||
|
||||
#elif defined(CONFIG_M5249) || defined(CONFIG_M525x)
|
||||
|
||||
|
|
@ -113,8 +113,8 @@ static inline void gpio_free(unsigned gpio)
|
|||
|
||||
#define MCFGPIO_PORTTYPE u32
|
||||
#define MCFGPIO_PORTSIZE 32
|
||||
#define mcfgpio_read(port) __raw_readl(port)
|
||||
#define mcfgpio_write(data, port) __raw_writel(data, port)
|
||||
#define mcfgpio_read(port) mcf_read32(port)
|
||||
#define mcfgpio_write(data, port) mcf_write32(data, port)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
|
|||
*/
|
||||
static __inline__ unsigned int mcf_getppdata(void)
|
||||
{
|
||||
return readw(MCFSIM_PBDAT);
|
||||
return mcf_read16(MCFSIM_PBDAT);
|
||||
}
|
||||
|
||||
static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
|
||||
{
|
||||
writew((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
|
||||
mcf_write16((mcf_read16(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user