Register writing problem using iowrite32

cancel
Showing results for 
Search instead for 
Did you mean: 

Register writing problem using iowrite32

47 Views
DemirYumruk
Contributor I

Hi,

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

30 Views
bpe
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,
Platon

0 Kudos