Register writing problem using iowrite32

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Register writing problem using iowrite32

2,707 次查看
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 项奖励
回复
1 回复

2,689 次查看
bpe
NXP Employee
NXP Employee

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 项奖励
回复