From patchwork Mon Aug 26 18:20:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 825 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3EB6C3F9FB for ; Mon, 26 Aug 2019 20:21:22 +0200 (CEST) Received: by mail-ot1-f69.google.com with SMTP id a26sf10594396otl.1 for ; Mon, 26 Aug 2019 11:21:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1566843681; cv=pass; d=google.com; s=arc-20160816; b=gjsekyLmg6DV3COLHXZGsBOEW8kE/7cBeA9tIANUCakbHd7tbfI6B7lxAwhbB5yCbF Z+SW0kcUyM9rtOj+m0DcqQYu7sgGZDsH/CpwBU6WbKHoZiXh0l20mk2ln13RcewPpX1T v5g47LIIu6ZoqTN6WsqFqL2O2G76Oap4NoLh/4nt7Nem2dpM/80Zob0+gNrwLIE7zr4q Uo4mFsfmbH6XHAG+bCGS5qmi9nYNlExjzGrrSJ2R5hHJ+FAW34MAyacFmbuPcEfyv3Q0 WaRFypf83LS+3sHPLWKZrU84N98vtI1XYXL8oDqUAt9jxPg6zNChuqBHrJgYThqquSQa Ho1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kO1olT6hiSHZyHV8eKVKpO6kcCH47DXLbAtrv3WMFPs=; b=CF20SMXsM/RG95v0Y4E+aWhoA/p7PDfeYkPVMLCthLDjSfgXaop1+cnnCWy1UdDWhE OW+Drpz5B3tmT8GA/G4GR5ltolaux8EUMslAtccNVwE6OLDvBlLfgBFKML+iFGsJYLLU bdDTUq7XtAEjGSduwg4L6ZRIOwqFzLkgTTuQl6Sao+0H+gu+oWnVq2fCKRM2AJDM936d +CorgmPCOTgPlaytebwY0rnn4hyaN5ucj7ZuhB3jUaN63mMc49Hrjrlg3JEPb8s8+IF9 9VxzaoNCUBzZleX7o4XDXn9PUhK0PKWQCWTO/D6nVcMAAqcgcUhqBDu5NVgD9oDNHNLM OUnA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Njd9rnY4; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=kO1olT6hiSHZyHV8eKVKpO6kcCH47DXLbAtrv3WMFPs=; b=D/VGN03VnD92ekUNj5osn7opjfeKM4/AqydB2etqRfDbmjJTTjyAeqT9b3Rh3m9Yvd x5Db0gBcOUOvebpHX3JE8ZN4O+mkJIijjS4e5h+lo4IHAPFtc7+ewVxnJ4rseZHPSVCM VkGlJ1q4WRqy94ANFvoyqehJYzU4Wug9JB4ho= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=kO1olT6hiSHZyHV8eKVKpO6kcCH47DXLbAtrv3WMFPs=; b=XmNuMcOxqtZOqoFEHebTzCVmma5dwvcqLc2hGlZWtBjVdj65oOfqHknUGxQY9+MNe5 vRDKrvpy87Bq6UHJH74Q2S2IApcd9hN33lR/Q5FhTTikf0Ao/6O3ygyR169HIKIwLSaS /ZMQwsAMWgaOB35H7oMPjq9L8zl1ZVUARc7ga6tdp7pQeJVpY17lQD3R4fl8S0i9Pw1z zGCuEkWOfCihXuajL/FJG2V9Cn/Pher0VrZiPtwUMb0uXVRNGWtXnI3uCleyeKRT10jn s/VObNiquYX0STyVOXGXSzvXQ2YoYFFSbsuOOXNuKRhPkRmvJtCw47ur9VS2BamW5AAx z+ug== X-Gm-Message-State: APjAAAWoLfiFmE+PtA9ui1u2vNkOZDoFpl2wXrGTEfvc92EjuXcNE4ji 7w9m/8zY528RRg2p6p25ylLUMPGD X-Google-Smtp-Source: APXvYqxcKR4SpEDpDYTG9AFoVTOrwBIQnO1H7jtSr2PCFwP++sygAUiMeET7ER3L59yp1bmSkm9HcA== X-Received: by 2002:aca:38c2:: with SMTP id f185mr13701372oia.80.1566843680962; Mon, 26 Aug 2019 11:21:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a54:448b:: with SMTP id v11ls406559oiv.3.gmail; Mon, 26 Aug 2019 11:21:20 -0700 (PDT) X-Received: by 2002:aca:c644:: with SMTP id w65mr9061935oif.41.1566843680643; Mon, 26 Aug 2019 11:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566843680; cv=none; d=google.com; s=arc-20160816; b=dd+vTHU5tWTETdEvvQEQUfNVeQQZQAljYqKE4bUUEFO5gZt8f25sOvzGzxco0ebmum WSxfMCPFTWbNmyj8JLhKMMrG2oYInaGhcuFYQvPONcQ+Dz1/AqjWafx437KX5tYCJZWc K8w4aAggXIL5ZUSM4Op2DokPZt7FZVWeBT4Pvo8abiP02SBp1ycViu8GEkbF7qovgHhX 43mN5z5LDbaGiBeAo+N/gqdOskRrHghq+PsLn2gdQI7UL4G3lFaCDn/ABNQmr4pSJRND wDGxdDrU/UkeEiJWmWfJ77bzgQEKn9AwddGJhkTk9UCTl3AHiIPCntFAzd7dA7AN66NI 4j1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=xRu0x2zdsAS9SouCZDw1havsmdJYtE07rAHvq61BChY=; b=rh41kaeo6lUwBqgcBcQNzwCHS+NmNWqyvuCJx54hsN8Gk8Era3bIVbAZhovT//6SrU Iq/Ckt92WAXxPLcmhzz44WQNIjEJm8NoAwAUOSGOmCxKXWg704GpBuxMF6MMS8ks6NGr OSnOIHJT+Qkm7GG2BpalBCG+O2U/KM1bqXL6po61me2HntCye0LeQGCXgcbhYMaFZR5V Ioc3XC6kCrv8fw2wfzoyHgy6VNRSzvduBB7rk/j1crjY1mU0L66RkJtZkmFw6n5F1WRT LHpOwEI6FHQgff4DQqOCxPTy2AKcy69Spa0bwXlTaC6fZ4wEnpg3Q7Quy2qEbZLLv51y odKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Njd9rnY4; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j7sor5054910oia.175.2019.08.26.11.21.20 for (Google Transport Security); Mon, 26 Aug 2019 11:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a05:6808:198:: with SMTP id w24mr13261346oic.53.1566843679641; Mon, 26 Aug 2019 11:21:19 -0700 (PDT) Received: from jagan-XPS-13-9350.attlocal.net ([2600:1700:7430:38e0:d5b0:4823:33c8:5e46]) by smtp.gmail.com with ESMTPSA id c11sm4401461otr.54.2019.08.26.11.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 11:21:19 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Akash Gajjar , u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 01/16] rockchip: Add cpu-info Date: Mon, 26 Aug 2019 23:50:56 +0530 Message-Id: <20190826182111.30999-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190826182111.30999-1-jagan@amarulasolutions.com> References: <20190826182111.30999-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Njd9rnY4; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add cpu information for rockchip soc. This would help to print the SoC family number, with associated temparature, clock and reason for reset etc. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/cpu-info.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 arch/arm/mach-rockchip/cpu-info.c diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index 207f900011..76fc4942ee 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -20,6 +20,7 @@ ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) # we can have the preprocessor correctly recognise both 0x0 and 0 # meaning "turn it off". obj-y += boot_mode.o +obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o endif diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c new file mode 100644 index 0000000000..90ce65d9ff --- /dev/null +++ b/arch/arm/mach-rockchip/cpu-info.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#include + +int print_cpuinfo(void) +{ + printf("SoC: Rockchip %s\n", CONFIG_SYS_SOC); + + /* TODO print operating temparature and clock */ + + return 0; +}