> platform bus bindings. The question might be do we need the platform bus
> bindings or is it better to have AMBA bindings? The platform driver
> supports 16 and 32 bit attached devices, via IORESOURCE_MEM_{16,32}BIT.

platform_bus might be more generic. Depends on how many possibilities there
exist to connect the core to $something.

> Where do we have to look for the AMBA id registers?

I'll let the code speak (drivers/amba/bus.c):

        /*
         * Read pid and cid based on size of resource
         * they are located at end of region
         */
        for (pid = 0, i = 0; i < 4; i++)
                pid |= (readl(tmp + size - 0x20 + 4 * i) & 255) <<
                        (i * 8);
        for (cid = 0, i = 0; i < 4; i++)
                cid |= (readl(tmp + size - 0x10 + 4 * i) & 255) <<
                        (i * 8);

        amba_put_disable_pclk(dev);

        if (cid == AMBA_CID)
                dev->periphid = pid;

        if (!dev->periphid)
                ret = -ENODEV;

with AMBA_CID being (include/linux/amba/bus.h):

        #define AMBA_CID        0xb105f00d

periphid is used to match the driver to the device then. If done correctly, it
should have been registered with ARM Ltd. before (AFAIK).

Good night,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to