On 8/10/06, Drasko Draskovic <drasko.draskovic@xxxxxxxxx> wrote:
My main problem here is writing "adapter" part of the driver, which is to drive the interface, called ApI2c, that sits on AMBA (actuallu APB part of AMBA) on one side and on the other on I2C. I am a bit stuck wondering if this adapter should be declared as amba_device (you can see amba.c in arch/arm) or described somehow different as platform_device. I do not have all the code snippets here wich would make question more clear, but I'll provide these tomorrow with some of my observations and more precise questions. Thanks again, -- Drasko DRASKOVIC
Hi, AMBA (AHB/APB etc.) is not visible as a bus on your platform from software point of view. Any amba-connected device effectively appears on your system as a memory-mapped device. Therefore you must declare your device as a platform device. (See arch/arm/mach-realview/core.c for example) In the kernel amba devices are used only when the device is a Primecell peripheral developed by ARM. In that case, these devices have specific device id convention which comes handy when matching drivers with devices. Apart from that they're no different than other amba-connected devices. Thanks, Bahadir -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/