From patchwork Fri Jul 10 13:31:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1326837 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=85.214.62.61; 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=kZ44fKFv; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4B3DVh6bhfz9sDX for ; Fri, 10 Jul 2020 23:32:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36C0A8221A; Fri, 10 Jul 2020 15:32:19 +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="kZ44fKFv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DEB7F82252; Fri, 10 Jul 2020 15:32: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-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) (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 9477B821D6 for ; Fri, 10 Jul 2020 15:32: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 oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-07.nifty.com with ESMTP id 06ADVV4U009781; Fri, 10 Jul 2020 22:31:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 06ADVV4U009781 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1594387891; bh=6cuDg7uslXJCQtGTbc9RmW2F1DKssLy1LPYfm839aRk=; h=From:To:Cc:Subject:Date:From; b=kZ44fKFvPAJCcu9uv7Yubn/RV8UFJJ2bNfHHlGNRDYHijDFp3JSP5NTABDDsFbSNs PooV6PIFEO/ER59iQ1dD1cPVAtNkRZQCGBGkRbwCwofOTlubaUsAawK7QBrfor7ZLb 28yD8XyHjr7/lqKe7YvamceDBXiFsSK4tJIGZgYprJxPD/KciiVvFHVjy3ZzQ5Ta5L Yu7Hg9GQ50TSFuco/GeTZXP1J0wej/s6PyvhEgLDRUkXxKNLDeMdnwR22tRP0JhmYW yA67IziDXBwI1Q7tGm62AcrztUU3Jxmb5CqburP/ud+A6ufg6Pxp9n6LHzapV17GVj 7RWX9fqjilM8g== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , Tom Rini Subject: [PATCH] ARM: uniphier: remove NAND reset code Date: Fri, 10 Jul 2020 22:31:27 +0900 Message-Id: <20200710133127.327120-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Now that commit fceee65c878c ("mtd: nand: raw: denali: Assert reset before deassert") added the reset assertion, this code in the board file is unneeded. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/Makefile | 1 - arch/arm/mach-uniphier/board_init.c | 4 --- arch/arm/mach-uniphier/init.h | 7 ----- arch/arm/mach-uniphier/nand-reset.c | 43 ----------------------------- 4 files changed, 55 deletions(-) delete mode 100644 arch/arm/mach-uniphier/nand-reset.c diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile index e7eba75eed..38b6d904f4 100644 --- a/arch/arm/mach-uniphier/Makefile +++ b/arch/arm/mach-uniphier/Makefile @@ -22,7 +22,6 @@ endif obj-$(CONFIG_MICRO_SUPPORT_CARD) += micro-support-card.o obj-y += pinctrl-glue.o obj-$(CONFIG_MMC) += mmc-first-dev.o -obj-$(CONFIG_NAND_DENALI) += nand-reset.o obj-y += fdt-fixup.o endif diff --git a/arch/arm/mach-uniphier/board_init.c b/arch/arm/mach-uniphier/board_init.c index 39df91982c..528074f547 100644 --- a/arch/arm/mach-uniphier/board_init.c +++ b/arch/arm/mach-uniphier/board_init.c @@ -125,10 +125,6 @@ int board_init(void) if (initdata->misc_init) initdata->misc_init(); - led_puts("U3"); - - uniphier_nand_reset_assert(); - led_puts("Uboo"); return 0; diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index a20cafdfad..dd978c0208 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -75,13 +75,6 @@ int uniphier_have_internal_stm(void); int uniphier_boot_from_backend(void); int uniphier_pin_init(const char *pinconfig_name); -#ifdef CONFIG_NAND_DENALI -void uniphier_nand_reset_assert(void); -#else -static inline void uniphier_nand_reset_assert(void) -{ -} -#endif #ifdef CONFIG_ARM64 void uniphier_mem_map_init(unsigned long dram_base, unsigned long dram_size); #else diff --git a/arch/arm/mach-uniphier/nand-reset.c b/arch/arm/mach-uniphier/nand-reset.c deleted file mode 100644 index 11cadaabd8..0000000000 --- a/arch/arm/mach-uniphier/nand-reset.c +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 or later -/* - * Copyright (C) 2020 Socionext Inc. - * Author: Masahiro Yamada - */ - -#include -#include -#include -#include - -#include "init.h" - -/* - * Assert the Denali NAND controller reset if found. - * - * On LD4, the bootstrap process starts running after power-on reset regardless - * of the boot mode, here the pin-mux is not necessarily set up for NAND, then - * the controller is stuck. Assert the controller reset here, and should be - * deasserted in the driver after the pin-mux is correctly handled. For other - * SoCs, the bootstrap runs only when the boot mode selects ONFi, but it is yet - * effective when the boot swap is on. So, the reset should be asserted anyway. - */ -void uniphier_nand_reset_assert(void) -{ - struct udevice *dev; - struct reset_ctl_bulk resets; - int ret; - - ret = uclass_find_first_device(UCLASS_MTD, &dev); - if (ret || !dev) - return; - - /* make sure this is the Denali NAND controller */ - if (strcmp(dev->driver->name, "denali-nand-dt")) - return; - - ret = reset_get_bulk(dev, &resets); - if (ret) - return; - - reset_assert_bulk(&resets); -}