Accessing CCSR address space

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

Accessing CCSR address space

1,883 次查看
tomydevasia
Contributor I

Hello,

       We are using P2040 based board and in this we need to access the registers in the CCSR address space from Linux. So how we can access these registers from Linux user space.

Regards

0 项奖励
9 回复数

1,054 次查看
scottwood
NXP Employee
NXP Employee

You can mmap() /dev/mem -- but in general this is not recommended.  Why do you need to do this?

1,054 次查看
tomydevasia
Contributor I

We need to configure the registers of SPI. So to configure these registers how we can

0 项奖励

1,054 次查看
tomydevasia
Contributor I

We need to configure the registers of SPI. As these registers are in CCSR address space, it is required to access CCSR address space to read/write these registers.

0 项奖励

1,054 次查看
scottwood
NXP Employee
NXP Employee

Does the existing kernel SPI driver (drivers/spi/spi-fsl-espi.c or drivers/spi/spi_fsl_espi.c depending on kernel version) not work for you?

1,054 次查看
tomydevasia
Contributor I

Thanks for the reply. In the board (P2040 based ), there is one Ethernet switch in SPI bus. So how I communicate with the Ethernet switch through SPI using APIs mentioned in drivers/spi/spi_fsl_espi.c. Is there any application note for writing SPI driver using freescale SPI driver SPIs ?

0 项奖励

1,054 次查看
genuap
NXP Employee
NXP Employee

I have a tool I can send you if you want that basically does mmaps from kernel space (CCSR) over to user space

0 项奖励

1,054 次查看
williamanderson
Contributor III

Hi Paul,

   We are using the LS1021A and I want to peek and poke CCSR space to help debug a PCIe issue.  Could you send me a copy of your utility if it's available.

Thanks

Bill Anderson

0 项奖励

1,054 次查看
tomydevasia
Contributor I

It will be very helpful if you send me the tool.

0 项奖励

1,054 次查看
scottwood
NXP Employee
NXP Employee

There is documentation in Documentation/spi/, including a userspace interface (spidev).

0 项奖励