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: 1338726 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=IDfVf3Vz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHQ9b084Jz9sRW for ; Thu, 30 Jul 2020 19:29:54 +1000 (AEST) 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(-) 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: 1338724 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=jWXpA5p9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHQ9720nrz9sRW for ; Thu, 30 Jul 2020 19:29:31 +1000 (AEST) 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 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: 1338723 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=fJ2qbnMO; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHQ8v1psVz9sRW for ; Thu, 30 Jul 2020 19:29:19 +1000 (AEST) 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(-) 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: 1338722 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=YTKGFDOB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHQ8m1hNHz9sRW for ; Thu, 30 Jul 2020 19:29:10 +1000 (AEST) 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(-) 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: 1338725 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=LLXT0nfp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHQ9L6ssMz9sRW for ; Thu, 30 Jul 2020 19:29:42 +1000 (AEST) 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(-) 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); }