linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Matthew McClintock <msm@freescale.com>
To: Timur Tabi <timur.tabi@gmail.com>
Cc: kumar.gala@freescale.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/fsl_soc: Search all global-utilities nodes for rstccr
Date: Tue, 31 Aug 2010 11:26:19 -0500	[thread overview]
Message-ID: <09C49916-9A20-41CD-A7BA-2F467BFD24DA@freescale.com> (raw)
In-Reply-To: <AANLkTimYz6v2tMJRYnki9Ph33HL9yGsOcpgJ78LTDCTG@mail.gmail.com>


On Aug 28, 2010, at 5:34 PM, Timur Tabi wrote:

>> <msm@freescale.com> wrote:
>=20
>> +
>> +       for_each_node_by_name(np, "global-utilities") {
>> +               if ((of_get_property(np, "fsl,has-rstcr", NULL))) {
>> +                       rstcr =3D of_iomap(np, 0) + 0xb0;
>> +                       if (!rstcr)
>> +                               printk (KERN_EMERG "Error: reset =
control "
>=20
> I'm not sure KERN_EMERG is warranted for this kind of error.

I'm not sure either - I left it as it was before.

>=20
>> +                                               "register not =
mapped!\n");
>> +               }
>=20
> So if a node has an fsl,rstcr property, but the of_iomap() fails, we
> jump to the next global-utilities node?  Perhaps you need a 'break'
> after the printk()?

Or potentially a continue to be more robust? Or would two (or more) =
"has-rstcr" nodes be wrong?

>=20
>> +       }
>> +
>> +       if (!rstcr && ppc_md.restart =3D=3D fsl_rstcr_restart)
>=20
> Wouldn't it make more sense to assign fsl_rstcr_restart to
> ppc_md.restart only if we find a valid fsl,has-rstcr property?

Again I'm not entirely sure, I left this as it was before. Is there =
another way to reset the board if the rstcr node was not found =
correctly?

-M

>=20
> --=20
> Timur Tabi
> Linux kernel developer at Freescale
>=20

  reply	other threads:[~2010-08-31 16:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 21:55 [PATCH] powerpc/fsl_soc: Search all global-utilities nodes for rstccr Matthew McClintock
2010-08-28 22:34 ` Timur Tabi
2010-08-31 16:26   ` Matthew McClintock [this message]
2010-08-31 16:56     ` Timur Tabi
2010-08-31 22:44       ` [PATCH v2] " Matthew McClintock
2010-09-01 18:15         ` Timur Tabi
2010-10-07  6:10         ` Kumar Gala

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=09C49916-9A20-41CD-A7BA-2F467BFD24DA@freescale.com \
    --to=msm@freescale.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=timur.tabi@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).