accessing SPI registers gets me bus errors

Hi, all,

what I want to do is the following:

There is a LinearTechnology/AD LTC2500-32 ADC that can deliver up to
1Meg 32-Bit results per second on its slave SPI-Interface. Baud rate
can be 100MBit/sec. I could live with somewhat less, but would like to

max it out as far as possible.

I want to read the data via SPI0. Collecting them by DMA might be possible,
but I see problems allocating large enough fixed buffers and much ado

with physical/virtual adresses.

So I decided to use the PRU0 to do the fast work. In the 12 KB shared ram, there
will be 2 1KWord ping-pong-Buffers and a few words for command/status/handshake.
The PRU can simply do busy waiting; it has nothing else to do. No interrupts etc

The ARM CPU fetches 1Kword worth of data when a buffer gets full and moves

it to virtual address land, where there is a lot of space & network access.

I can mmap() the shared buffer, the PRU data rams and the PRU instruction
rams and change / test them. (I cannot yet load the PRU program & start it,
but that is not the problem now.)

The problem is that I get bus errors when I access anything of the SPI

interface. There was some “Robotics” driver pre-installed that claimed all SPI
for itself, which I consider kinda unfriendly.

Blacklisting removed it, but it did not remove the bus errors.
What is the minimum I have to do to get access to the SPI registers?

I get no complaints when I mmap() the SPI0, but I get killed when I actually
access it. Using devmem2 does the same.