Check out "http://free-electrons.com/pub/mirror/devmem2.c"
The OS can place memory blocks anywhere and keeps track of the mapping.
You need to use mmap to translate an address from the TRM to /dev/mem.
Hope this helps.
Chad
On 12/25/2015 8:42 AM, [email protected] wrote:
Hi
I am using beagle bone black and writing i2c driver just for learning.
I used am335x TRM and i2c1 at address 0x4802a000 as mentioned in TRM.
I did the following :
void * addr = ioremap(phy_addr, length);
unsigned x = readl(addr);
Where phy_addr is the physical address (0x4802a000) mentioned in TRM.
And length is the end address - start address (0x4802afff - 0x4802a000)
Now on 'read' it crashes and gives me the following error when checked
in dmesg :
Unhandled fault: external abort on non-linefetch.
Need help on this.
Thanks:)
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google
Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
Chad Baker Memphis, TN
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.