Hi!
I apologize in advance for the dummy question.
I have to write driver for my own device based on arm (xScale) processor
pxa270 & sja1000 placed on separate chip select (CS) behind FPGA organizing
multiplexer for CAN-transceiver.
For access to corresponding sja1000 register I should write to/read from
[(remaped) base pointer plus multiplied by 2 register address] (it's just
realization of multiplexer in FPGA). Ie sja_write() in my own driver looks
like (we use 16bit bus):


void *iomem_cs4 = ioremap(nCS4, SJA_MEMREG_SIZE);
...

void sja_write((volatile u8 data, void __iomem* sja_reg_addr)
{
    extern void *iomem_cs4;
    *(u16*)(iomem_cs4 + ((u32)sja_reg_addr * 2)) = data;
}

Interrupt from SJA1000 lives on pxa270 GPIO.

I want to use SocketCAN, but I couldn't found write place in driver and docs
for my needs.
Regards.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to