Mem mapped i/o in RTDM driver
A basic RTDM question:
In a normal Linux device driver you typically use request_mem_region() and ioremap_nocache() to setup access to some memory mapped i/o. Then you just iowrite()/ioread() to/from that address.
Do I still do this for the XXXXX_nrt operations in my RTDM driver?
How about for the XXXX_rt operations?
I do see that gpioirqbench uses the Linux memory management indirectly since it relies on the OF mpc52xx_find_and_map("mpc5200-gpio") but because the driver supports both Linux and RTDM, the requirements are not clear.
Thanks.
Signature · 3 lines
Jeff Angielski The PTR Group www.theptrgroup.com
Quoted 7 lines · jeff angielski
A basic RTDM question:
In a normal Linux device driver you typically use
request_mem_region()andioremap_nocache()to setup access to some memory mapped i/o. Then you just iowrite()/ioread() to/from that address.Do I still do this for the
XXXXX_nrtoperations in my RTDM driver?
Yes.
Quoted 3 lines
How about for the
XXXX_rtoperations?
ioread/iowrite will be usable the same way, but you will have to ioremap() in a non RT context first.
Quoted 4 lines
I do see that gpioirqbench uses the Linux memory management indirectly since it relies on the OF
mpc52xx_find_and_map("mpc5200-gpio")but because the driver supports both Linux and RTDM, the requirements are not clear.
Care is taken to always refer to MPC52xx_GPIO from a plain Linux context.
Quoted 4 lines
Thanks.
Signature · 1 line
Philippe.
Quoted 5 lines · jeff angielski
A basic RTDM question:
In a normal Linux device driver you typically use
request_mem_region()andioremap_nocache()to setup access to some memory mapped i/o. Then you just iowrite()/ioread() to/from that address.
Btw, maybe readb/w/l() and writeb/w/l() are more appropriate since ioread/write is a legacy interface?
Quoted 13 lines
Do I still do this for the
XXXXX_nrtoperations in my RTDM driver?How about for the
XXXX_rtoperations?I do see that gpioirqbench uses the Linux memory management indirectly since it relies on the OF
mpc52xx_find_and_map("mpc5200-gpio")but because the driver supports both Linux and RTDM, the requirements are not clear.Thanks.
Signature · 1 line
Philippe.
Quoted 9 lines · Philippe Gerum
Quoted 5 lines · jeff angielski
A basic RTDM question:
In a normal Linux device driver you typically use
request_mem_region()andioremap_nocache()to setup access to some memory mapped i/o. Then you just iowrite()/ioread() to/from that address.Btw, maybe readb/w/l() and writeb/w/l() are more appropriate since ioread/write is a legacy interface?
i.e. in MMIO mode.
Quoted 14 lines
Quoted 14 lines
Do I still do this for the
XXXXX_nrtoperations in my RTDM driver?How about for the
XXXX_rtoperations?I do see that gpioirqbench uses the Linux memory management indirectly since it relies on the OF
mpc52xx_find_and_map("mpc5200-gpio")but because the driver supports both Linux and RTDM, the requirements are not clear.Thanks.
Signature · 1 line
Philippe.