[ELDK] MCV hardware

Pavel Machek pavel at denx.de
Mon Jul 6 09:44:10 CEST 2015


On Wed 2015-07-01 18:05:32, ibragimov wrote:
> Hello, I use sysroot
> 
> ftp://ftp.denx.de/pub/eldk/5.6/targets/mcvevk/core-image-lsb-sdk-mcvevk.tar.bz2
> 
> and DENX_MCV_reference C2
> 
> I try to get access to PIO IOB5A through /dev/mem
> 
> #define MAP_PIO_BASE_ADDR       (0xFF200000)    ///< lwAxiMaster Base
> Address
> #define MAP_PIO_SIZE            (0x00100000)
> #define IOB5A_OFFS              (0x000800C0)    // GPIO IOB5A offset from
> lwAxiMaster Base Address
> 
> int fd = open("/dev/mem", O_RDWR|O_SYNC);
> unsigned int * mem_ptr = (unsigned int*)mmap(NULL, MAP_PIO_SIZE,
> PROT_READ|PROT_WRITE, MAP_SHARED, fd, MAP_PIO_BASE_ADDR);
> io_val = mem_ptr[IOB5A_OFFS/sizeof(unsigned int)];
> 
> And here I've got Bus error with
> Unhandled fault: external abort on non-linefetch (0x018) at
> 0xb6c590c0

You may want to try to access that register from u-boot first, then
under linux using devmem2 tool... for debugging.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


More information about the eldk mailing list