Re: UIO not working on ppc405 onchip registers
From: <hidden>
Date: 2008-07-22 07:40:38
Hello Uwe, On Tuesday 22 July 2008, Uwe Kleine-K=F6nig wrote:
I don't know powerpc in general nor ppc405ep in detail but IIRC arm has problems if some memory is mapped twice. Might this be the problem here?
Maybee, the emac0 (0xef600800) and emac1 (0xef600900) get mapped as well,=20 because AFAIK I have to map a whole pagesize (0x1000).
quoted
+ int uiofd =3D open(UIO_DEV,O_RDWR);For debugging this is OK, in the final application you should add some tests. Check the UIO documentation for the details.
The whole example was meant to be short.
quoted
+static int uio_gpio_remove(struct device *dev) +{ + uio_unregister_device(&info); + info.mem[0].addr =3D 0; + info.mem[0].size =3D 0; + return 0; +}Are you sure that overwriting info.mem[0].addr is a good idea? Then unbinding the platform device and rebinding it fails to do the right thing for sure.
This was stolen from uio_dummy. So this might become a common error :( Thanks a lot for your comments, I will try to get an exclusive memory regio= n=20 mapped. Markus