* [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
@ 2017-11-18 20:35 ` Dongjin Kim
0 siblings, 0 replies; 7+ messages in thread
From: Dongjin Kim @ 2017-11-18 20:35 UTC (permalink / raw)
Cc: Dongjin Kim, Russell King, Kukjin Kim, Krzysztof Kozlowski,
linux-arm-kernel, linux-samsung-soc, linux-kernel
This patch is to add the machine descriptions for ODROID-XU3/4 boards
in order to present the hardware name at /proc/cputinfo rather than
"SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
such as DietPi, reads the hardware name to run different features.
$ cat /proc/cpuinfo | grep Hardware
Hardware : ODROID-XU4
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
---
arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index c404c15ad07f..6197dbf9f48b 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
.dt_compat = exynos_dt_compat,
.dt_fixup = exynos_dt_fixup,
MACHINE_END
+
+#define ODROID_MACHINE_START(name, compat) \
+ DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
+ .l2c_aux_val = 0x3c400001, \
+ .l2c_aux_mask = 0xc20fffff, \
+ .smp = smp_ops(exynos_smp_ops), \
+ .map_io = exynos_init_io, \
+ .init_early = exynos_firmware_init, \
+ .init_irq = exynos_init_irq, \
+ .init_machine = exynos_dt_machine_init, \
+ .init_late = exynos_init_late, \
+ .dt_compat = compat, \
+ .dt_fixup = exynos_dt_fixup, \
+ MACHINE_END
+
+static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu3",
+ "hardkernel,odroid-xu3-lite",
+ NULL,
+};
+
+static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu4",
+ NULL,
+};
+
+ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
+ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
@ 2017-11-18 20:35 ` Dongjin Kim
0 siblings, 0 replies; 7+ messages in thread
From: Dongjin Kim @ 2017-11-18 20:35 UTC (permalink / raw)
Cc: Dongjin Kim, Russell King, Kukjin Kim, Krzysztof Kozlowski,
linux-arm-kernel, linux-samsung-soc, linux-kernel
This patch is to add the machine descriptions for ODROID-XU3/4 boards
in order to present the hardware name at /proc/cputinfo rather than
"SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
such as DietPi, reads the hardware name to run different features.
$ cat /proc/cpuinfo | grep Hardware
Hardware : ODROID-XU4
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
---
arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index c404c15ad07f..6197dbf9f48b 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
.dt_compat = exynos_dt_compat,
.dt_fixup = exynos_dt_fixup,
MACHINE_END
+
+#define ODROID_MACHINE_START(name, compat) \
+ DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
+ .l2c_aux_val = 0x3c400001, \
+ .l2c_aux_mask = 0xc20fffff, \
+ .smp = smp_ops(exynos_smp_ops), \
+ .map_io = exynos_init_io, \
+ .init_early = exynos_firmware_init, \
+ .init_irq = exynos_init_irq, \
+ .init_machine = exynos_dt_machine_init, \
+ .init_late = exynos_init_late, \
+ .dt_compat = compat, \
+ .dt_fixup = exynos_dt_fixup, \
+ MACHINE_END
+
+static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu3",
+ "hardkernel,odroid-xu3-lite",
+ NULL,
+};
+
+static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu4",
+ NULL,
+};
+
+ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
+ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
@ 2017-11-18 20:35 ` Dongjin Kim
0 siblings, 0 replies; 7+ messages in thread
From: Dongjin Kim @ 2017-11-18 20:35 UTC (permalink / raw)
To: linux-arm-kernel
This patch is to add the machine descriptions for ODROID-XU3/4 boards
in order to present the hardware name at /proc/cputinfo rather than
"SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
such as DietPi, reads the hardware name to run different features.
$ cat /proc/cpuinfo | grep Hardware
Hardware : ODROID-XU4
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
---
arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index c404c15ad07f..6197dbf9f48b 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
.dt_compat = exynos_dt_compat,
.dt_fixup = exynos_dt_fixup,
MACHINE_END
+
+#define ODROID_MACHINE_START(name, compat) \
+ DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
+ .l2c_aux_val = 0x3c400001, \
+ .l2c_aux_mask = 0xc20fffff, \
+ .smp = smp_ops(exynos_smp_ops), \
+ .map_io = exynos_init_io, \
+ .init_early = exynos_firmware_init, \
+ .init_irq = exynos_init_irq, \
+ .init_machine = exynos_dt_machine_init, \
+ .init_late = exynos_init_late, \
+ .dt_compat = compat, \
+ .dt_fixup = exynos_dt_fixup, \
+ MACHINE_END
+
+static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu3",
+ "hardkernel,odroid-xu3-lite",
+ NULL,
+};
+
+static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
+ "hardkernel,odroid-xu4",
+ NULL,
+};
+
+ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
+ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
2017-11-18 20:35 ` Dongjin Kim
@ 2017-11-19 17:21 ` Tobias Jakobi
-1 siblings, 0 replies; 7+ messages in thread
From: Tobias Jakobi @ 2017-11-19 17:21 UTC (permalink / raw)
To: Dongjin Kim
Cc: Russell King, Kukjin Kim, Krzysztof Kozlowski, linux-arm-kernel,
linux-samsung-soc, linux-kernel
I don't think this approach scales at all. DietPi can just read the devicetree
through sysfs and retrieve the compatible and/or model of the base node.
- Tobias
Dongjin Kim wrote:
> This patch is to add the machine descriptions for ODROID-XU3/4 boards
> in order to present the hardware name at /proc/cputinfo rather than
> "SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
> such as DietPi, reads the hardware name to run different features.
>
> $ cat /proc/cpuinfo | grep Hardware
> Hardware : ODROID-XU4
>
> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
> ---
> arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index c404c15ad07f..6197dbf9f48b 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
> .dt_compat = exynos_dt_compat,
> .dt_fixup = exynos_dt_fixup,
> MACHINE_END
> +
> +#define ODROID_MACHINE_START(name, compat) \
> + DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
> + .l2c_aux_val = 0x3c400001, \
> + .l2c_aux_mask = 0xc20fffff, \
> + .smp = smp_ops(exynos_smp_ops), \
> + .map_io = exynos_init_io, \
> + .init_early = exynos_firmware_init, \
> + .init_irq = exynos_init_irq, \
> + .init_machine = exynos_dt_machine_init, \
> + .init_late = exynos_init_late, \
> + .dt_compat = compat, \
> + .dt_fixup = exynos_dt_fixup, \
> + MACHINE_END
> +
> +static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
> + "hardkernel,odroid-xu3",
> + "hardkernel,odroid-xu3-lite",
> + NULL,
> +};
> +
> +static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
> + "hardkernel,odroid-xu4",
> + NULL,
> +};
> +
> +ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
> +ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
@ 2017-11-19 17:21 ` Tobias Jakobi
0 siblings, 0 replies; 7+ messages in thread
From: Tobias Jakobi @ 2017-11-19 17:21 UTC (permalink / raw)
To: linux-arm-kernel
I don't think this approach scales at all. DietPi can just read the devicetree
through sysfs and retrieve the compatible and/or model of the base node.
- Tobias
Dongjin Kim wrote:
> This patch is to add the machine descriptions for ODROID-XU3/4 boards
> in order to present the hardware name at /proc/cputinfo rather than
> "SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
> such as DietPi, reads the hardware name to run different features.
>
> $ cat /proc/cpuinfo | grep Hardware
> Hardware : ODROID-XU4
>
> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
> ---
> arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index c404c15ad07f..6197dbf9f48b 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
> .dt_compat = exynos_dt_compat,
> .dt_fixup = exynos_dt_fixup,
> MACHINE_END
> +
> +#define ODROID_MACHINE_START(name, compat) \
> + DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
> + .l2c_aux_val = 0x3c400001, \
> + .l2c_aux_mask = 0xc20fffff, \
> + .smp = smp_ops(exynos_smp_ops), \
> + .map_io = exynos_init_io, \
> + .init_early = exynos_firmware_init, \
> + .init_irq = exynos_init_irq, \
> + .init_machine = exynos_dt_machine_init, \
> + .init_late = exynos_init_late, \
> + .dt_compat = compat, \
> + .dt_fixup = exynos_dt_fixup, \
> + MACHINE_END
> +
> +static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
> + "hardkernel,odroid-xu3",
> + "hardkernel,odroid-xu3-lite",
> + NULL,
> +};
> +
> +static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
> + "hardkernel,odroid-xu4",
> + NULL,
> +};
> +
> +ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
> +ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
2017-11-19 17:21 ` Tobias Jakobi
@ 2017-11-20 7:37 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-11-20 7:37 UTC (permalink / raw)
To: Tobias Jakobi
Cc: Dongjin Kim, Russell King, Kukjin Kim, linux-arm-kernel,
linux-samsung-soc, linux-kernel
On Sun, Nov 19, 2017 at 6:21 PM, Tobias Jakobi
<tjakobi@math.uni-bielefeld.de> wrote:
> I don't think this approach scales at all. DietPi can just read the devicetree
> through sysfs and retrieve the compatible and/or model of the base node.
Exactly, do not add new machines just for reading DT. Use
/sys/firmware/devicetree/base/compatible for this.
Best regards,
Krzysztof
> - Tobias
>
> Dongjin Kim wrote:
>> This patch is to add the machine descriptions for ODROID-XU3/4 boards
>> in order to present the hardware name at /proc/cputinfo rather than
>> "SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
>> such as DietPi, reads the hardware name to run different features.
>>
>> $ cat /proc/cpuinfo | grep Hardware
>> Hardware : ODROID-XU4
>>
>> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
>> ---
>> arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>> index c404c15ad07f..6197dbf9f48b 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
>> .dt_compat = exynos_dt_compat,
>> .dt_fixup = exynos_dt_fixup,
>> MACHINE_END
>> +
>> +#define ODROID_MACHINE_START(name, compat) \
>> + DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
>> + .l2c_aux_val = 0x3c400001, \
>> + .l2c_aux_mask = 0xc20fffff, \
>> + .smp = smp_ops(exynos_smp_ops), \
>> + .map_io = exynos_init_io, \
>> + .init_early = exynos_firmware_init, \
>> + .init_irq = exynos_init_irq, \
>> + .init_machine = exynos_dt_machine_init, \
>> + .init_late = exynos_init_late, \
>> + .dt_compat = compat, \
>> + .dt_fixup = exynos_dt_fixup, \
>> + MACHINE_END
>> +
>> +static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
>> + "hardkernel,odroid-xu3",
>> + "hardkernel,odroid-xu3-lite",
>> + NULL,
>> +};
>> +
>> +static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
>> + "hardkernel,odroid-xu4",
>> + NULL,
>> +};
>> +
>> +ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
>> +ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
@ 2017-11-20 7:37 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2017-11-20 7:37 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Nov 19, 2017 at 6:21 PM, Tobias Jakobi
<tjakobi@math.uni-bielefeld.de> wrote:
> I don't think this approach scales at all. DietPi can just read the devicetree
> through sysfs and retrieve the compatible and/or model of the base node.
Exactly, do not add new machines just for reading DT. Use
/sys/firmware/devicetree/base/compatible for this.
Best regards,
Krzysztof
> - Tobias
>
> Dongjin Kim wrote:
>> This patch is to add the machine descriptions for ODROID-XU3/4 boards
>> in order to present the hardware name at /proc/cputinfo rather than
>> "SAMSUNG EXYNOS (Flattened Device Tree)". An embedded open source project,
>> such as DietPi, reads the hardware name to run different features.
>>
>> $ cat /proc/cpuinfo | grep Hardware
>> Hardware : ODROID-XU4
>>
>> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
>> ---
>> arch/arm/mach-exynos/exynos.c | 28 ++++++++++++++++++++++++++++
>> 1 file changed, 28 insertions(+)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
>> index c404c15ad07f..6197dbf9f48b 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -241,3 +241,31 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)")
>> .dt_compat = exynos_dt_compat,
>> .dt_fixup = exynos_dt_fixup,
>> MACHINE_END
>> +
>> +#define ODROID_MACHINE_START(name, compat) \
>> + DT_MACHINE_START(EXYNOS5422_ODROID_##name, "ODROID-"#name) \
>> + .l2c_aux_val = 0x3c400001, \
>> + .l2c_aux_mask = 0xc20fffff, \
>> + .smp = smp_ops(exynos_smp_ops), \
>> + .map_io = exynos_init_io, \
>> + .init_early = exynos_firmware_init, \
>> + .init_irq = exynos_init_irq, \
>> + .init_machine = exynos_dt_machine_init, \
>> + .init_late = exynos_init_late, \
>> + .dt_compat = compat, \
>> + .dt_fixup = exynos_dt_fixup, \
>> + MACHINE_END
>> +
>> +static char const *const exynos5422_odroidxu3_dt_compat[] __initconst = {
>> + "hardkernel,odroid-xu3",
>> + "hardkernel,odroid-xu3-lite",
>> + NULL,
>> +};
>> +
>> +static char const *const exynos5422_odroidxu4_dt_compat[] __initconst = {
>> + "hardkernel,odroid-xu4",
>> + NULL,
>> +};
>> +
>> +ODROID_MACHINE_START(XU3, exynos5422_odroidxu3_dt_compat)
>> +ODROID_MACHINE_START(XU4, exynos5422_odroidxu4_dt_compat)
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-20 7:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-18 20:35 [PATCH] ARM: exynos: add machine description for ODROID-XU3/4 Dongjin Kim
2017-11-18 20:35 ` Dongjin Kim
2017-11-18 20:35 ` Dongjin Kim
2017-11-19 17:21 ` Tobias Jakobi
2017-11-19 17:21 ` Tobias Jakobi
2017-11-20 7:37 ` Krzysztof Kozlowski
2017-11-20 7:37 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.