Should we pass amba device peripheral id with device structure or not?

Catalin Marinas catalin.marinas at arm.com
Fri May 14 10:25:19 EDT 2010


On Fri, 2010-05-14 at 08:02 +0100, Viresh KUMAR wrote:
> amba_device_register function reads and updates peripheral id from hardware
> registers, whenever we register any amba device. If clock to device is disabled,
> then amba_device_register will not be able to read and update this value.
> 
> Thus device registration will fail. Now we can also pass peripheral
> id with the device structure, which will let it pass.
> But i remember in SPEAr patches review, i got this comment to remove
> peripheral id from device structure as it will be populated
> automatically.

The peripheral id is usually only present in PrimeCell devices and it's
not a feature of the AMBA bus. So if your device doesn't have such id
(or it isn't readable) I think it makes sense to pass one in the
amba_device structure.

-- 
Catalin




More information about the linux-arm-kernel mailing list