* [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
@ 2014-05-01 10:44 Sachin Kamat
2014-05-01 10:44 ` [PATCH 2/2] Documentation: DT: Exynos: Bind SRAM though DT Sachin Kamat
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-01 10:44 UTC (permalink / raw)
To: linux-samsung-soc
Cc: linux-arm-kernel, devicetree, arnd, t.figa, kgene.kim, robh+dt,
sachin.kamat, Heiko Stuebner
Instead of hardcoding the SYSRAM details for each SoC,
pass this information through device tree (DT) and make
the code SoC agnostic. Generic SRAM bindings are used
for achieving this.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Arnd Bergmann <arnd@arndb.de>
---
This patch is based on linux next (next-20140501) on top of
my Kconfig consolidation patch
http://comments.gmane.org/gmane.linux.kernel.samsung-soc/28642
Tested on 4210/4412 Origen, 5250/5420 Arndale and SMDK5420 boards.
---
arch/arm/Kconfig | 1 +
arch/arm/boot/dts/exynos4210-universal_c210.dts | 17 ++++++
arch/arm/boot/dts/exynos4210.dtsi | 18 +++++++
arch/arm/boot/dts/exynos4x12.dtsi | 18 +++++++
arch/arm/boot/dts/exynos5250.dtsi | 18 +++++++
arch/arm/boot/dts/exynos5420.dtsi | 18 +++++++
arch/arm/mach-exynos/common.h | 1 +
arch/arm/mach-exynos/exynos.c | 64 -----------------------
arch/arm/mach-exynos/firmware.c | 5 +-
arch/arm/mach-exynos/include/mach/map.h | 7 ---
arch/arm/mach-exynos/platsmp.c | 39 +++++++++++++-
11 files changed, 133 insertions(+), 73 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a6aaaad19b1a..f66ea9453df9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -855,6 +855,7 @@ config ARCH_EXYNOS
select S5P_DEV_MFC
select SAMSUNG_DMADEV
select SPARSE_IRQ
+ select SRAM
select USE_OF
help
Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index 63e34b24b04f..8d4de5c0d0c7 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -28,6 +28,23 @@
bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw rootwait earlyprintk panic=5 maxcpus=1";
};
+ sram@02020000 {
+ status = "disabled";
+ };
+
+ sram@02025000 {
+ compatible = "mmio-sram";
+ reg = <0x02025000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02025000 0x1000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+ };
+
mct@10050000 {
compatible = "none";
};
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index cacf6140dd2f..d3d727b0c263 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -31,6 +31,24 @@
pinctrl2 = &pinctrl_2;
};
+ sram@02020000 {
+ compatible = "mmio-sram";
+ reg = <0x02020000 0x20000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02020000 0x20000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+
+ smp-sram@1f000 {
+ compatible = "samsung,exynos4210-sram-ns";
+ reg = <0x1f000 0x1000>;
+ };
+ };
+
pd_lcd1: lcd1-power-domain@10023CA0 {
compatible = "samsung,exynos4210-pd";
reg = <0x10023CA0 0x20>;
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index c4a9306f8529..75fb3e7e3999 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -37,6 +37,24 @@
interrupts = <2 2>, <3 2>, <18 2>, <19 2>;
};
+ sram@02020000 {
+ compatible = "mmio-sram";
+ reg = <0x02020000 0x40000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02020000 0x40000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+
+ smp-sram@2f000 {
+ compatible = "samsung,exynos4210-sram-ns";
+ reg = <0x2f000 0x1000>;
+ };
+ };
+
pd_isp: isp-power-domain@10023CA0 {
compatible = "samsung,exynos4210-pd";
reg = <0x10023CA0 0x20>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 37423314a028..8d724d56a5c6 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -72,6 +72,24 @@
};
};
+ sram@02020000 {
+ compatible = "mmio-sram";
+ reg = <0x02020000 0x30000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02020000 0x30000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+
+ smp-sram@2f000 {
+ compatible = "samsung,exynos4210-sram-ns";
+ reg = <0x2f000 0x1000>;
+ };
+ };
+
pd_gsc: gsc-power-domain@10044000 {
compatible = "samsung,exynos4210-pd";
reg = <0x10044000 0x20>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index c3a9a66c5767..ff496adfabde 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -110,6 +110,24 @@
};
};
+ sram@02020000 {
+ compatible = "mmio-sram";
+ reg = <0x02020000 0x54000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02020000 0x54000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+
+ smp-sram@53000 {
+ compatible = "samsung,exynos4210-sram-ns";
+ reg = <0x53000 0x1000>;
+ };
+ };
+
clock: clock-controller@10010000 {
compatible = "samsung,exynos5420-clock";
reg = <0x10010000 0x30000>;
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 9ef3f83efaff..47cbab0f008e 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -18,6 +18,7 @@
void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
struct map_desc;
+extern void __iomem *sram_ns_base_addr;
void exynos_init_io(void);
void exynos_restart(enum reboot_mode mode, const char *cmd);
void exynos_cpuidle_init(void);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 77293d39dfc9..556d148e6413 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -114,51 +114,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
},
};
-static struct map_desc exynos4_iodesc0[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SYSRAM,
- .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM0),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
-static struct map_desc exynos4_iodesc1[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SYSRAM,
- .pfn = __phys_to_pfn(EXYNOS4_PA_SYSRAM1),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
-static struct map_desc exynos4210_iodesc[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
- .pfn = __phys_to_pfn(EXYNOS4210_PA_SYSRAM_NS),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
-static struct map_desc exynos4x12_iodesc[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
- .pfn = __phys_to_pfn(EXYNOS4x12_PA_SYSRAM_NS),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
-static struct map_desc exynos5250_iodesc[] __initdata = {
- {
- .virtual = (unsigned long)S5P_VA_SYSRAM_NS,
- .pfn = __phys_to_pfn(EXYNOS5250_PA_SYSRAM_NS),
- .length = SZ_4K,
- .type = MT_DEVICE,
- },
-};
-
static struct map_desc exynos5_iodesc[] __initdata = {
{
.virtual = (unsigned long)S3C_VA_SYS,
@@ -181,11 +136,6 @@ static struct map_desc exynos5_iodesc[] __initdata = {
.length = SZ_4K,
.type = MT_DEVICE,
}, {
- .virtual = (unsigned long)S5P_VA_SYSRAM,
- .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM),
- .length = SZ_4K,
- .type = MT_DEVICE,
- }, {
.virtual = (unsigned long)S5P_VA_CMU,
.pfn = __phys_to_pfn(EXYNOS5_PA_CMU),
.length = 144 * SZ_1K,
@@ -280,20 +230,6 @@ static void __init exynos_map_io(void)
if (soc_is_exynos5())
iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc));
-
- if (soc_is_exynos4210()) {
- if (samsung_rev() == EXYNOS4210_REV_0)
- iotable_init(exynos4_iodesc0,
- ARRAY_SIZE(exynos4_iodesc0));
- else
- iotable_init(exynos4_iodesc1,
- ARRAY_SIZE(exynos4_iodesc1));
- iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc));
- }
- if (soc_is_exynos4212() || soc_is_exynos4412())
- iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc));
- if (soc_is_exynos5250())
- iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc));
}
void __init exynos_init_io(void)
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 932129ef26c6..455e7802e52e 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -18,6 +18,7 @@
#include <mach/map.h>
+#include "common.h"
#include "smc.h"
static int exynos_do_idle(void)
@@ -34,7 +35,9 @@ static int exynos_cpu_boot(int cpu)
static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
{
- void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu;
+ void __iomem *boot_reg;
+
+ boot_reg = sram_ns_base_addr + 0x1c + 4*cpu;
__raw_writel(boot_addr, boot_reg);
return 0;
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index 7b046b59d9ec..548269a60634 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -23,13 +23,6 @@
#include <plat/map-s5p.h>
-#define EXYNOS4_PA_SYSRAM0 0x02025000
-#define EXYNOS4_PA_SYSRAM1 0x02020000
-#define EXYNOS5_PA_SYSRAM 0x02020000
-#define EXYNOS4210_PA_SYSRAM_NS 0x0203F000
-#define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000
-#define EXYNOS5250_PA_SYSRAM_NS 0x0204F000
-
#define EXYNOS_PA_CHIPID 0x10000000
#define EXYNOS4_PA_SYSCON 0x10010000
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 03e5e9f94705..4315b4821361 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -20,6 +20,7 @@
#include <linux/jiffies.h>
#include <linux/smp.h>
#include <linux/io.h>
+#include <linux/of_address.h>
#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
@@ -33,11 +34,41 @@
extern void exynos4_secondary_startup(void);
+static void __iomem *sram_base_addr;
+void __iomem *sram_ns_base_addr;
+
+static int __init exynos_smp_prepare_sram(void)
+{
+ struct device_node *node;
+
+ node = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-sram");
+ if (!node)
+ return -ENODEV;
+
+ sram_base_addr = of_iomap(node, 0);
+ if (!sram_base_addr) {
+ pr_err("Secondary CPU boot address not found\n");
+ return -ENODEV;
+ }
+
+ node = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-sram-ns");
+ if (!node)
+ return -ENODEV;
+
+ sram_ns_base_addr = of_iomap(node, 0);
+ if (!sram_ns_base_addr) {
+ pr_err("Secondary CPU boot address not found\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
static inline void __iomem *cpu_boot_reg_base(void)
{
if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
return S5P_INFORM5;
- return S5P_VA_SYSRAM;
+ return sram_base_addr;
}
static inline void __iomem *cpu_boot_reg(int cpu)
@@ -91,6 +122,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
unsigned long timeout;
unsigned long phys_cpu = cpu_logical_map(cpu);
+ if (!cpu_boot_reg_base())
+ return -EINVAL;
+
/*
* Set synchronisation state between this boot processor
* and the secondary one
@@ -205,6 +239,9 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
scu_enable(scu_base_addr());
+ if (exynos_smp_prepare_sram())
+ return;
+
/*
* Write the address of secondary startup into the
* system-wide flags register. The boot monitor waits
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] Documentation: DT: Exynos: Bind SRAM though DT
2014-05-01 10:44 [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Sachin Kamat
@ 2014-05-01 10:44 ` Sachin Kamat
2014-05-01 13:27 ` [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Heiko Stübner
2014-05-01 13:32 ` Arnd Bergmann
2 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-01 10:44 UTC (permalink / raw)
To: linux-samsung-soc
Cc: linux-arm-kernel, devicetree, arnd, t.figa, kgene.kim, robh+dt,
sachin.kamat
Add SRAM binding documentation.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
.../devicetree/bindings/arm/exynos/smp-sram.txt | 38 ++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/exynos/smp-sram.txt
diff --git a/Documentation/devicetree/bindings/arm/exynos/smp-sram.txt b/Documentation/devicetree/bindings/arm/exynos/smp-sram.txt
new file mode 100644
index 000000000000..9969ca22b6af
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/exynos/smp-sram.txt
@@ -0,0 +1,38 @@
+Samsung Exynos SRAM for SMP bringup:
+------------------------------------
+
+Samsung SMP-capable Exynos SoCs use part of the SRAM for the bringup
+of the cores. Once the core gets powered up it executes the code
+that is residing at some specific location of the SRAM.
+
+Therefore reserved section sub-nodes have to be added to the mmio-sram
+declaration. These nodes are of two types depending upon secure or
+non-secure execution environment.
+
+Required sub-node properties:
+- compatible : should be
+ "samsung,exynos4210-sram" : Secure SYSRAM
+ "samsung,exynos4210-sram-ns" : Non-secure SYSRAM
+
+The rest of the properties should follow the generic mmio-sram discription
+found in ../../misc/sram.txt
+
+Example:
+
+ sram@02020000 {
+ compatible = "mmio-sram";
+ reg = <0x02020000 0x54000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x02020000 0x54000>;
+
+ smp-sram@0 {
+ compatible = "samsung,exynos4210-sram";
+ reg = <0x0 0x1000>;
+ };
+
+ smp-sram@53000 {
+ compatible = "samsung,exynos4210-sram-ns";
+ reg = <0x53000 0x1000>;
+ };
+ };
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 10:44 [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Sachin Kamat
2014-05-01 10:44 ` [PATCH 2/2] Documentation: DT: Exynos: Bind SRAM though DT Sachin Kamat
@ 2014-05-01 13:27 ` Heiko Stübner
2014-05-02 2:25 ` Kukjin Kim
2014-05-02 3:47 ` Sachin Kamat
2014-05-01 13:32 ` Arnd Bergmann
2 siblings, 2 replies; 9+ messages in thread
From: Heiko Stübner @ 2014-05-01 13:27 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-samsung-soc, linux-arm-kernel, devicetree, arnd, t.figa,
kgene.kim, robh+dt
Hi Sachin,
Am Donnerstag, 1. Mai 2014, 16:14:44 schrieb Sachin Kamat:
> Instead of hardcoding the SYSRAM details for each SoC,
> pass this information through device tree (DT) and make
> the code SoC agnostic. Generic SRAM bindings are used
> for achieving this.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Arnd Bergmann <arnd@arndb.de>
very cool :-).
I've found one little thing I do not understand, which I describe below.
Otherwise
Acked-by: Heiko Stuebner <heiko@sntech.de>
> ---
> This patch is based on linux next (next-20140501) on top of
> my Kconfig consolidation patch
> http://comments.gmane.org/gmane.linux.kernel.samsung-soc/28642
>
> Tested on 4210/4412 Origen, 5250/5420 Arndale and SMDK5420 boards.
> ---
> arch/arm/Kconfig | 1 +
> arch/arm/boot/dts/exynos4210-universal_c210.dts | 17 ++++++
> arch/arm/boot/dts/exynos4210.dtsi | 18 +++++++
> arch/arm/boot/dts/exynos4x12.dtsi | 18 +++++++
> arch/arm/boot/dts/exynos5250.dtsi | 18 +++++++
> arch/arm/boot/dts/exynos5420.dtsi | 18 +++++++
> arch/arm/mach-exynos/common.h | 1 +
> arch/arm/mach-exynos/exynos.c | 64
> ----------------------- arch/arm/mach-exynos/firmware.c |
> 5 +-
> arch/arm/mach-exynos/include/mach/map.h | 7 ---
> arch/arm/mach-exynos/platsmp.c | 39 +++++++++++++-
> 11 files changed, 133 insertions(+), 73 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index a6aaaad19b1a..f66ea9453df9 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -855,6 +855,7 @@ config ARCH_EXYNOS
> select S5P_DEV_MFC
> select SAMSUNG_DMADEV
> select SPARSE_IRQ
> + select SRAM
> select USE_OF
> help
> Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> b/arch/arm/boot/dts/exynos4210-universal_c210.dts index
> 63e34b24b04f..8d4de5c0d0c7 100644
> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> @@ -28,6 +28,23 @@
> bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw rootwait
> earlyprintk panic=5 maxcpus=1"; };
>
> + sram@02020000 {
> + status = "disabled";
> + };
> +
> + sram@02025000 {
> + compatible = "mmio-sram";
> + reg = <0x02025000 0x1000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges = <0 0x02025000 0x1000>;
> +
> + smp-sram@0 {
> + compatible = "samsung,exynos4210-sram";
> + reg = <0x0 0x1000>;
> + };
> + };
exynos_smp_prepare_sram returns -ENODEV if it can't find
samsung,exynos4210-sram-ns, so are you sure your universal_c210 will run
without it? I didn't dig to deep into this, so it can also simply be something
I overlooked :-)
Heiko
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 10:44 [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Sachin Kamat
2014-05-01 10:44 ` [PATCH 2/2] Documentation: DT: Exynos: Bind SRAM though DT Sachin Kamat
2014-05-01 13:27 ` [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Heiko Stübner
@ 2014-05-01 13:32 ` Arnd Bergmann
2014-05-01 13:34 ` Heiko Stübner
2 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2014-05-01 13:32 UTC (permalink / raw)
To: Sachin Kamat
Cc: linux-samsung-soc, linux-arm-kernel, devicetree, t.figa,
kgene.kim, robh+dt, Heiko Stuebner
On Thursday 01 May 2014 16:14:44 Sachin Kamat wrote:
> Instead of hardcoding the SYSRAM details for each SoC,
> pass this information through device tree (DT) and make
> the code SoC agnostic. Generic SRAM bindings are used
> for achieving this.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Arnd Bergmann <arnd@arndb.de>
>
Looks good to me. Both patches
Acked-by: Arnd Bergmann <arnd@arndb.de>
Heiko, can you also have a look?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 13:32 ` Arnd Bergmann
@ 2014-05-01 13:34 ` Heiko Stübner
2014-05-02 2:31 ` Kukjin Kim
0 siblings, 1 reply; 9+ messages in thread
From: Heiko Stübner @ 2014-05-01 13:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: devicetree, linux-samsung-soc, Sachin Kamat, t.figa, robh+dt,
kgene.kim, linux-arm-kernel
Am Donnerstag, 1. Mai 2014, 15:32:14 schrieb Arnd Bergmann:
> On Thursday 01 May 2014 16:14:44 Sachin Kamat wrote:
> > Instead of hardcoding the SYSRAM details for each SoC,
> > pass this information through device tree (DT) and make
> > the code SoC agnostic. Generic SRAM bindings are used
> > for achieving this.
> >
> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> Looks good to me. Both patches
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> Heiko, can you also have a look?
Already did :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 13:27 ` [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Heiko Stübner
@ 2014-05-02 2:25 ` Kukjin Kim
2014-05-02 5:08 ` Sachin Kamat
2014-05-02 3:47 ` Sachin Kamat
1 sibling, 1 reply; 9+ messages in thread
From: Kukjin Kim @ 2014-05-02 2:25 UTC (permalink / raw)
To: 'Heiko Stübner', 'Sachin Kamat'
Cc: linux-samsung-soc, linux-arm-kernel, devicetree, arnd, t.figa,
robh+dt, a.hajda
Heiko Stübner wrote:
>
> Hi Sachin,
>
> Am Donnerstag, 1. Mai 2014, 16:14:44 schrieb Sachin Kamat:
> > Instead of hardcoding the SYSRAM details for each SoC,
> > pass this information through device tree (DT) and make
> > the code SoC agnostic. Generic SRAM bindings are used
> > for achieving this.
> >
> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> very cool :-).
>
> I've found one little thing I do not understand, which I describe below.
> Otherwise
> Acked-by: Heiko Stuebner <heiko@sntech.de>
>
> > ---
> > This patch is based on linux next (next-20140501) on top of
> > my Kconfig consolidation patch
> > http://comments.gmane.org/gmane.linux.kernel.samsung-soc/28642
> >
> > Tested on 4210/4412 Origen, 5250/5420 Arndale and SMDK5420 boards.
> > ---
> > arch/arm/Kconfig | 1 +
> > arch/arm/boot/dts/exynos4210-universal_c210.dts | 17 ++++++
> > arch/arm/boot/dts/exynos4210.dtsi | 18 +++++++
> > arch/arm/boot/dts/exynos4x12.dtsi | 18 +++++++
> > arch/arm/boot/dts/exynos5250.dtsi | 18 +++++++
> > arch/arm/boot/dts/exynos5420.dtsi | 18 +++++++
> > arch/arm/mach-exynos/common.h | 1 +
> > arch/arm/mach-exynos/exynos.c | 64
> > ----------------------- arch/arm/mach-exynos/firmware.c
|
> > 5 +-
> > arch/arm/mach-exynos/include/mach/map.h | 7 ---
> > arch/arm/mach-exynos/platsmp.c | 39 +++++++++++++-
> > 11 files changed, 133 insertions(+), 73 deletions(-)
> >
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index a6aaaad19b1a..f66ea9453df9 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -855,6 +855,7 @@ config ARCH_EXYNOS
> > select S5P_DEV_MFC
> > select SAMSUNG_DMADEV
> > select SPARSE_IRQ
> > + select SRAM
> > select USE_OF
> > help
> > Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
> > diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> > b/arch/arm/boot/dts/exynos4210-universal_c210.dts index
> > 63e34b24b04f..8d4de5c0d0c7 100644
> > --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> > +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> > @@ -28,6 +28,23 @@
> > bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw
> rootwait
> > earlyprintk panic=5 maxcpus=1"; };
> >
> > + sram@02020000 {
> > + status = "disabled";
> > + };
> > +
> > + sram@02025000 {
> > + compatible = "mmio-sram";
> > + reg = <0x02025000 0x1000>;
> > + #address-cells = <1>;
> > + #size-cells = <1>;
> > + ranges = <0 0x02025000 0x1000>;
> > +
> > + smp-sram@0 {
> > + compatible = "samsung,exynos4210-sram";
> > + reg = <0x0 0x1000>;
> > + };
> > + };
>
> exynos_smp_prepare_sram returns -ENODEV if it can't find
> samsung,exynos4210-sram-ns, so are you sure your universal_c210 will run
> without it? I didn't dig to deep into this, so it can also simply be
> something
> I overlooked :-)
>
Hi Andrzej and Tomasz,
Can you please check above?
- Kukjin
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 13:34 ` Heiko Stübner
@ 2014-05-02 2:31 ` Kukjin Kim
0 siblings, 0 replies; 9+ messages in thread
From: Kukjin Kim @ 2014-05-02 2:31 UTC (permalink / raw)
To: 'Heiko Stübner', 'Arnd Bergmann'
Cc: 'Sachin Kamat', linux-samsung-soc, linux-arm-kernel,
devicetree, t.figa, robh+dt
Heiko Stübner wrote:
> Am Donnerstag, 1. Mai 2014, 15:32:14 schrieb Arnd Bergmann:
> > On Thursday 01 May 2014 16:14:44 Sachin Kamat wrote:
> > > Instead of hardcoding the SYSRAM details for each SoC,
> > > pass this information through device tree (DT) and make
> > > the code SoC agnostic. Generic SRAM bindings are used
> > > for achieving this.
> > >
> > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> > > Cc: Heiko Stuebner <heiko@sntech.de>
> > > Cc: Arnd Bergmann <arnd@arndb.de>
> >
> > Looks good to me. Both patches
> >
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> >
> > Heiko, can you also have a look?
>
> Already did :-)
Thanks you guys ;-)
I will take this series when I get confirmation of universal-c210's behavior
from Andrzej or Tomasz.
- Kukjin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-01 13:27 ` [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Heiko Stübner
2014-05-02 2:25 ` Kukjin Kim
@ 2014-05-02 3:47 ` Sachin Kamat
1 sibling, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-02 3:47 UTC (permalink / raw)
To: Heiko Stübner
Cc: linux-samsung-soc, linux-arm-kernel,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Arnd Bergmann,
Tomasz Figa, Kukjin Kim,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Hi Heiko,
On 1 May 2014 18:57, Heiko Stübner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> wrote:
> Hi Sachin,
>
> Am Donnerstag, 1. Mai 2014, 16:14:44 schrieb Sachin Kamat:
>> Instead of hardcoding the SYSRAM details for each SoC,
>> pass this information through device tree (DT) and make
>> the code SoC agnostic. Generic SRAM bindings are used
>> for achieving this.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
>> Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
>
> very cool :-).
Thanks :)
>
> I've found one little thing I do not understand, which I describe below.
> Otherwise
> Acked-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
>
>> ---
>> This patch is based on linux next (next-20140501) on top of
>> my Kconfig consolidation patch
>> http://comments.gmane.org/gmane.linux.kernel.samsung-soc/28642
>>
>> Tested on 4210/4412 Origen, 5250/5420 Arndale and SMDK5420 boards.
>> ---
>> arch/arm/Kconfig | 1 +
>> arch/arm/boot/dts/exynos4210-universal_c210.dts | 17 ++++++
>> arch/arm/boot/dts/exynos4210.dtsi | 18 +++++++
>> arch/arm/boot/dts/exynos4x12.dtsi | 18 +++++++
>> arch/arm/boot/dts/exynos5250.dtsi | 18 +++++++
>> arch/arm/boot/dts/exynos5420.dtsi | 18 +++++++
>> arch/arm/mach-exynos/common.h | 1 +
>> arch/arm/mach-exynos/exynos.c | 64
>> ----------------------- arch/arm/mach-exynos/firmware.c |
>> 5 +-
>> arch/arm/mach-exynos/include/mach/map.h | 7 ---
>> arch/arm/mach-exynos/platsmp.c | 39 +++++++++++++-
>> 11 files changed, 133 insertions(+), 73 deletions(-)
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index a6aaaad19b1a..f66ea9453df9 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -855,6 +855,7 @@ config ARCH_EXYNOS
>> select S5P_DEV_MFC
>> select SAMSUNG_DMADEV
>> select SPARSE_IRQ
>> + select SRAM
>> select USE_OF
>> help
>> Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
>> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> b/arch/arm/boot/dts/exynos4210-universal_c210.dts index
>> 63e34b24b04f..8d4de5c0d0c7 100644
>> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> @@ -28,6 +28,23 @@
>> bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw rootwait
>> earlyprintk panic=5 maxcpus=1"; };
>>
>> + sram@02020000 {
>> + status = "disabled";
>> + };
>> +
>> + sram@02025000 {
>> + compatible = "mmio-sram";
>> + reg = <0x02025000 0x1000>;
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + ranges = <0 0x02025000 0x1000>;
>> +
>> + smp-sram@0 {
>> + compatible = "samsung,exynos4210-sram";
>> + reg = <0x0 0x1000>;
>> + };
>> + };
>
> exynos_smp_prepare_sram returns -ENODEV if it can't find
> samsung,exynos4210-sram-ns, so are you sure your universal_c210 will run
> without it? I didn't dig to deep into this, so it can also simply be something
> I overlooked :-)
Actually I do not have a universal_c210 board and hence could not
check on it and
thus this point got overlooked. Thanks for spotting it and you are
right. There shouldn't
be a error return if second node is not present as it is optional. I
will modify accordingly
and send this patch again. Thanks for your review and Ack :)
--
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings
2014-05-02 2:25 ` Kukjin Kim
@ 2014-05-02 5:08 ` Sachin Kamat
0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-05-02 5:08 UTC (permalink / raw)
To: Kukjin Kim
Cc: Heiko Stübner, linux-samsung-soc, linux-arm-kernel,
devicetree@vger.kernel.org, Arnd Bergmann, Tomasz Figa,
robh+dt@kernel.org, Andrzej Hajda
On 2 May 2014 07:55, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Heiko Stübner wrote:
>>
>> Hi Sachin,
>>
>> Am Donnerstag, 1. Mai 2014, 16:14:44 schrieb Sachin Kamat:
>> > Instead of hardcoding the SYSRAM details for each SoC,
>> > pass this information through device tree (DT) and make
>> > the code SoC agnostic. Generic SRAM bindings are used
>> > for achieving this.
>> >
>> > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> > Cc: Heiko Stuebner <heiko@sntech.de>
>> > Cc: Arnd Bergmann <arnd@arndb.de>
>>
>> very cool :-).
>>
>> I've found one little thing I do not understand, which I describe below.
>> Otherwise
>> Acked-by: Heiko Stuebner <heiko@sntech.de>
>>
>> > ---
>> > This patch is based on linux next (next-20140501) on top of
>> > my Kconfig consolidation patch
>> > http://comments.gmane.org/gmane.linux.kernel.samsung-soc/28642
>> >
>> > Tested on 4210/4412 Origen, 5250/5420 Arndale and SMDK5420 boards.
>> > ---
>> > arch/arm/Kconfig | 1 +
>> > arch/arm/boot/dts/exynos4210-universal_c210.dts | 17 ++++++
>> > arch/arm/boot/dts/exynos4210.dtsi | 18 +++++++
>> > arch/arm/boot/dts/exynos4x12.dtsi | 18 +++++++
>> > arch/arm/boot/dts/exynos5250.dtsi | 18 +++++++
>> > arch/arm/boot/dts/exynos5420.dtsi | 18 +++++++
>> > arch/arm/mach-exynos/common.h | 1 +
>> > arch/arm/mach-exynos/exynos.c | 64
>> > ----------------------- arch/arm/mach-exynos/firmware.c
> |
>> > 5 +-
>> > arch/arm/mach-exynos/include/mach/map.h | 7 ---
>> > arch/arm/mach-exynos/platsmp.c | 39 +++++++++++++-
>> > 11 files changed, 133 insertions(+), 73 deletions(-)
>> >
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> > index a6aaaad19b1a..f66ea9453df9 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -855,6 +855,7 @@ config ARCH_EXYNOS
>> > select S5P_DEV_MFC
>> > select SAMSUNG_DMADEV
>> > select SPARSE_IRQ
>> > + select SRAM
>> > select USE_OF
>> > help
>> > Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
>> > diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> > b/arch/arm/boot/dts/exynos4210-universal_c210.dts index
>> > 63e34b24b04f..8d4de5c0d0c7 100644
>> > --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> > +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> > @@ -28,6 +28,23 @@
>> > bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rw
>> rootwait
>> > earlyprintk panic=5 maxcpus=1"; };
>> >
>> > + sram@02020000 {
>> > + status = "disabled";
>> > + };
>> > +
>> > + sram@02025000 {
>> > + compatible = "mmio-sram";
>> > + reg = <0x02025000 0x1000>;
>> > + #address-cells = <1>;
>> > + #size-cells = <1>;
>> > + ranges = <0 0x02025000 0x1000>;
>> > +
>> > + smp-sram@0 {
>> > + compatible = "samsung,exynos4210-sram";
>> > + reg = <0x0 0x1000>;
>> > + };
>> > + };
>>
>> exynos_smp_prepare_sram returns -ENODEV if it can't find
>> samsung,exynos4210-sram-ns, so are you sure your universal_c210 will run
>> without it? I didn't dig to deep into this, so it can also simply be
>> something
>> I overlooked :-)
>>
> Hi Andrzej and Tomasz,
>
> Can you please check above?
Please test v2 of this series.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-05-02 5:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 10:44 [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Sachin Kamat
2014-05-01 10:44 ` [PATCH 2/2] Documentation: DT: Exynos: Bind SRAM though DT Sachin Kamat
2014-05-01 13:27 ` [PATCH 1/2] ARM: EXYNOS: Map SYSRAM through generic SRAM bindings Heiko Stübner
2014-05-02 2:25 ` Kukjin Kim
2014-05-02 5:08 ` Sachin Kamat
2014-05-02 3:47 ` Sachin Kamat
2014-05-01 13:32 ` Arnd Bergmann
2014-05-01 13:34 ` Heiko Stübner
2014-05-02 2:31 ` Kukjin Kim
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).