Virtual Addresses of A13s Registers

Started by maggocnx, June 27, 2013, 11:44:49 AM

Previous topic - Next topic

maggocnx

The project i am working on is quite special case,i have to  implement many periphal devices, such as thermal printer, keypad, nfc etc..
Most of the devices are using spi2  and are multiplexed with some io multiplexers (controlled by GPIO pins) .
That's why i can't use drivers like spidev .
I started to write my own module where i just writing to the virtual addresses of A13s registers defined in platform.h.
I have to admit its my first embedded linux project ever, and all the driver examples in the source code looks  very complicated to me. So i preferred  to do it this way.
For the gpio pins everything worked fine so far . But i cant get SPI working. To me its looking like the virtual addresses in platform.h are not properly mapped. If i read  the initial value from any SPI Control Register i am expecting  0x0002_001C but just got 0.(I completly disabled SPI Support in kernels menuconfig so no others process should write to it before). If i do the same with some GPIO registers i get the expected values. I tried it with ioremap but also no success. For the GPIOs it didnt need to do any remap.
Am I missing something ? Where is all that remapping stuff taking place? Could anybody lead me into the right direction.

BJFreeman

sounds like your doing a linux distro, but thought I would check if your doing barebones.
Fulltimer since 89

maggocnx

I am on linux , but i have to write the drivers myself since i have a very special setup (periphals on one spi are multiplexed via external port multiplexers)