FPGA device memory is not accessible with ioremap()

Sri Ram Vemulpali sri.ram.gmu06 at gmail.com
Thu Dec 26 18:41:37 EST 2013

Hi All,

I am using custom board MPC8641d. It has all evaluation board devices
connected. Apart from that an external FPGA device connected through

The localbus is at address 0xF5005000 directly connected to processor. The
FPGA address in the processor realm is 0xF3800000. As per spec FPGA target
interface is CS3 (chip select 3). 32-bit peripheral address bus as seen by
FPGA is 0xF3800000. The global address of FPGA is 0x0BFC0000.

I am implementing driver for FPGA. I am using ioremap() to map to FPGA
registers at location 0xF3800000. The virtual address returned by ioremap()
when used with write32(), read32() at memory locations shows no response
from device. FPGA has special scratch pad to which one can write and read
to validate the memory map is working. When I write and read I see no value.

#define FCP_ADDRESS_START 0xF3800000
#define FCP_ADDRESS_END   0xF3808000

 void *fcp_scratch_pad;
 char buff[10];

 io_fcp_mem = ioremap_nocache( FCP_ADDRESS_START, FCP_ADDRESS_RANGE );

        if( ! io_fcp_mem ) {
                return -ENODEV;

        printk( KERN_CRIT "ioremap virt mem:%p\n", io_fcp_mem );

        fcp_scratch_pad = ((char*)io_fcp_mem) + 224;

        printk( KERN_CRIT "scratch pad virt mem:%p\n", fcp_scratch_pad );

        iowrite8_rep( fcp_scratch_pad, "Hello", 6 );

        ioread8_rep( fcp_scratch_pad, buff, 6 );

        printk( KERN_CRIT "value read from scratch_pad:%s\n", buff );

        return 0;

Attached is the device tree of the board.

Can anyone please direct me or point where I am doing wrong. It seems I am
unable to access FPGA device memory. Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131226/b02271fa/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbc8641d.dts
Type: application/octet-stream
Size: 10709 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131226/b02271fa/attachment.obj 

More information about the Kernelnewbies mailing list