All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Walter Lozano <wlozano@collabora.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Johan Jonker <jbx6244@gmail.com>,
	 Walter Lozano <walter.lozano@collabora.com>
Subject: Re: [PATCH 8/8] dtoc: Update documentation to cover warnings in more detail
Date: Tue, 20 Jul 2021 12:32:45 -0600	[thread overview]
Message-ID: <CAPnjgZ0ivZz_17qqa5rqsLwaJaXRnX7ThfOUWYWAX0dhhcMXjg@mail.gmail.com> (raw)
In-Reply-To: <09013b1e-833d-73ca-53c4-d9f0215cf7bc@collabora.com>

Hi Walter,

On Mon, 5 Jul 2021 at 12:04, Walter Lozano <wlozano@collabora.com> wrote:
>
> Hi Simon,
>
> On 7/4/21 3:19 PM, Simon Glass wrote:
> > When things go wrong it can be confusing to figure out what to change.
> > Add a few more details to the documentation.
> >
> > Fix a 'make htmldocs' warning while we are here.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >   doc/develop/driver-model/of-plat.rst | 53 ++++++++++++++++++++++++++++
> >   1 file changed, 53 insertions(+)
> >
> > diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/driver-model/of-plat.rst
> > index 74f1932473b..e2763965839 100644
> > --- a/doc/develop/driver-model/of-plat.rst
> > +++ b/doc/develop/driver-model/of-plat.rst
> > @@ -597,6 +597,59 @@ as a macro included in the driver definition::
> >
> >
> >
> > +Problems
> > +--------
> > +
> > +In some cases you will you see something like this::
> > +
> > +   WARNING: the driver rockchip_rk3188_grf was not found in the driver list
> > +
> > +The driver list is a list of drivers, each with a name. The name is in the
> > +U_BOOT_DRIVER() declaration, repeated twice, one in brackets and once as the
> > +.name member. For example, in the following declaration the driver name is
> > +`rockchip_rk3188_grf`::
> > +
> > +  U_BOOT_DRIVER(rockchip_rk3188_grf) = {
> > +       .name = "rockchip_rk3188_grf",
> > +       .id = UCLASS_SYSCON,
> > +       .of_match = rk3188_syscon_ids + 1,
> > +       .bind = rk3188_syscon_bind_of_plat,
> > +  };
> > +
> > +The first name U_BOOT_DRIVER(xx) is used to create a linker symbol so that the
> > +driver can be accessed at build-time without any overhead. The second one
> > +(.name = "xx") is used at runtime when something wants to print out the driver
> > +name.
> > +
> > +The dtoc tool expects to be able to find a driver for each compatible string in
> > +the devicetree. For example, if the devicetree has::
> > +
> > +   grf: grf@20008000 {
> > +      compatible = "rockchip,rk3188-grf", "syscon";
> > +      reg = <0x20008000 0x200>;
> > +      u-boot,dm-spl;
> > +   };
> > +
> > +then dtoc looks at the first compatible string ("rockchip,rk3188-grf"),
> > +converts that to a C identifier (rockchip_rk3188_grf) and then looks for that.
> > +
> > +Various things can cause dtoc to fail to find the driver and it tries to
> > +warn about these. For example:
> > +
> > +   rockchip_rk3188_uart: Missing .compatible in drivers/serial/serial_rockchip.c
> > +                    : WARNING: the driver rockchip_rk3188_uart was not found in the driver list
> > +
> > +Without a compatible string a driver cannot be used by dtoc, even if the
> > +compatible string is not actually needed at runtime.
> > +
> > +If the problem is simply that there are multiple compatible strings, the
> > +DM_DRIVER_ALIAS() macro can be used to tell dtoc about this and avoid a problem.
> > +
> > +Checks are also made the referenced driver has a .compatible member and a .id
> > +member. The first provides the array of compatible strings and the second
> > +provides the uclass ID.
> > +
>
> This paragraph sound strange, maybe
>
> "Checks are are also made to confirm that the referenced driver..."
>
> but your English is better than mine.
>
> Reviewed-by: Walter Lozano <walter.lozano@collabora.com>

Thanks, I fixed this when applying.


- Simon

  reply	other threads:[~2021-07-20 18:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 18:19 [PATCH 0/8] dtoc: Improvements to warnings Simon Glass
2021-07-04 18:19 ` [PATCH 1/8] dtoc: Avoid using subscripts on match objects Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 2/8] dtoc: Convert to use ArgumentParser Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 3/8] dtoc: Allow multiple warnings for a driver Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-12  2:23     ` Simon Glass
2021-07-04 18:19 ` [PATCH 4/8] dtoc: Correct the re_compat regular expression Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 5/8] dtoc: Add a stdout check in test_normalized_name() Simon Glass
2021-07-04 18:19 ` [PATCH 6/8] dtoc: Detect unexpected suffix on .of_match Simon Glass
2021-07-04 18:19 ` [PATCH 7/8] dtoc: Detect drivers which do not parse correctly Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-11 23:00   ` Simon Glass
2021-07-04 18:19 ` [PATCH 8/8] dtoc: Update documentation to cover warnings in more detail Simon Glass
2021-07-05 18:04   ` Walter Lozano
2021-07-20 18:32     ` Simon Glass [this message]
2021-07-11 23:00   ` Simon Glass
2021-07-11 23:00 ` [PATCH 6/8] dtoc: Detect unexpected suffix on .of_match Simon Glass
2021-07-11 23:00 ` [PATCH 5/8] dtoc: Add a stdout check in test_normalized_name() Simon Glass

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=CAPnjgZ0ivZz_17qqa5rqsLwaJaXRnX7ThfOUWYWAX0dhhcMXjg@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=jbx6244@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=walter.lozano@collabora.com \
    --cc=wlozano@collabora.com \
    /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.