All of lore.kernel.org
 help / color / mirror / Atom feed
* m68k hangs silently
@ 2020-02-19 14:38 Angelo Dureghello
  2020-02-19 21:21 ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: Angelo Dureghello @ 2020-02-19 14:38 UTC (permalink / raw)
  To: u-boot

Hi Simon,

after this commit:

commit 29f7d05a347ab7a42577c67fdfb787ef91537302
Author: Simon Glass <sjg@chromium.org>
Date:   Sun Dec 29 21:19:17 2019 -0700

    dm: core: Move ofdata_to_platdata() call earlier

    This method is supposed to extract platform data from the device tree. It
    should be done before the device itself is probed. Move it earlier in the
    device_probe() function.

    Signed-off-by: Simon Glass <sjg@chromium.org>

stmark2 (mcf5441x based board) hangs silently.

I am debugging into this, since seems to be something wrong in my arch
files, or related dm drivers, but if you have any hint about where to
look, welcome.

Regards,
-- 
Angelo Dureghello
Timesys
e. angelo.dureghello at timesys.com

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

* m68k hangs silently
  2020-02-19 14:38 m68k hangs silently Angelo Dureghello
@ 2020-02-19 21:21 ` Simon Glass
  2020-02-28 23:04   ` Angelo Dureghello
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2020-02-19 21:21 UTC (permalink / raw)
  To: u-boot

Hi Angelo,

On Wed, 19 Feb 2020 at 07:36, Angelo Dureghello
<angelo.dureghello@timesys.com> wrote:
>
> Hi Simon,
>
> after this commit:
>
> commit 29f7d05a347ab7a42577c67fdfb787ef91537302
> Author: Simon Glass <sjg@chromium.org>
> Date:   Sun Dec 29 21:19:17 2019 -0700
>
>     dm: core: Move ofdata_to_platdata() call earlier
>
>     This method is supposed to extract platform data from the device tree. It
>     should be done before the device itself is probed. Move it earlier in the
>     device_probe() function.
>
>     Signed-off-by: Simon Glass <sjg@chromium.org>
>
> stmark2 (mcf5441x based board) hangs silently.
>
> I am debugging into this, since seems to be something wrong in my arch
> files, or related dm drivers, but if you have any hint about where to
> look, welcome.

Good to have a JTAG debugger or at least a working DEBUG_UART.

It could be that you have one device relying on another's ofdata, but
the reading of it is in the probe() method instead of
ofdata_to_platdata().

Also make sure you have proper error checking in these methods since
silent failure (e.g. to read an address) can cause invalid data to be
used by the driver.

You can also enable CONFIG_LOG_ERROR_RETURN if you are using log_ret()
or log_msg_ret() in your drivers.

I can't actually even find the serial driver for m68k so I don't think
I will be much help...

Regards,
Simon

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

* m68k hangs silently
  2020-02-19 21:21 ` Simon Glass
@ 2020-02-28 23:04   ` Angelo Dureghello
  0 siblings, 0 replies; 3+ messages in thread
From: Angelo Dureghello @ 2020-02-28 23:04 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Wed, Feb 19, 2020 at 10:21 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Angelo,
>
> On Wed, 19 Feb 2020 at 07:36, Angelo Dureghello
> <angelo.dureghello@timesys.com> wrote:
> >
> > Hi Simon,
> >
> > after this commit:
> >
> > commit 29f7d05a347ab7a42577c67fdfb787ef91537302
> > Author: Simon Glass <sjg@chromium.org>
> > Date:   Sun Dec 29 21:19:17 2019 -0700
> >
> >     dm: core: Move ofdata_to_platdata() call earlier
> >
> >     This method is supposed to extract platform data from the device tree. It
> >     should be done before the device itself is probed. Move it earlier in the
> >     device_probe() function.
> >
> >     Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> > stmark2 (mcf5441x based board) hangs silently.
> >
> > I am debugging into this, since seems to be something wrong in my arch
> > files, or related dm drivers, but if you have any hint about where to
> > look, welcome.
>
> Good to have a JTAG debugger or at least a working DEBUG_UART.
>
> It could be that you have one device relying on another's ofdata, but
> the reading of it is in the probe() method instead of
> ofdata_to_platdata().
>
> Also make sure you have proper error checking in these methods since
> silent failure (e.g. to read an address) can cause invalid data to be
> used by the driver.
>
> You can also enable CONFIG_LOG_ERROR_RETURN if you are using log_ret()
> or log_msg_ret() in your drivers.
>
> I can't actually even find the serial driver for m68k so I don't think
> I will be much help...
>
> Regards,
> Simon


thanks, so, just for y i.
Looks like the issue is that my driver (mcfuart.c) uses "dev->seq"
to deduce uart port is 0. And dev->seq after your commit above is
now -1 (it was 0).

So, looks like dev->seq can't be used now from  _ofdata_to_platdata,
where i was assigning

plat->port = dev->seq;

Will fix this in the driver.

Regards,
Angelo

-- 
Angelo Dureghello
Timesys
e. angelo.dureghello at timesys.com

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

end of thread, other threads:[~2020-02-28 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 14:38 m68k hangs silently Angelo Dureghello
2020-02-19 21:21 ` Simon Glass
2020-02-28 23:04   ` Angelo Dureghello

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.