UIO not working on ppc405 onchip registers
super.firetwister at googlemail.com
super.firetwister at googlemail.com
Tue Jul 22 17:47:41 EST 2008
Hello Uwe,
On Tuesday 22 July 2008, Uwe Kleine-König 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,
because AFAIK I have to map a whole pagesize (0x1000).
> > + int uiofd = 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.
> > +static int uio_gpio_remove(struct device *dev)
> > +{
> > + uio_unregister_device(&info);
> > + info.mem[0].addr = 0;
> > + info.mem[0].size = 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 region
mapped.
Markus
More information about the Linuxppc-dev
mailing list