linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Question: locomo_{read/write}l macros
@ 2010-01-20 21:33 H Hartley Sweeten
  2010-01-21  2:06 ` Eric Miao
       [not found] ` <4B581CD2.9010007@ru.mvista.com>
  0 siblings, 2 replies; 3+ messages in thread
From: H Hartley Sweeten @ 2010-01-20 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

Is there a reason why the locomo stuff is using custom
macros for {read/write}l access?

In arch/arm/include/asm/hardware/locomo.h:

#define locomo_writel(val,addr)	({ *(volatile u16 *)(addr) = (val); })
#define locomo_readl(addr)	(*(volatile u16 *)(addr))

It appears that these are just non-typesafe versions of the
__raw_{read/write}w macros in arch/arm/include/asm/io.h:

#define __raw_writew(v,a)	(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
#define __raw_readw(a)		(__chk_io_ptr(a), *(volatile unsigned short __force *)(a))

Is there any reason not to change them all (other than
having to then fix all the callers to be typesafe)?

It appears the only users are in:

arch/arm/common/locomo.c
arch/arm/include/asm/hardware/locomo.h
drivers/input/keyboard/locomokbd.c
drivers/leds/leds-locomo.c
drivers/video/backlight/locomolcd.c

Thanks,
Hartley

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-21 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 21:33 Question: locomo_{read/write}l macros H Hartley Sweeten
2010-01-21  2:06 ` Eric Miao
     [not found] ` <4B581CD2.9010007@ru.mvista.com>
2010-01-21 16:52   ` H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).