On Tue, May 5, 2015 at 12:18 PM, <maitysanchayan@xxxxxxxxx> wrote: > Hello, > > I am adding a small piece of code to expose SoC specific information > while following the below information, for a Cortex A5 platform. > > https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-soc > > For the SoC device attribute revision, I need to access a location 0x80 > for reading the ROM revision information. I am kinda stuck at trying to > find the appropriate way to read this location. > > The devm_ioremap* functions take a device pointer which I can manage but > they also need a struct resource argument and devm_ioremap requries a > resource_size_t as well. Having only a specific location to read, > without having any struct resource what would be the appropriate way to > get this information. If the register / memory location is only used for that specific purpose then using something like reg = <0x00000080 0x4> in the DT node is perfectly fine. But if the register is part of a larger device you can use a syscon device to represent that. -- Carlo Caione _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies