public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
Date: Thu, 26 Feb 2015 16:53:39 +0100	[thread overview]
Message-ID: <8723510.YP2sm4Z5UY@wuerfel> (raw)
In-Reply-To: <3a8e2822e1351c0ef8f9dd1c3e81cd5bfeb319e5.1424931398.git.horms+renesas@verge.net.au>

On Thursday 26 February 2015 15:22:44 Simon Horman wrote:
> From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> 
> This provides information through SOC_BUS to sysfs.
> And this moves all on-SoC devices from /sys/devices/platform to
> /sys/devices/socX/.
> 
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  arch/arm/mach-shmobile/Kconfig           |  1 +
>  arch/arm/mach-shmobile/setup-rcar-gen2.c | 38 ++++++++++++++++++++++++++++----
>  2 files changed, 35 insertions(+), 4 deletions(-)

I think this would be better done as a standalone driver in drivers/soc,
to avoid having to add the init_machine callbacks in patch 3.


>  void __init rcar_gen2_init_machine(void)
>  {
> -	system_rev = rcar_gen2_get_cut();
> +	struct soc_device_attribute *soc_dev_attr;
> +	struct soc_device *soc_dev;
> +	struct device *parent = NULL;
> +	u32 prr;
> +
> +	soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
> +	if (!soc_dev_attr)
> +		goto out;
> +
> +	prr = rcar_gen2_get_prr();
> +	system_rev = (prr & 0xFF) + 0x10;
> +
> +	soc_dev_attr->machine = of_flat_dt_get_machine_name();

I would not duplicate that information here. Can you find out the SoC
name from registers and put it here?

	ARnd

  reply	other threads:[~2015-02-26 15:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26  6:22 [GIT PULL] Renesas ARM Based SoC Updates for v4.1 Simon Horman
2015-02-26  6:22 ` [PATCH 1/5] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Simon Horman
2015-02-26  6:22 ` [PATCH 2/5] ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set Simon Horman
2015-02-26  6:22 ` [PATCH 3/5] ARM: shmobile: Add function to get SoCs revision data for R-Car Gen2 Simon Horman
2015-02-26  6:22 ` [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to " Simon Horman
2015-02-26 15:53   ` Arnd Bergmann [this message]
2015-02-27  0:52     ` Simon Horman
2015-02-27  9:00       ` Arnd Bergmann
2015-02-27 10:41         ` Geert Uytterhoeven
2015-02-27 13:44           ` Arnd Bergmann
2015-03-01  1:52         ` Simon Horman
2015-02-26  6:22 ` [PATCH 5/5] ARM: shmobile: r8a7740: Remove restart callback Simon Horman

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=8723510.YP2sm4Z5UY@wuerfel \
    --to=arnd@arndb.de \
    --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