[linux-cirrus] Re: How to determine if a device is an AMBA device

  • From: Jean-Philippe Francois <jp.francois@xxxxxxxxxx>
  • To: linux-cirrus@xxxxxxxxxxxxx
  • Date: Wed, 27 Jun 2007 17:36:09 +0200

Wagner Scott (ST-IN/ENG1.1) a écrit :
Hello all,

It is not clear to me what it means to be an AMBA device.

Russell King alluded to this in his post
http://lists.arm.linux.org.uk/pipermail/linux-arm/2006-August/012098.htm
l: "Only use an amba_device _IF_ you have a real AMBA device.  It's not
for willy nilly random drivers."

The case for which I am confused is an external peripheral connected to
a Cirrus Logic EP93xx (ARM920T) address & data bus using the EP93xx
static memory controller and one of the external interrupts (/INT1).

Is this an AMBA device, which should use amba_driver_register(),
amba_device_register(), and friends in ./arch/arm/common/amba.c and
./include/asm/hardware/amba.h, (since it uses the EP93xx's AMBA static
memory and interrupt controllers)?
See this http://lxr.linux.no/source/arch/arm/mach-ep93xx/core.c?a=arm

the uart inside the chip are AMBA devices, but other devices are platform_devices,
registered using platform_device_register and platform_driver_register.
Or is it an "ordinary" device which should use the generic Linux
ioremap_nocache() and request_irq() mechanism, as Russell suggests?
Yep, except you should not call ioremap but let platform_device_register do it for you.

Thanks in advance for any advice.

Scott Wagner




Other related posts: