* [GIT PULL] Renesas ARM Based SoC Updates for v4.1
@ 2015-02-26 6:22 Simon Horman
2015-02-26 6:22 ` [PATCH 1/5] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n Simon Horman
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Olof, Hi Kevin, Hi Arnd,
Please consider these Renesas ARM based SoC updates for v4.1.
Some of these changes are arguably cleanups and could have
been queued up in the soc-cleanups-for-v4.1 branch. However,
I am reluctant to reshuffle things between branches at this point.
The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539:
Linux 4.0-rc1 (2015-02-22 18:21:14 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v4.1
for you to fetch changes up to 72016d009e6bcf6cb6a289382bfc21185122b22e:
ARM: shmobile: r8a7740: Remove restart callback (2015-02-24 08:02:49 +0900)
----------------------------------------------------------------
Renesas ARM Based SoC Updates for v4.1
* Remove restart callback from r8a7740 SoC
* Add support SOC_BUS to R-Car Gen2
* Expose SoCs revision data for R-Car Gen2
* Remove check for CONFIG_COMMON_CLK from R-Car Gen2 code as it is always set
* Allow R-Car Gen2 platforms to boot with CMA enabled and HIGHMEM disabled
----------------------------------------------------------------
Geert Uytterhoeven (2):
ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set
ARM: shmobile: r8a7740: Remove restart callback
Magnus Damm (1):
ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n
Nobuhiro Iwamatsu (2):
ARM: shmobile: Add function to get SoCs revision data for R-Car Gen2
ARM: shmobile: Add support SOC_BUS to R-Car Gen2
arch/arm/mach-shmobile/Kconfig | 1 +
arch/arm/mach-shmobile/rcar-gen2.h | 1 +
arch/arm/mach-shmobile/setup-r8a7740.c | 8 -----
arch/arm/mach-shmobile/setup-r8a7790.c | 1 +
arch/arm/mach-shmobile/setup-r8a7791.c | 1 +
arch/arm/mach-shmobile/setup-r8a7794.c | 1 +
arch/arm/mach-shmobile/setup-rcar-gen2.c | 58 +++++++++++++++++++++++++++++---
7 files changed, 58 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/5] ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n
2015-02-26 6:22 [GIT PULL] Renesas ARM Based SoC Updates for v4.1 Simon Horman
@ 2015-02-26 6:22 ` Simon Horman
2015-02-26 6:22 ` [PATCH 2/5] ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set Simon Horman
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm+renesas@opensource.se>
Allow R-Car Gen2 platforms to boot with CMA enabled
and HIGHMEM disabled. This patch adds code to check
if the R-Car Gen2 specific memory reservation window
is included in the kernel memory range or not. When
HIGHMEM is disabled the R-Car Gen2 reservation area is
outside the kernel memory range and in such case the
memory reservation is simply skipped over.
Without this patch the kernel boot hangs when CMA is
enabled and HIGHMEM is disabled on the r8a7791 Koelsch
hardware platform:
WARNING: CPU: 1 PID: 1 at mm/cma.c:113 cma_init_reserved_areas+0x88/0x1d4()
...
WARNING: CPU: 1 PID: 1 at mm/cma.c:121 cma_init_reserved_areas+0xf8/0x1d4()
...
Unable to handle kernel NULL pointer dereference at virtual address 00000160
pgd = c0003000
[00000160] *pgd=80000040004003, *pmd=00000000
Internal error: Oops: 206 [#1] SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W
3.19.0-rc4-koelsch-01450-g7f9b6075ce12c3ea-dirty #735
Hardware name: Generic R8A7791 (Flattened Device Tree)
task: edc553c0 ti: edc56000 task.ti: edc56000
PC is at set_pfnblock_flags_mask+0x54/0xa0
LR is at 0x440
In the current shmobile_defconfig HIGHMEM is enabled
while CMA is disabled, so to trigger this the kernel
configuration for both CMA and HIGHMEM needs to be
adjusted.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index d1fa625..8c7ec93 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -21,6 +21,7 @@
#include <linux/dma-contiguous.h>
#include <linux/io.h>
#include <linux/kernel.h>
+#include <linux/memblock.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <asm/mach/arch.h>
@@ -199,7 +200,7 @@ void __init rcar_gen2_reserve(void)
of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
#ifdef CONFIG_DMA_CMA
- if (mrc.size)
+ if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size))
dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
&rcar_gen2_dma_contiguous, true);
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/5] ARM: shmobile: R-Car Gen2: CONFIG_COMMON_CLK is always set
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 ` 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
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Since commit e042681894b62d60 ("ARM: shmobile: r8a7790: Remove legacy
code"), all R-Car Gen2 SoCs are supported by multiplatform kernels only.
As CONFIG_COMMON_CLK is always set for multiplatform kernels, we can
remove related #ifdefs in code specific to R-Car Gen2 SoCs.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-rcar-gen2.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 8c7ec93..5d13595 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -51,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
void __init rcar_gen2_timer_init(void)
{
-#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
u32 mode = rcar_gen2_read_mode_pins();
-#endif
#ifdef CONFIG_ARM_ARCH_TIMER
void __iomem *base;
int extal_mhz = 0;
@@ -129,9 +127,7 @@ void __init rcar_gen2_timer_init(void)
iounmap(base);
#endif /* CONFIG_ARM_ARCH_TIMER */
-#ifdef CONFIG_COMMON_CLK
rcar_gen2_clocks_init(mode);
-#endif
#ifdef CONFIG_ARCH_SHMOBILE_MULTI
clocksource_of_init();
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/5] ARM: shmobile: Add function to get SoCs revision data for R-Car Gen2
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 ` Simon Horman
2015-02-26 6:22 ` [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to " Simon Horman
2015-02-26 6:22 ` [PATCH 5/5] ARM: shmobile: r8a7740: Remove restart callback Simon Horman
4 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
SoCs of R-Car Gen2 have some revision. This adds function to get SoCs revision
data, and change so that user can confirm from /proc/cpuinfo.
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/rcar-gen2.h | 1 +
arch/arm/mach-shmobile/setup-r8a7790.c | 1 +
arch/arm/mach-shmobile/setup-r8a7791.c | 1 +
arch/arm/mach-shmobile/setup-r8a7794.c | 1 +
arch/arm/mach-shmobile/setup-rcar-gen2.c | 21 +++++++++++++++++++++
5 files changed, 25 insertions(+)
diff --git a/arch/arm/mach-shmobile/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h
index ce53cb5..b232956 100644
--- a/arch/arm/mach-shmobile/rcar-gen2.h
+++ b/arch/arm/mach-shmobile/rcar-gen2.h
@@ -5,5 +5,6 @@ void rcar_gen2_timer_init(void);
#define MD(nr) BIT(nr)
u32 rcar_gen2_read_mode_pins(void);
void rcar_gen2_reserve(void);
+void __init rcar_gen2_init_machine(void);
#endif /* __ASM_RCAR_GEN2_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 3a18af4..8d26ab0 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -30,6 +30,7 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = {
DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
.smp = smp_ops(r8a7790_smp_ops),
.init_early = shmobile_init_delay,
+ .init_machine = rcar_gen2_init_machine,
.init_time = rcar_gen2_timer_init,
.init_late = shmobile_init_late,
.reserve = rcar_gen2_reserve,
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
index ef8eb3a..c528b0f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7791.c
+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
@@ -33,6 +33,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
.init_early = shmobile_init_delay,
.init_time = rcar_gen2_timer_init,
.init_late = shmobile_init_late,
+ .init_machine = rcar_gen2_init_machine,
.reserve = rcar_gen2_reserve,
.dt_compat = r8a7791_boards_compat_dt,
MACHINE_END
diff --git a/arch/arm/mach-shmobile/setup-r8a7794.c b/arch/arm/mach-shmobile/setup-r8a7794.c
index d2b0930..eb86656 100644
--- a/arch/arm/mach-shmobile/setup-r8a7794.c
+++ b/arch/arm/mach-shmobile/setup-r8a7794.c
@@ -27,6 +27,7 @@ static const char * const r8a7794_boards_compat_dt[] __initconst = {
DT_MACHINE_START(R8A7794_DT, "Generic R8A7794 (Flattened Device Tree)")
.init_early = shmobile_init_delay,
.init_late = shmobile_init_late,
+ .init_machine = rcar_gen2_init_machine,
.init_time = rcar_gen2_timer_init,
.reserve = rcar_gen2_reserve,
.dt_compat = r8a7794_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 5d13595..6f290a8 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -4,6 +4,7 @@
* Copyright (C) 2013 Renesas Solutions Corp.
* Copyright (C) 2013 Magnus Damm
* Copyright (C) 2014 Ulrich Hecht
+ * Copyright (C) 2015 Nobuhiro Iwamatsu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +25,8 @@
#include <linux/memblock.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
+#include <linux/of_platform.h>
+#include <asm/system_info.h>
#include <asm/mach/arch.h>
#include "common.h"
#include "rcar-gen2.h"
@@ -201,3 +204,21 @@ void __init rcar_gen2_reserve(void)
&rcar_gen2_dma_contiguous, true);
#endif
}
+
+#define PRR 0xFF000044
+static unsigned int __init rcar_gen2_get_cut(void)
+{
+ void __iomem *addr = ioremap_nocache(PRR, 4);
+ u32 data = ioread32(addr);
+
+ iounmap(addr);
+
+ return (data & 0xFF) + 0x10;
+}
+
+void __init rcar_gen2_init_machine(void)
+{
+ system_rev = rcar_gen2_get_cut();
+
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-26 6:22 [GIT PULL] Renesas ARM Based SoC Updates for v4.1 Simon Horman
` (2 preceding siblings ...)
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 ` Simon Horman
2015-02-26 15:53 ` Arnd Bergmann
2015-02-26 6:22 ` [PATCH 5/5] ARM: shmobile: r8a7740: Remove restart callback Simon Horman
4 siblings, 1 reply; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
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(-)
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 2f36c85..a7f5ab5 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -19,6 +19,7 @@ config ARCH_RCAR_GEN2
bool
select PM_RCAR if PM || SMP
select RENESAS_IRQC
+ select SOC_BUS
select SYS_SUPPORTS_SH_CMT
select PCI_DOMAINS if PCI
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 6f290a8..9cc2a90 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -26,6 +26,8 @@
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
+#include <linux/slab.h>
+#include <linux/sys_soc.h>
#include <asm/system_info.h>
#include <asm/mach/arch.h>
#include "common.h"
@@ -206,19 +208,47 @@ void __init rcar_gen2_reserve(void)
}
#define PRR 0xFF000044
-static unsigned int __init rcar_gen2_get_cut(void)
+static u32 __init rcar_gen2_get_prr(void)
{
void __iomem *addr = ioremap_nocache(PRR, 4);
u32 data = ioread32(addr);
iounmap(addr);
- return (data & 0xFF) + 0x10;
+ return data;
}
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();
+ soc_dev_attr->family = kasprintf(GFP_KERNEL, "Renesas R-Car Gen2");
+ soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u",
+ system_rev >> 4, system_rev & 0xF);
+ soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%04x",
+ (prr & 0x7F00) >> 8);
+
+ soc_dev = soc_device_register(soc_dev_attr);
+ if (IS_ERR(soc_dev)) {
+ kfree(soc_dev_attr->family);
+ kfree(soc_dev_attr->revision);
+ kfree(soc_dev_attr->soc_id);
+ kfree(soc_dev_attr);
+ goto out;
+ }
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+ parent = soc_device_to_device(soc_dev);
+out:
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/5] ARM: shmobile: r8a7740: Remove restart callback
2015-02-26 6:22 [GIT PULL] Renesas ARM Based SoC Updates for v4.1 Simon Horman
` (3 preceding siblings ...)
2015-02-26 6:22 ` [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to " Simon Horman
@ 2015-02-26 6:22 ` Simon Horman
4 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-02-26 6:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
Remove the restart handling hack from the r8a7740 generic multiplatform
case.
Restart on DT-based r8a7740 platforms is now handled through the
R-Mobile reset driver.
This reverts commit 1174c712afa2779f ("ARM: shmobile: r8a7740: Add
restart callback").
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7740.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index dd64caf..9832e48 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -842,13 +842,6 @@ static void __init r8a7740_generic_init(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
-#define RESCNT2 IOMEM(0xe6188020)
-static void r8a7740_restart(enum reboot_mode mode, const char *cmd)
-{
- /* Do soft power on reset */
- writel(1 << 31, RESCNT2);
-}
-
static const char *r8a7740_boards_compat_dt[] __initdata = {
"renesas,r8a7740",
NULL,
@@ -861,7 +854,6 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
.init_machine = r8a7740_generic_init,
.init_late = shmobile_init_late,
.dt_compat = r8a7740_boards_compat_dt,
- .restart = r8a7740_restart,
MACHINE_END
#endif /* CONFIG_USE_OF */
--
2.1.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-26 6:22 ` [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to " Simon Horman
@ 2015-02-26 15:53 ` Arnd Bergmann
2015-02-27 0:52 ` Simon Horman
0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2015-02-26 15:53 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-26 15:53 ` Arnd Bergmann
@ 2015-02-27 0:52 ` Simon Horman
2015-02-27 9:00 ` Arnd Bergmann
0 siblings, 1 reply; 12+ messages in thread
From: Simon Horman @ 2015-02-27 0:52 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Thu, Feb 26, 2015 at 04:53:39PM +0100, Arnd Bergmann wrote:
> 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.
Could we handle this as follow-up work?
> > 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
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-27 0:52 ` Simon Horman
@ 2015-02-27 9:00 ` Arnd Bergmann
2015-02-27 10:41 ` Geert Uytterhoeven
2015-03-01 1:52 ` Simon Horman
0 siblings, 2 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-02-27 9:00 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 27 February 2015 09:52:23 Simon Horman wrote:
>
> On Thu, Feb 26, 2015 at 04:53:39PM +0100, Arnd Bergmann wrote:
> > 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.
>
> Could we handle this as follow-up work?
That was my first idea when I looked at patch 3, but then I had the other
comment below:
> I would not duplicate that information here. Can you find out the SoC
> name from registers and put it here?
We must not introduce the user interface in one kernel and then change
it in the next one, so I'm cautious about taking the pull request in
the current form. Once we have agreed on what the contents of the sysfs
files should be, I can take the patches, and then we are free to move
the implementation later.
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
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
1 sibling, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2015-02-27 10:41 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Fri, Feb 27, 2015 at 10:00 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 27 February 2015 09:52:23 Simon Horman wrote:
>>
>> On Thu, Feb 26, 2015 at 04:53:39PM +0100, Arnd Bergmann wrote:
>> > 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.
>>
>> Could we handle this as follow-up work?
>
> That was my first idea when I looked at patch 3, but then I had the other
> comment below:
>
>> > > + 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?
>
> We must not introduce the user interface in one kernel and then change
> it in the next one, so I'm cautious about taking the pull request in
> the current form. Once we have agreed on what the contents of the sysfs
> files should be, I can take the patches, and then we are free to move
> the implementation later.
Currently machine contains e.g. "Koelsch", which is the name of the board,
not of the SoC.
We can derive the SoC name from soc_id, e.g. 0x47 = "R-Car M2-W".
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-27 10:41 ` Geert Uytterhoeven
@ 2015-02-27 13:44 ` Arnd Bergmann
0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2015-02-27 13:44 UTC (permalink / raw)
To: linux-arm-kernel
On Friday 27 February 2015 11:41:04 Geert Uytterhoeven wrote:
> > We must not introduce the user interface in one kernel and then change
> > it in the next one, so I'm cautious about taking the pull request in
> > the current form. Once we have agreed on what the contents of the sysfs
> > files should be, I can take the patches, and then we are free to move
> > the implementation later.
>
> Currently machine contains e.g. "Koelsch", which is the name of the board,
> not of the SoC.
>
> We can derive the SoC name from soc_id, e.g. 0x47 = "R-Car M2-W".
>
Yes, I think that would be best.
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/5] ARM: shmobile: Add support SOC_BUS to R-Car Gen2
2015-02-27 9:00 ` Arnd Bergmann
2015-02-27 10:41 ` Geert Uytterhoeven
@ 2015-03-01 1:52 ` Simon Horman
1 sibling, 0 replies; 12+ messages in thread
From: Simon Horman @ 2015-03-01 1:52 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 27, 2015 at 10:00:04AM +0100, Arnd Bergmann wrote:
> On Friday 27 February 2015 09:52:23 Simon Horman wrote:
> >
> > On Thu, Feb 26, 2015 at 04:53:39PM +0100, Arnd Bergmann wrote:
> > > 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.
> >
> > Could we handle this as follow-up work?
>
> That was my first idea when I looked at patch 3, but then I had the other
> comment below:
>
> > I would not duplicate that information here. Can you find out the SoC
> > name from registers and put it here?
>
> We must not introduce the user interface in one kernel and then change
> it in the next one, so I'm cautious about taking the pull request in
> the current form. Once we have agreed on what the contents of the sysfs
> files should be, I can take the patches, and then we are free to move
> the implementation later.
Thanks for the clarification. Accordingly I'd like to withdraw this pull
request: I will drop these patches.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-01 1:52 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).