From patchwork Sun Dec 29 19:07:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 959 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 37C283F030 for ; Sun, 29 Dec 2019 20:07:45 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id s19sf10818089pjp.9 for ; Sun, 29 Dec 2019 11:07:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577646463; cv=pass; d=google.com; s=arc-20160816; b=SzljntJidcoa2sIEYJMeU040wrG2WbLvE1Cj3p2K4E2hJW6G5IUXXGzBbP9Di9nMx0 LrfWMvwnviycWU0vmSXM6+Tw6AhqRbqB7ywITSKuOOcWRnemDuPEzoYYiwSVT+DdxSCM a2IqfrUxRiu0pEivXPxvosWBkVbOQp4CKOyNHt6lvUuxCIerl0SnT3FWyNmuy1sVjSCm aarKInfVaM7eEHIRVGXpk7G0R+34uYEabLWHZleyqKeUy90gfnTuDEds8NYKjL8N+xtE K1lsaedl+RED92VuVXJwt24RgyAiSfLU+UHZVIO+kw1ljfg79hXz70wRhsWPsKVC0+Vj HQtA== 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=mrvz7IoPyIXHZjiR8cM9TC1ioq//jGCSiLDajWNT7pQ=; b=utQdkFFvxrVhr3QDlDyO/NY8hKjOTKR81plW7AV/+Az+Pp+kUm63sEm+PMLdJhisnS Gox0+PwbDMZOgKfz+3pYaeu6nO4J2Q6xmm5xLsRaKAnrxqY0NlBkCSn4gsEpgtf/ueWz jrLKiiVCpqi+E6y9uaDa95ij6j0zc/fHGva+xDzWYNFNeWSz8RLn7Rp80qQTEoKDSqLA 9e8cyjq4s6qj9HKZDw3E/D5Le46tzkIr4qD9ZZZM1Me87qpzHf0Mdbw1x3fLV2Th/DWr fgCMpF0s26RA4vgWPTbuwuBQLx5yDVvgk5cfC00RkWJR5E12i/7++uVgfGGVMIkjJW+F hYZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OwMhhIiz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 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=mrvz7IoPyIXHZjiR8cM9TC1ioq//jGCSiLDajWNT7pQ=; b=SJZNZOz+dFHceg8dm+2JwRKJKIOESjffq0WLKoshCrujOVOA+1ogbniOfzVG4efHhM B1WfqAfWm6qgdP4Mn4wtXKp9xoaM+BNfieXHPZ9vcd+Rq6PBEaNGNNcTVxOj9CxgjrTu n8q8UzFZLQuKYZ9Li2IFlvNd3A1kdSXSrlBYg= 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=mrvz7IoPyIXHZjiR8cM9TC1ioq//jGCSiLDajWNT7pQ=; b=AZK8+FQ2Cf/nog71E5XhOTJnK2fejXm+VZiPQhxkOGn0op6i5mJQx3IaqNbMhVN1Gm uQrYOTvO9U5a8IJpWwp4RjMChjGgiQ0a6pmK4hVLogWUV+J+1wivaKXXExgGUe2JvTHC nmYIgm8U+9axPVgbz8smKpQC/2+GYA9B8A0ZxF863SSErGGmKndjKfyjLkWcc15ufph5 Rk/8TGPFknzuv8OUrQYRa9cgrrG7UXe5/+pdBck4YIP3Ol1FEvqnWnAReJ6k6hoyLGw9 9J4G0q/IQ1vSMD0trBpwod7j0+ZblcLkDk7GbFsvl/e+Ca6Gd3PEh9mKWr8UuC/MBTXI FYEg== X-Gm-Message-State: APjAAAWA0NeOrmPp2Yr9sxXPamqhzBf29N7R/7PiRQGITYOAOwEDF08O oATPr3ClfRzjNIhrcKnPSl564Ybb X-Google-Smtp-Source: APXvYqxNULALine5wG4DrYlP+frSxbsdmpnrBspPfCGajHH/QEHtsdPEFxSm8sa/Gfyq9SqV98jLXA== X-Received: by 2002:aa7:9111:: with SMTP id 17mr42467441pfh.163.1577646463061; Sun, 29 Dec 2019 11:07:43 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:880e:: with SMTP id l14ls8618718pfd.13.gmail; Sun, 29 Dec 2019 11:07:42 -0800 (PST) X-Received: by 2002:a62:8f8f:: with SMTP id n137mr54551204pfd.82.1577646462526; Sun, 29 Dec 2019 11:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577646462; cv=none; d=google.com; s=arc-20160816; b=UwdGH92OUqX3QpZ7iSfhtIAyRTpIuW6hfI29BpUWARcXBsl1t2R0wePi2UG5Vuyjc2 dVjgl38H3dQG7u0012NfSsUAgIZs4rpVWoGMOBBD3bj1xqRisQgBESrwyFz31XUHVmXt h4TQqOaoKKT34kM1MFKScx4ZOA62k63S6fULMp4QAFcD1VPUYcofNwUuoL1YjiERj7Sy s0IpwY4qOx91neZ91bcOdU1B+C1i0IFXkt/E0/bDNRw+Gtm8rHeGyOC1xTSQR/VadED5 7on2I2iSXSAt9cYb3nzllwIvbFAnQPDKRjqfYfU1Dap9LVo072S5hOeuz1WiFe6RAEjo eaog== 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=RUdkH3Hn90mUMENnHQDibrNe0Nd/k7EHeETRfs17yAs=; b=GtOILpd2uOnmL+9zMt89XoIwY0ypW5BdROeP2WnMpYkifr7odybLB3mj3Dnj3moxD5 ExeZ0Db+u6ddecZFjkCsqe7wPYT6ob/nYg8SmWrSky2J5aEmZ0sdjwI2EC7AwwbiFE+n 3kUAtS85r+RK7WHnq5stUZZHWNnQJ6jPKeO+bED+4/2W6c/CR6pOfopIDfOBvrvY7LYu Lf02cHIEmZAKI05gerxD8mYAQnKS13QZswqh8ggLtdHgSHU2HZNWYqxNphUen/SD9D9o iZHyM85BfjjV5fr0RL1948T0dYcvWFFGZqVN8ZhhixMo/0+csVnRe4Xk38eOA2pCT7HP U+qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OwMhhIiz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 69sor16815810plc.8.2019.12.29.11.07.42 for (Google Transport Security); Sun, 29 Dec 2019 11:07:42 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:7d85:: with SMTP id a5mr44511327plm.330.1577646461998; Sun, 29 Dec 2019 11:07:41 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:f590:ce0e:1ce1:c326]) by smtp.gmail.com with ESMTPSA id u10sm44879700pgg.41.2019.12.29.11.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2019 11:07:41 -0800 (PST) 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 v3 1/5] rockchip: Add cpu-info Date: Mon, 30 Dec 2019 00:37:22 +0530 Message-Id: <20191229190726.29266-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191229190726.29266-1-jagan@amarulasolutions.com> References: <20191229190726.29266-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=OwMhhIiz; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 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 a728acda24..5b38526fe0 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -22,6 +22,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 obj-$(CONFIG_MISC_INIT_R) += misc.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..9bccbd4f68 --- /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(India) + * Author: Jagan Teki + */ + +#include + +int print_cpuinfo(void) +{ + printf("SoC: Rockchip %s\n", CONFIG_SYS_SOC); + + /* TODO print operating temparature and clock */ + + return 0; +}