From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Dongjin Kim <tobetter@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: exynos: add machine description for ODROID-XU3/4
Date: Sun, 19 Nov 2017 18:21:16 +0100 [thread overview]
Message-ID: <9f1311f1-2986-21f1-7016-29efc7b2a543@math.uni-bielefeld.de> (raw)
In-Reply-To: <20171118203544.19431-1-tobetter@gmail.com>
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)
>
next prev parent reply other threads:[~2017-11-19 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-18 20:35 Dongjin Kim
2017-11-19 17:21 ` Tobias Jakobi [this message]
2017-11-20 7:37 ` Krzysztof Kozlowski
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=9f1311f1-2986-21f1-7016-29efc7b2a543@math.uni-bielefeld.de \
--to=tjakobi@math.uni-bielefeld.de \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=tobetter@gmail.com \
/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
all inboxes | Powered by JetHome®