mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* New driver crashes with "unable to handle paging request"
@ 2014-04-23 16:09 Rolf Evers-Fischer
  2014-04-24  6:58 ` Sascha Hauer
  0 siblings, 1 reply; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-04-23 16:09 UTC (permalink / raw)
  To: barebox

I'm just trying to port the USB driver "musb" (for the AM335x platform) from
linux kernel to barebox.
But whenever I want to read any address in the range 0x47401400-0x474017ff, the
barebox crashes with "unable to handle paging request".
I have already tried to invoke a "map_io_sections(0x0, 0x47400000, 0x2000)", but
it didn't help.

Fortunately I can test it on the barebox command line with the command
 md -w 0x4740146c-0x4740146d

In the linux kernel they are calling the "ioremap()" function for this memory
range, but I didn't find an equivalent function in the barebox source.

Do you have any idea, how to avoid the "paging request" failure here?

Best regards,
 Rolf

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-04-23 16:09 New driver crashes with "unable to handle paging request" Rolf Evers-Fischer
@ 2014-04-24  6:58 ` Sascha Hauer
  2014-04-24  8:52   ` Rolf Evers-Fischer
  0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2014-04-24  6:58 UTC (permalink / raw)
  To: Rolf Evers-Fischer; +Cc: barebox

Hi Rolf,

On Wed, Apr 23, 2014 at 06:09:40PM +0200, Rolf Evers-Fischer wrote:
> I'm just trying to port the USB driver "musb" (for the AM335x platform) from
> linux kernel to barebox.
> But whenever I want to read any address in the range 0x47401400-0x474017ff, the
> barebox crashes with "unable to handle paging request".
> I have already tried to invoke a "map_io_sections(0x0, 0x47400000, 0x2000)", but
> it didn't help.

barebox creates a flat 1:1 mapping when the MMU is enabled. You won't
need any calls to map_io_sections or some ioremap correspondent
function.

It may be that you have to enable some bus clocks in order to access the
musb.

To make sure you don't have MMU trouble could you post the output of
'mmuinfo 0x47400000'?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-04-24  6:58 ` Sascha Hauer
@ 2014-04-24  8:52   ` Rolf Evers-Fischer
  2014-04-30 14:08     ` Rolf Evers-Fischer
  0 siblings, 1 reply; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-04-24  8:52 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox


Hi Sascha,

> Sascha Hauer <s.hauer@pengutronix.de> hat am 24. April 2014 um 08:58
> geschrieben:
>
>
> Hi Rolf,
>
> On Wed, Apr 23, 2014 at 06:09:40PM +0200, Rolf Evers-Fischer wrote:
> > I'm just trying to port the USB driver "musb" (for the AM335x platform) from
> > linux kernel to barebox.
> > But whenever I want to read any address in the range 0x47401400-0x474017ff,
> > the
> > barebox crashes with "unable to handle paging request".
> > I have already tried to invoke a "map_io_sections(0x0, 0x47400000, 0x2000)",
> > but
> > it didn't help.
>
> barebox creates a flat 1:1 mapping when the MMU is enabled. You won't
> need any calls to map_io_sections or some ioremap correspondent
> function.
>

Thank you. That's good to know.

> It may be that you have to enable some bus clocks in order to access the
> musb.
>

Maybe. I found this in TI's "Technical Reference Manual":
"Prior to configuring the USB Module Registers, the USB SubSystem and PHY are
required to be released
from reset, enable interconnects and controllers clocks as well as configure the
USB PHY with appropriate
setting."

Quite a lot of work, but I'll definitely have to check it.

> To make sure you don't have MMU trouble could you post the output of
> 'mmuinfo 0x47400000'?
>

PAR result for 0x47400000:
 privileged read: 0x47400290
  Physical Address [31:12]: 0x47400000
  Reserved [11]:            0x0
  Not Outer Shareable [10]: 0x0
  Non-Secure [9]:           0x1
  Impl. def. [8]:           0x0
  Shareable [7]:            0x1
  Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
  Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
  SuperSection [1]:         0x0
  Failure [0]:              0x0
 privileged write: 0x47400290
  Physical Address [31:12]: 0x47400000
  Reserved [11]:            0x0
  Not Outer Shareable [10]: 0x0
  Non-Secure [9]:           0x1
  Impl. def. [8]:           0x0
  Shareable [7]:            0x1
  Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
  Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
  SuperSection [1]:         0x0
  Failure [0]:              0x0


Best regards,
 Rolf

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-04-24  8:52   ` Rolf Evers-Fischer
@ 2014-04-30 14:08     ` Rolf Evers-Fischer
  2014-05-01 22:50       ` Christoph Fritz
  0 siblings, 1 reply; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-04-30 14:08 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

I have resolved the problem by enabling the USB clocks:
Write "2" to register "CM_PER_USB0_CLKCTRL" (address 0x44e0001c).

Kind regards,
 Rolf


> Rolf Evers-Fischer <embedded24@evers-fischer.de> hat am 24. April 2014 um
> 10:52 geschrieben:
>
>
>
> Hi Sascha,
>
> > Sascha Hauer <s.hauer@pengutronix.de> hat am 24. April 2014 um 08:58
> > geschrieben:
> >
> >
> > Hi Rolf,
> >
> > On Wed, Apr 23, 2014 at 06:09:40PM +0200, Rolf Evers-Fischer wrote:
> > > I'm just trying to port the USB driver "musb" (for the AM335x platform)
> > > from
> > > linux kernel to barebox.
> > > But whenever I want to read any address in the range
> > > 0x47401400-0x474017ff,
> > > the
> > > barebox crashes with "unable to handle paging request".
> > > I have already tried to invoke a "map_io_sections(0x0, 0x47400000,
> > > 0x2000)",
> > > but
> > > it didn't help.
> >
> > barebox creates a flat 1:1 mapping when the MMU is enabled. You won't
> > need any calls to map_io_sections or some ioremap correspondent
> > function.
> >
>
> Thank you. That's good to know.
>
> > It may be that you have to enable some bus clocks in order to access the
> > musb.
> >
>
> Maybe. I found this in TI's "Technical Reference Manual":
> "Prior to configuring the USB Module Registers, the USB SubSystem and PHY are
> required to be released
> from reset, enable interconnects and controllers clocks as well as configure
> the
> USB PHY with appropriate
> setting."
>
> Quite a lot of work, but I'll definitely have to check it.
>
> > To make sure you don't have MMU trouble could you post the output of
> > 'mmuinfo 0x47400000'?
> >
>
> PAR result for 0x47400000:
>  privileged read: 0x47400290
>   Physical Address [31:12]: 0x47400000
>   Reserved [11]:            0x0
>   Not Outer Shareable [10]: 0x0
>   Non-Secure [9]:           0x1
>   Impl. def. [8]:           0x0
>   Shareable [7]:            0x1
>   Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
>   Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
>   SuperSection [1]:         0x0
>   Failure [0]:              0x0
>  privileged write: 0x47400290
>   Physical Address [31:12]: 0x47400000
>   Reserved [11]:            0x0
>   Not Outer Shareable [10]: 0x0
>   Non-Secure [9]:           0x1
>   Impl. def. [8]:           0x0
>   Shareable [7]:            0x1
>   Inner mem. attr. [6:4]:   0x1 (0b001 Strongly-ordered)
>   Outer mem. attr. [3:2]:   0x0 (0b00 Non-cacheable)
>   SuperSection [1]:         0x0
>   Failure [0]:              0x0
>
>
> Best regards,
>  Rolf

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-04-30 14:08     ` Rolf Evers-Fischer
@ 2014-05-01 22:50       ` Christoph Fritz
  2014-05-05 12:13         ` Rolf Evers-Fischer
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Fritz @ 2014-05-01 22:50 UTC (permalink / raw)
  To: Rolf Evers-Fischer; +Cc: barebox

Hi Rolf,

 I have ported musb (host-support) from u-boot to barebox. I'll send a
patchset in the next days.


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-05-01 22:50       ` Christoph Fritz
@ 2014-05-05 12:13         ` Rolf Evers-Fischer
  2014-05-12 12:57           ` Rolf Evers-Fischer
  0 siblings, 1 reply; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-05-05 12:13 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: barebox

Hi Christoph,

> Christoph Fritz <chf.fritz@googlemail.com> hat am 2. Mai 2014 um 00:50
> geschrieben:
>
>
> Hi Rolf,
>
> I have ported musb (host-support) from u-boot to barebox. I'll send a
> patchset in the next days.
>

that sounds very good. Thank you very much in advance!

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-05-05 12:13         ` Rolf Evers-Fischer
@ 2014-05-12 12:57           ` Rolf Evers-Fischer
  2014-05-13 11:03             ` Alexander Aring
  0 siblings, 1 reply; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-05-12 12:57 UTC (permalink / raw)
  To: Christoph Fritz; +Cc: barebox

Dear Christoph,
just a shy question: Were you already able to prepare a first patchset?

Kind regards,
 Rolf


> Rolf Evers-Fischer <embedded24@evers-fischer.de> hat am 5. Mai 2014 um 14:13
> geschrieben:
>
>
> Hi Christoph,
>
> > Christoph Fritz <chf.fritz@googlemail.com> hat am 2. Mai 2014 um 00:50
> > geschrieben:
> >
> >
> > Hi Rolf,
> >
> > I have ported musb (host-support) from u-boot to barebox. I'll send a
> > patchset in the next days.
> >
>
> that sounds very good. Thank you very much in advance!

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-05-12 12:57           ` Rolf Evers-Fischer
@ 2014-05-13 11:03             ` Alexander Aring
  2014-05-13 12:49               ` Christoph Fritz
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Aring @ 2014-05-13 11:03 UTC (permalink / raw)
  To: Rolf Evers-Fischer; +Cc: barebox

Hi,

i am not Christoph but I want to told you my opinion about this.

One year ago there was some guy at #barebox in irc.freenode.net with the
nickname "honshu" (or it was a girl).

"honshu" asked if somebody worked at the musb support. Nobody known
worked on this support... So he begun to hack this into barebox. I
think he wanted to use the u-boot code as well.

This was one year ago...


Now, I will quoute the irc log:

"10:11 < ch_f> I need the spec for musb (it's on a am335x), but it's not
in the trm. Any ideas how to get it?"

This was today May 13. 2014.

Here is my answer to the very mysteric guy with the nickname "ch_f", I
think you don't get it without good connections. :-)

But this doesn't sounds to me that the driver is almost finished.

Sorry if I told that on the mailinglist, but I think everyone should
know the really state of this port now.

- Alex


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-05-13 11:03             ` Alexander Aring
@ 2014-05-13 12:49               ` Christoph Fritz
  2014-05-15 11:37                 ` Rolf Evers-Fischer
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Fritz @ 2014-05-13 12:49 UTC (permalink / raw)
  To: Alexander Aring; +Cc: barebox, Rolf Evers-Fischer

Hey Alex

On Tue, 2014-05-13 at 13:03 +0200, Alexander Aring wrote:
> This was one year ago...

The port (with only host support) is that old, but simply due to lack of
time I haven't fixed the hacks in there. For example some delays need
proper wait_on_timeout(), therefore a reference manual would be nice.

I hope to find some time next weekend pushing the stuff to github or as
a RFC-Patchset.

Keep calm


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New driver crashes with "unable to handle paging request"
  2014-05-13 12:49               ` Christoph Fritz
@ 2014-05-15 11:37                 ` Rolf Evers-Fischer
  0 siblings, 0 replies; 10+ messages in thread
From: Rolf Evers-Fischer @ 2014-05-15 11:37 UTC (permalink / raw)
  To: Alexander Aring, Christoph Fritz; +Cc: barebox

Dear Christoph and Alex,

> Christoph Fritz <chf.fritz@googlemail.com> hat am 13. Mai 2014 um 14:49
> geschrieben:
>
>
> Hey Alex
>
> On Tue, 2014-05-13 at 13:03 +0200, Alexander Aring wrote:
> > This was one year ago...
>
> The port (with only host support) is that old, but simply due to lack of
> time I haven't fixed the hacks in there. For example some delays need
> proper wait_on_timeout(), therefore a reference manual would be nice.
>
> I hope to find some time next weekend pushing the stuff to github or as
> a RFC-Patchset.
>
> Keep calm
>

thank you for your information.

In the meantime I will carry on with "my" musb-port (directly from linux kernel
3.13, because when I started with this task, I was not aware that it had already
been ported to the current U-Boot source).

But of course it would be nice to get another solution, which already works -
regardless if it's based on an older kernel version or not.

Best regards,
 Rolf

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-05-15 11:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 16:09 New driver crashes with "unable to handle paging request" Rolf Evers-Fischer
2014-04-24  6:58 ` Sascha Hauer
2014-04-24  8:52   ` Rolf Evers-Fischer
2014-04-30 14:08     ` Rolf Evers-Fischer
2014-05-01 22:50       ` Christoph Fritz
2014-05-05 12:13         ` Rolf Evers-Fischer
2014-05-12 12:57           ` Rolf Evers-Fischer
2014-05-13 11:03             ` Alexander Aring
2014-05-13 12:49               ` Christoph Fritz
2014-05-15 11:37                 ` Rolf Evers-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox