public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mvebu: use system controller to get the soc id when possible
Date: Fri, 20 Jun 2014 16:14:30 +0200	[thread overview]
Message-ID: <53A441C6.1040700@free-electrons.com> (raw)
In-Reply-To: <7626280.9GaTg8UqFK@wuerfel>

Hi Arnd,

On 20/06/2014 16:11, Arnd Bergmann wrote:
> On Friday 20 June 2014 16:06:14 Gregory CLEMENT wrote:
>> +int mvebu_systeme_controller_get_soc_id(u32 *dev, u32 *rev)
> 
> s/systeme/system/
> 
>> +{
>> +       if (of_machine_is_compatible("marvell,armada38x") &&
>> +               system_controller_base) {
>> +               *dev = readl(system_controller_base + mvebu_sc->dev_id) >> 16;
>> +               *rev = (readl(system_controller_base + mvebu_sc->rev_id) >> 8)
>> +                       & 0xF;
>> +               return 0;
>> +       } else
>> +               return -1;
>> +}
> 
> Better return a proper errno code here rather than -1. How about -ENODEV?

OK so I will also fix the mvebu_get_soc_id function


Thanks,

Gregory

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2014-06-20 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 14:06 [PATCH] ARM: mvebu: use system controller to get the soc id when possible Gregory CLEMENT
2014-06-20 14:11 ` Arnd Bergmann
2014-06-20 14:14   ` Gregory CLEMENT [this message]

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=53A441C6.1040700@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox