From patchwork Thu Jul 30 09:28:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247270 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2237564ilg; Thu, 30 Jul 2020 02:29:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwACYxzPgyuKjozwLjbtBTjmdfH9oQh6tD0j/K94Vbr7brUvIefgAq4nxEmOrNz/MuGUv9 X-Received: by 2002:aa7:c450:: with SMTP id n16mr1701054edr.53.1596101392192; Thu, 30 Jul 2020 02:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596101392; cv=none; d=google.com; s=arc-20160816; b=02Ydt1Ga22kZTMzSKkbY2ld6P1TQuUHvZq8aTModdJAGFzKmUjcj+8TEMeNRf6H6AC vKhQ/kpavNZU7CNwZ69NaNcN5J01eLWTIbd185h4i+oj35SxEHJa+LpI24nvtlMRDiid bFN4jEYN7WUgy5jGRzo3bRN3TQ+WG7kLC1iE8EUWfqsHBurwsp1ltlikqRn2xV46abqW vs2mUdNg8ZxBWF+M9Oj7iWDOfhjJeVK93WBsnLZhXvCp3kWKQK4eytHCHEte1VOaH2k/ OfFD1lL//por0rMrzKsWKPOivrGVXXFC6RQZZAAi2CwXbf5uzKPv8vy7FhuJGHUPw1j1 tGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=WGFtYwZfpuCaNwVzL6NYRXB2qNDyHhyf0gaQdaqz9eA=; b=CpXHq+If4x1i2RT3AqUSPp+GZD9JaqDIHFMpU8hFSAZgM0Hnwi4jIuJUNElGB1SP1w 3cEAkFSkXvFn4fY9m7gvf34PxyWBqoZTnjy46/qLEN0d1woUv0jR7hdOQG7XurYs3oWa jJfeAjdQRd7EUr84CxYbdFxHGv5BgOLvb1FMZHpa1mppoo9hMa95HyBWt528OYapvvi7 DIZQ1eWk2xpYdUDF5xQep88x17yZhs5rjeNVAUUpS3HGqJ99SiDCBXfM+ySCrhC8hXRG OzoEfUiPjQdVxVsgHGBM8EYyQLpsQnrfYYSMXgNqCON99R4OaLHucJFKSzheA6j8DXZM IdhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IDfVf3Vz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id r5si2149604edx.458.2020.07.30.02.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IDfVf3Vz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E82248268B; Thu, 30 Jul 2020 11:29:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="IDfVf3Vz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5BC7F8265E; Thu, 30 Jul 2020 11:29:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 866B9821A7 for ; Thu, 30 Jul 2020 11:29:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 06U9SFX9003637; Thu, 30 Jul 2020 18:28:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 06U9SFX9003637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596101296; bh=WGFtYwZfpuCaNwVzL6NYRXB2qNDyHhyf0gaQdaqz9eA=; h=From:To:Cc:Subject:Date:From; b=IDfVf3VzlF+YET6huku5VydG8f0q6IN9Ht6nmRdBMARxjrkVunaFfQN1qPuOZoVLj 9SaZ7NMqsmdYh8798xTxn82fVfPSPF5869mrThyYgB2tAxZfqpy4fB7EKtAgsfPlb5 i36fjz05ViPNY9mvzPanX+4aRjvoRpR0ED7w7y2g5FSWP5YfPBZPJckkOtOqzr4Pzy ieDyJxAgXL67qqGtkkd29Tc4cH/1luQfR+pQnYRG+whpTjKf0RhuI9DG1oBOsLDbkF CrXFIzPBJ3aHSdh4vzaPQimLXQ6N7bFKT1LArwAgAewcGWDCuv4KWQzrbz8Logh68D WTMcEkUnzQphw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Joe Hershberger , Patrick Delaunay , Simon Goldschmidt , Tom Rini Subject: [PATCH 1/5] ARM: uniphier: rename include guard of include/configs/uniphier.h Date: Thu, 30 Jul 2020 18:28:04 +0900 Message-Id: <20200730092808.26521-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Make the include guard match to the file name. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index d0841a7d55f9..1b942cf657db 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -7,8 +7,8 @@ /* U-Boot - Common settings for UniPhier Family */ -#ifndef __CONFIG_UNIPHIER_COMMON_H__ -#define __CONFIG_UNIPHIER_COMMON_H__ +#ifndef __CONFIG_UNIPHIER_H__ +#define __CONFIG_UNIPHIER_H__ #ifndef CONFIG_SPL_BUILD #include @@ -213,4 +213,4 @@ #define CONFIG_SPL_PAD_TO 0x20000 -#endif /* __CONFIG_UNIPHIER_COMMON_H__ */ +#endif /* __CONFIG_UNIPHIER_H__ */ From patchwork Thu Jul 30 09:28:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247268 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2237340ilg; Thu, 30 Jul 2020 02:29:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCu/nPnrJykc5r0tgkIYzId4Uy+rlvoArZ8yiCqzL3/cZhkYdLht6T/usmHoyJ9M/NA1Nh X-Received: by 2002:a50:e617:: with SMTP id y23mr1733788edm.47.1596101368455; Thu, 30 Jul 2020 02:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596101368; cv=none; d=google.com; s=arc-20160816; b=DBjuKPaoMNlfbmzS9uvJrhN2WAYZARR+M2bbc+QG+v+yb2d1zcXtZy2YoyTbgzbA4E 1GSdX3hAkA+SymRFzaaAs8rXHvH644d5KQtacufiQRS7EL7Jc1XMc4SsWAPGsyjsU9Pg BsmXs6seV0rkadQK0amuf3pkDd2I0IuIxonfvPAHszBtx/u3dgAMNcN9KZh3SM9a8fF8 RybHvRQZ/6ZKUgUN3d1Cx7VYK8CvAjD3KX5cUXIWllgmyoXXzr5KyU4kh2eJpgJRu5Ji e5y23gh4dHzIHNkg9bgUGTqlnDChzTckw0jxR9ZIsQZGgHm7sHNpZdp1UAJsQ6rieyKV sqzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=O/OhU8tyZdpz9Ywgw0TR1WOivgVJkVWHXi4w6RcHhLo=; b=Lvhax6Hq4hruXPclClclwyPquO8vFVynU24etfdKei72Ixz7OWqh+vyREZ+8jnmEov FOx3BN9KBBVaX2FWXHyW3u4O7Varx07p06TOjqOZYmwksPIAe2N1UW7ROScQ37LdChl3 4bJXu3xMY+Z9at9MItYTb9iq52LZrJADLyPgeJia4dFJF3R0EbZmRfZfB/2MCjqsL7nR EoRt0p8NSK6/mRUm1Bnf3PolBkgN+tfHyHlLe4sWe8zvq4jQkDiQAgzAkZwTeiggNheY w1w1c9coNLK+y4Py0T/8KXjQueEGOr8NMs6QEijGb/FpeX1pze7OomwT7yMyVUikLwYX db+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jWXpA5p9; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id o18si2855572ejg.391.2020.07.30.02.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jWXpA5p9; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 00E6082666; Thu, 30 Jul 2020 11:29:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="jWXpA5p9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7CAB48267A; Thu, 30 Jul 2020 11:29:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3FE3882661 for ; Thu, 30 Jul 2020 11:29:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 06U9SFXA003637; Thu, 30 Jul 2020 18:28:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 06U9SFXA003637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596101296; bh=O/OhU8tyZdpz9Ywgw0TR1WOivgVJkVWHXi4w6RcHhLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWXpA5p9geIZy2R4F/fH02g+tE6P8Kg9UYVhljmYnV+oOzO4q/mzxunXFdQgE4H0I UeLGiMqUmvJszRhpKeMPDEJusqcH8UfdWZb8ll1t0aY+HsSBNKdr+TpykQOjWdYzLL gOmBYYnhmLBTHFJFA5YT525f4RjAYvvpIK7i3Vpg9YO8uwQ1k1Qqe57s6T5M9+/qxs Iy5Z0u3s0S001fcjgoNGZ7tUWD91Z9eJrSptc6p/n2rowFzrdfcIbmV84JWOv2Mnwx RpJ8VjlF4CEFfO+IDDeU54160Rso1et7/zZ27HP9oyJzkAwORYgpzwk3C3m5IDKRTe 9P/T5FhWI4gDQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Tom Rini Subject: [PATCH 2/5] ARM: uniphier: remove unused uniphier_pin_init() Date: Thu, 30 Jul 2020 18:28:05 +0900 Message-Id: <20200730092808.26521-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200730092808.26521-1-yamada.masahiro@socionext.com> References: <20200730092808.26521-1-yamada.masahiro@socionext.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean This function is unused since commit 862274913f8f ("bus: uniphier-system-bus: move hardware init from board files"). Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/Makefile | 1 - arch/arm/mach-uniphier/init.h | 1 - arch/arm/mach-uniphier/pinctrl-glue.c | 30 --------------------------- 3 files changed, 32 deletions(-) delete mode 100644 arch/arm/mach-uniphier/pinctrl-glue.c -- 2.17.1 diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile index 38b6d904f466..d333b7091d4b 100644 --- a/arch/arm/mach-uniphier/Makefile +++ b/arch/arm/mach-uniphier/Makefile @@ -20,7 +20,6 @@ obj-y += reset.o endif obj-$(CONFIG_MICRO_SUPPORT_CARD) += micro-support-card.o -obj-y += pinctrl-glue.o obj-$(CONFIG_MMC) += mmc-first-dev.o obj-y += fdt-fixup.o diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index dd978c020804..535c06343d81 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -73,7 +73,6 @@ void uniphier_pxs3_clk_init(void); unsigned int uniphier_boot_device_raw(void); int uniphier_have_internal_stm(void); int uniphier_boot_from_backend(void); -int uniphier_pin_init(const char *pinconfig_name); #ifdef CONFIG_ARM64 void uniphier_mem_map_init(unsigned long dram_base, unsigned long dram_size); diff --git a/arch/arm/mach-uniphier/pinctrl-glue.c b/arch/arm/mach-uniphier/pinctrl-glue.c deleted file mode 100644 index 2e0726469595..000000000000 --- a/arch/arm/mach-uniphier/pinctrl-glue.c +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2016 Socionext Inc. - * Author: Masahiro Yamada - */ - -#include -#include -#include - -#include "init.h" - -int uniphier_pin_init(const char *pinconfig_name) -{ - struct udevice *pctldev, *config; - int ret; - - ret = uclass_first_device(UCLASS_PINCTRL, &pctldev); - if (ret) - return ret; - - device_foreach_child(config, pctldev) { - if (strcmp(config->name, pinconfig_name)) - continue; - - return pinctrl_generic_set_state(pctldev, config); - } - - return -ENODEV; -} From patchwork Thu Jul 30 09:28:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247267 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2237244ilg; Thu, 30 Jul 2020 02:29:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiASsbqIAiH7Pv9DDMr/AFnYeR8E6mw5Sr8kEkX8/8vbSz7N22K6xLUelSNJhU2E9PmvkH X-Received: by 2002:a17:907:205c:: with SMTP id pg28mr1609599ejb.22.1596101356882; Thu, 30 Jul 2020 02:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596101356; cv=none; d=google.com; s=arc-20160816; b=sCO1GENyQ8z8yoyqBWkkmnmJ+6A1gIi9rE7kwHPtJpUgWpTbgjryBv6CkZJq++/O0w OGhwPHPvhuSZ16FSaS2TUq0aObcr7qqLJF5mDFXinjRiu2JAchiSettf6hpicQleCXGw /H1ZlKNNs4hD7j7rz7qImdy3YmZWIj+xR+IZvzPLxA4ccIPb5rhbmbrEmC5Do+w4+Ks6 tbQVHTpABujpgGmOHpxd4GlpjD0TnPR9lzykfArprkTosDNR7AKKy9DCUDYk4COvQtAL KZHfxsQHCqrwnaZ1Cvjr1iIaPRX3ajy5oet3365es+Afc6KFqVcwsyGyTgb9vz7KLkwa YTuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=z/Vms1e1UcDI9eiYQKrk0/n7Zz9x0iNL1OmHRNeQ6Qk=; b=X4HQQzJuxcN17fro4nF0J4gN4Hk2L1hZN1HREI+VGmJctH1far1Jf5VDmtT5sYIOJz fb5NiHevtPG3i4beXCQ6RHBN57xBbMNOWV9one7V05w06xUvqq+SsblJWTJgducWfY64 7C/8i0fPOSXBKoR77PjCmxp/tSRpk1oO3Qcv5O00GmtxOFf1O2bsj7q8UE+3cm6P2ULi ZnVNyGh2BJaSSwlmo0MvRVotqplpY2pjqCGJ6NUXGvdhEtHDaWMOcgvRTeMLWOA71M4e MIbqu4QDoMa1wOss8tS5HgZIQeEBNylmFRryoyq2AtYbjXuk5eHOr2B/jwOGzwQ3iPJN ij+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fJ2qbnMO; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id h14si79980ejd.603.2020.07.30.02.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fJ2qbnMO; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 165F181F13; Thu, 30 Jul 2020 11:29:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="fJ2qbnMO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C62188267D; Thu, 30 Jul 2020 11:29:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 378188265E for ; Thu, 30 Jul 2020 11:29:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 06U9SFXB003637; Thu, 30 Jul 2020 18:28:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 06U9SFXB003637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596101297; bh=z/Vms1e1UcDI9eiYQKrk0/n7Zz9x0iNL1OmHRNeQ6Qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fJ2qbnMOvFBzVKS00U8LnzA2YyybqpEtedeQoIy1otNyFWBiLuBCl9Kqg7yTiLOpf i86B2SoEPu8YwGNipDqpmrzxsUwcUjM+OpsxWnT2AVU4B7WvXuiV3XNuN/NnvklQmc KYfJNbxb4WkyV2PBXIbICeBvY5VBwifZd3u5P3iXkzNJ37ql8J3PN/vYoMRfKZLKM7 BSD2FdafvWouBdf3/I0ia1reMyZLpiEw8dFycOr+vYralFqw55PxijEty2NlyiYrcE Gbc7sFqTgz/tnmJpKcUsWL6W8fIxR3MKWzH/NKoZggBdRj8adYQKk+RwCUmFAuRpS6 TfEoS8h22sW9w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Tom Rini Subject: [PATCH 3/5] ARM: uniphier: remove unneeded header inclusion from board_late_init.c Date: Thu, 30 Jul 2020 18:28:06 +0900 Message-Id: <20200730092808.26521-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200730092808.26521-1-yamada.masahiro@socionext.com> References: <20200730092808.26521-1-yamada.masahiro@socionext.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean is unneeded since commit 9248a78f40d6 ("ARM: UniPhier: remove Denali NAND controller fixup code"). is uneeded since commit 1320fa2e55d2 ("ARM: uniphier: remove workaround for the NAND write protect"). Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/board_late_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index b800e8b8c6be..8c5e5bb58f65 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -9,9 +9,7 @@ #include #include #include -#include #include -#include #include #include "init.h" @@ -53,6 +51,7 @@ fail: static void uniphier_set_env_addr(const char *env, const char *offset_env) { + DECLARE_GLOBAL_DATA_PTR; unsigned long offset = 0; const char *str; char *end; From patchwork Thu Jul 30 09:28:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247266 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2237104ilg; Thu, 30 Jul 2020 02:29:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTCl3aIzLvwbqQIbhvGWSKxQDsSgBv0kesyFIKc/qnS25jFSbn8dsw8W4r1bJlYaWHA76i X-Received: by 2002:a17:906:3a0d:: with SMTP id z13mr1669676eje.109.1596101341367; Thu, 30 Jul 2020 02:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596101341; cv=none; d=google.com; s=arc-20160816; b=JinhhqIlCynY3MlaOvwMxXarH45yQcov6XgB8AtjQZiDAYqiffdcKl477ILr43hlDY dmFuZCORBx/7EbkR+BRXBBKkAcfKkK/CohRt/Ax216s9v23kUBTd0CpfQ+yBJcG2+a22 EA2xt9sjXno9QObxlouECcJrb5Gik4DBu3L/V3GzJNb9D8oECoxA9uFmPu4bMITTVp28 yvJ0Ft7bE35Kq/OZcqjt08yyVl/y7tj+Up7FFUdVCLF7hn82nLg6rRPu2xmZ+GEE6rjc RQN5xuSQO0OkO7dgisKuZNd6ROe3aYXn5ctKXOtp0bhTLPnJv88kLigiF2nvBgipymCU 9/JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=flETohdPAZXwRGnUJcB5kIWqoh3lX8vvqPdyHK28qX8=; b=jOSNdWIts9Fq0q1G5zDXcEeBOD7SWuIsyc/yWmmexoeNibs9tKhQov1muSxX3oqTvv kCTXZq1Xy5JWY4JspjvzZ7F+4bN+fPU796jHUkuuGkkeguve+9M7RCQ2eAsZLsnS8ca4 bA8d4IYvLGAiSxadKlXybq5dDbYnnkkDlKHXJwtqGXLCuOwX3QtdvQbJixQaXyTHoOi1 PgKyKxuTBqA9nMBh/ac348G6XAReVVKX8+pD0a9yx6CDAnIfj3IJZ+/TiyeMZ0IqBJRv XtZHnPJooAeTTv0qn9Plda84U2KITtyd1AIRhtCKtSY1rwgO+eTCk+5Sogkk+Efdk4Wi Rf/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=YTKGFDOB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id e15si1790995edy.357.2020.07.30.02.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=YTKGFDOB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E50DF82648; Thu, 30 Jul 2020 11:28:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="YTKGFDOB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9847A82653; Thu, 30 Jul 2020 11:28:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 47F7282619 for ; Thu, 30 Jul 2020 11:28:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 06U9SFXC003637; Thu, 30 Jul 2020 18:28:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 06U9SFXC003637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596101297; bh=flETohdPAZXwRGnUJcB5kIWqoh3lX8vvqPdyHK28qX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YTKGFDOB6uwI4PjR0XB7xLOzOZ4CDuQrS57UsWZah23aKZJ9l/c6vWnv/T2zIOgfD 407RqWCD1533FrZuMBeG62a+0AFjMVUY6mrb83Zho55INIl2Moe8zMaXRmA8fiWbaG wryZkFTO9XIzYEDZFQ9eoRMqsIf/Rm7WLfZunIsHT5phFKnIA4/0OU4tgSuffeGMTf C3CJnv7fpouN8li6D+VnCHn+oSYP395O82PWF+H3bnzv8EXwUyAPtEx/x9VpsQlPzG YyLcjqLcb/Ic6Dy58st41nvuykVb9PbMu+nGfbYRGMKs8PVj7efNlRJmQOAYLZNpGi q913kpcVGUrAw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada Subject: [PATCH 4/5] serial: uniphier: fix typo in comment Date: Thu, 30 Jul 2020 18:28:07 +0900 Message-Id: <20200730092808.26521-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200730092808.26521-1-yamada.masahiro@socionext.com> References: <20200730092808.26521-1-yamada.masahiro@socionext.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Masahiro Yamada --- drivers/serial/serial_uniphier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/serial/serial_uniphier.c b/drivers/serial/serial_uniphier.c index 4004cb8d48a4..a098028ca001 100644 --- a/drivers/serial/serial_uniphier.c +++ b/drivers/serial/serial_uniphier.c @@ -137,7 +137,7 @@ static int uniphier_serial_probe(struct udevice *dev) priv->uartclk = clk_data->clk_rate; - /* flush the trasmitter empty before changing hw setting */ + /* flush the trasmitter before changing hw setting */ while (!(readl(priv->membase + UNIPHIER_UART_LSR) & UART_LSR_TEMT)) ; From patchwork Thu Jul 30 09:28:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247269 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2237448ilg; Thu, 30 Jul 2020 02:29:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNffOqNGU96baVPlR+ERH+eiXtJDd2EcGtUZotQuhZg6ZP35zjXyob8Zz3EPWBmJXaR2Tm X-Received: by 2002:a17:907:104a:: with SMTP id oy10mr1695111ejb.267.1596101380499; Thu, 30 Jul 2020 02:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596101380; cv=none; d=google.com; s=arc-20160816; b=TPzbqrtHvNftvlrNL05X4APNDZbth19ihtYXLkCpvxII+AE1vTFoy5n5O6/3kYLEnC uvDGLPD3wpbE/Hcy2Wy51Dul52xe+go4i/v2AtLwlc3a1kiHqxbVHtlxmDl8mQEVdVSa W2x6VgsQ7C73VwJRs2UkFH7w8S5F5q1yurTah6Z+exwKdOtq0YKiGYjvoCNucz0EJTUI 8WAiSSIV/PuLUPEd+VG9xz/mbY0dX6nZq08NjgABZ+lLr+p44FXR2+ISKlneZBeQ3+4f xAWr2fbecGggKF5JvZ9wpHizFKxBObKm0drjPhL9mjDCDqy3Iew7sH486vktVL6a3DwX 8PcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=+N0FiVHtJ2p+JmShBqF6gsKo5j7aqlr8bVIjLTTP3KQ=; b=yg7l3ZOvBDZHBjRyg5V3xufQ7NIR/msYLLEVLmnu3BHmVssyWwOzZ19RtpikCeLSRk 5QuSAOp1XR8ra4buhqHxY+Ak/mTBN9Rf/wlYEb+Q2kOYMUhOMLyQkzH1P/KVqZj9Qa9Q 8F9gQpZF+zGVwU6AO4Xy9XGBx5xFzl6no1NQJp+/61o4bUf/01Eg/G37bbxPjnrLedzv kqN4ziQXY8i+mdKgCSDcYkk2qQvMYWtjo9WykWCJtAycbsYDysqz+JRYjXZKrQFTAIXN XRTKcGS6ljKk0k3zOQKm8POuxsU8LCtP8tlzQEs9UuNhJaMRgV8umBACNpmzogKSJES7 uzaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LLXT0nfp; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id j6si2957112edq.8.2020.07.30.02.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 02:29:40 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LLXT0nfp; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BFE48265E; Thu, 30 Jul 2020 11:29:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="LLXT0nfp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 14A1D8265E; Thu, 30 Jul 2020 11:29:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4804682666 for ; Thu, 30 Jul 2020 11:29:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id 06U9SFXD003637; Thu, 30 Jul 2020 18:28:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 06U9SFXD003637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596101298; bh=+N0FiVHtJ2p+JmShBqF6gsKo5j7aqlr8bVIjLTTP3KQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LLXT0nfpi2zUy2c89ki2WijSThe8j6u5Rpbgf2wyDg7MQEUWpPgd6kpNmHFs5Lc7z jSVSxAB4raas8v6zhnY3htfLRulbNYrDPy/OM6RBPCfc3h10Di6qk44xbq+mxZQfys 0Lt1FKf7KMLSt/2T/Whs/3ZwS6EreWGzdY0O4rWYL17ZpRp+F3j/f3YJ93J0WUoS01 sT0YF9WVfqeNzsMRAh4WbN0VeZkcPFUurhOl9ie/5ZIDac2UxMBzBTf19mZXBm8sAH C+s/d2B8/wJokaAuFoOITXdSN5TddEa+9PHTMqXDny9EsYG9jl50DSEBeXc58OeWEb 0wdaGRJe4F2yg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Tom Rini Subject: [PATCH 5/5] ARM: uniphier: use FIELD_GET() to get access to revision register fields Date: Thu, 30 Jul 2020 18:28:08 +0900 Message-Id: <20200730092808.26521-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200730092808.26521-1-yamada.masahiro@socionext.com> References: <20200730092808.26521-1-yamada.masahiro@socionext.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Define register fields as macros, and use FIELD_GET(). Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/sg-regs.h | 5 +++++ arch/arm/mach-uniphier/soc-info.c | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-uniphier/sg-regs.h b/arch/arm/mach-uniphier/sg-regs.h index f47d10194987..a0fa51a8b7be 100644 --- a/arch/arm/mach-uniphier/sg-regs.h +++ b/arch/arm/mach-uniphier/sg-regs.h @@ -10,6 +10,8 @@ #ifndef UNIPHIER_SG_REGS_H #define UNIPHIER_SG_REGS_H +#include + #ifndef __ASSEMBLY__ #include #ifdef CONFIG_ARCH_UNIPHIER_V8_MULTI @@ -24,6 +26,9 @@ extern void __iomem *sg_base; /* Revision */ #define SG_REVISION 0x0000 +#define SG_REVISION_TYPE_MASK GENMASK(23, 16) +#define SG_REVISION_MODEL_MASK GENMASK(10, 8) +#define SG_REVISION_REV_MASK GENMASK(4, 0) /* Memory Configuration */ #define SG_MEMCONF 0x0400 diff --git a/arch/arm/mach-uniphier/soc-info.c b/arch/arm/mach-uniphier/soc-info.c index f021a8cab330..b0221016d1ef 100644 --- a/arch/arm/mach-uniphier/soc-info.c +++ b/arch/arm/mach-uniphier/soc-info.c @@ -4,31 +4,30 @@ * Author: Masahiro Yamada */ +#include #include #include #include "sg-regs.h" #include "soc-info.h" -static unsigned int __uniphier_get_revision_field(unsigned int mask, - unsigned int shift) -{ - u32 revision = readl(sg_base + SG_REVISION); - - return (revision >> shift) & mask; -} - unsigned int uniphier_get_soc_id(void) { - return __uniphier_get_revision_field(0xff, 16); + u32 rev = readl(sg_base + SG_REVISION); + + return FIELD_GET(SG_REVISION_TYPE_MASK, rev); } unsigned int uniphier_get_soc_model(void) { - return __uniphier_get_revision_field(0x7, 8); + u32 rev = readl(sg_base + SG_REVISION); + + return FIELD_GET(SG_REVISION_MODEL_MASK, rev); } unsigned int uniphier_get_soc_revision(void) { - return __uniphier_get_revision_field(0x1f, 0); + u32 rev = readl(sg_base + SG_REVISION); + + return FIELD_GET(SG_REVISION_REV_MASK, rev); }