Register writing problem using iowrite32

Showing results for 
Search instead for 
Did you mean: 

Register writing problem using iowrite32

Contributor I


We are trying to write physical address using this methods;

1- virtual_addr = ioremap(physical_addr, 512*4)

2- iowrite32(val, virtual_addr )

3- ioread32(virtual_addr )

4- iowrite32(val, virtual_addr + 0x04)

5-ioread32(virtual_addr + 0x04)

We are succesfully write and read at 2-3 steps. But next register write processes are not working. We constantly read 0. (These registers are 1588 timer registers and they have R/W permissions)

Do you have any suggestions?

Thank you

0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

There is a lot of indirection in this request. If you are ioremap()'ing the
the dedicated IEEE 1588 timer region, the registers at the offset 0 and 4 are
read-olny, there is no point in writing to them. Furthermore, 512*4 does not
match the size of the dedicated timer CCSR memory region.

If utilize DPAA IEEE 1588 dedicated timer is really what you want to do,
first of all, consider using the existing driver.

If you are to implement a driver from scratch, see my comments to your
earlier post.


Best Regards,

0 Kudos