Accessing CCSR address space

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing CCSR address space

1,801 Views
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 Kudos
9 Replies

972 Views
scottwood
NXP Employee
NXP Employee

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

972 Views
tomydevasia
Contributor I

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

0 Kudos

972 Views
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 Kudos

972 Views
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?

972 Views
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 Kudos

972 Views
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 Kudos

972 Views
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 Kudos

972 Views
tomydevasia
Contributor I

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

0 Kudos

972 Views
scottwood
NXP Employee
NXP Employee

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

0 Kudos