From patchwork Sat Nov 18 20:35:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongjin Kim X-Patchwork-Id: 10064931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 332B0602B8 for ; Sat, 18 Nov 2017 20:36:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 239252955C for ; Sat, 18 Nov 2017 20:36:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15556295AD; Sat, 18 Nov 2017 20:36:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98E012955C for ; Sat, 18 Nov 2017 20:36:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423498AbdKRUg3 (ORCPT ); Sat, 18 Nov 2017 15:36:29 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:46334 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162168AbdKRUg3 (ORCPT ); Sat, 18 Nov 2017 15:36:29 -0500 Received: by mail-it0-f65.google.com with SMTP id r127so7894888itb.5; Sat, 18 Nov 2017 12:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=O4kzPQONxzSDQJ/waJqPn13KQ6iNtzuhn0f7ErSuLKM=; b=rQRGSeudX/MYb0+kz2QXXGwJacgWXV7CQsnw5qYddSB11AfZrQT1nbERRMfQt5R7D1 rVb9fZNlEJh2EI++eVgBu2a8MSXoEWXKbUdQmbYRDSjDykyJ50kP5yI04Gko1O8rfsto 642oMXFCxO1yGr/BejY7O3h5VSjHVZrV3kbsO3Bcd7IqchyShEtSRn5EDCzZXG2VFX/x TeiUuMDR2TqugaAYGwIzIwAXKHsre/s8DUZ83cVmKga7aHNYT8MZr9rRBsXTOKRm5pgU z76Vnhkh/gw4qNJwT3FTUSYPyMVF9fiRlZYJ++5y9HjNE4Svn9h1eqG8uLC9r930LsE/ N7Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=O4kzPQONxzSDQJ/waJqPn13KQ6iNtzuhn0f7ErSuLKM=; b=Jdp+F9U4fAvlgjJT1XSSuMdamZmG3VmRlMcOX+7diWJA7bwtV0WD9WWoOh+wkVKzzu SRpAJeB1NJ4VVbuRk9VE4V7wLptdkBE0+x70xRdo68sugBaJgrxz1OMLAtaLMEhZ+8kd NIpfFPM76doe6WMCG5EtxlE+IRiLKUj9Ht7YFxxJGStRQeE1AO6oiHeuOna1pw/3ID60 0iqyyUOsJHZlkA2/GmsQLPd71cIHchh0dmqLoinda9npwWzdd/jrahzHEkAE3mN6b9OM 69oBVSzYoVGkhcoUVngukkbI7a78ri9PLVIBPAUhxJ0RKlcfIrBtWzxKfA7KcMG4YCAW JB0w== X-Gm-Message-State: AJaThX5GmC3HvNVz26I4br5ixJARzeoZO9ylEaR2VmIGo8JKifnSZ3VH z6I0qO4gfbPBpkfR3lNGMaY= X-Google-Smtp-Source: AGs4zMa9as/gaDzAM7Q+TSoHvJB4pBcLXxN/4oBA2kzXIo8ipwf6IokFPRoG0y5OYe4d3umKxUiFHw== X-Received: by 10.36.28.81 with SMTP id c78mr6661784itc.96.1511037388375; Sat, 18 Nov 2017 12:36:28 -0800 (PST) Received: from localhost.localdomain (CPEac202e257683-CMac202e257680.cpe.net.fido.ca. [72.140.103.110]) by smtp.gmail.com with ESMTPSA id l206sm3425531ita.29.2017.11.18.12.36.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Nov 2017 12:36:27 -0800 (PST) From: Dongjin Kim Cc: Dongjin Kim , Russell King , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: exynos: add machine description for ODROID-XU3/4 Date: Sat, 18 Nov 2017 15:35:44 -0500 Message-Id: <20171118203544.19431-1-tobetter@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)