From: super.firetwister@googlemail.com
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: UIO not working on ppc405 onchip registers
Date: Tue, 22 Jul 2008 09:47:41 +0200 [thread overview]
Message-ID: <200807220947.43074.super.firetwister@gmail.com> (raw)
In-Reply-To: <20080722061730.GB12576@digi.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: super.firetwister@googlemail.com
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: UIO not working on ppc405 onchip registers
Date: Tue, 22 Jul 2008 09:47:41 +0200 [thread overview]
Message-ID: <200807220947.43074.super.firetwister@gmail.com> (raw)
In-Reply-To: <20080722061730.GB12576@digi.com>
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).
> > + 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.
> > +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
next prev parent reply other threads:[~2008-07-22 7:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 19:52 UIO not working on ppc405 onchip registers Markus Brunner
2008-07-22 6:17 ` Uwe Kleine-König
2008-07-22 6:42 ` Ben Nizette
2008-07-22 7:48 ` super.firetwister
2008-07-22 7:52 ` Ben Nizette
2008-09-05 6:18 ` Markus Brunner
2008-07-22 7:47 ` super.firetwister [this message]
2008-07-22 7:47 ` super.firetwister
2008-07-22 16:20 ` super.firetwister
2008-07-22 16:20 ` super.firetwister
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200807220947.43074.super.firetwister@gmail.com \
--to=super.firetwister@googlemail.com \
--cc=Uwe.Kleine-Koenig@digi.com \
--cc=linux-embedded@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.