Register writing problem using iowrite32

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Register writing problem using iowrite32

2,366件の閲覧回数
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,348件の閲覧回数
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 件の賞賛
返信