From patchwork Tue Oct 25 03:45:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 618112 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3134551pvb; Mon, 24 Oct 2022 20:46:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5a7Ehv+T17qpQgBfX08BvlZqVECFLXK9N4X3JbVDK5rMZCGlrev0PIlm1LAQGR65mKzHMR X-Received: by 2002:a05:6402:3509:b0:45d:c25b:b80e with SMTP id b9-20020a056402350900b0045dc25bb80emr33752313edd.250.1666669573875; Mon, 24 Oct 2022 20:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666669573; cv=none; d=google.com; s=arc-20160816; b=g9xMIfIG2v2pzvuXc18aE6oFe3Bs44OnkcaH05320Ar3GSJgZodkdad1UPMg/enPpQ Y47WNd2/ALKtM+mfL5n0th8iX3nxp7b2TZJVVF/VoJfVbIqwfnTTlE4VSm1mOaIhvC7M 96wG/OUA6Qiqu495To0fftc++MAlPciAfE2zK9nycwnEcU8hxKucaLIpockLcuaFJOdt IXlO42Zg7lUTijPsn2Ev1fZRHNuigT7zQRJSGgbf/Ht8s8uDfFrJsgsmf5OlDdhzg7Pn xPznxHv+UPSrukfimjzG82ntXRXLbIIUdUKzssWNULxgeWV5pZsWkedokQ6sx9p4+JpE ngHw== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=VjflpozRKyKPjH/rIdmEGyHXptDqXgp7l7Ocv//vYgU=; b=xDC7VkvGqPZLP0Q3sIJk02naXo6UqP1VJr2HUlplK8L8EsUgRs3BV+hg+qV/9QMc/+ hThfdsDdrFvD3BSbQLNlRgVUBnSPS5xF8N3iMxDvI6SBqovjaIo1HERAKR5aCXAV+3Hj B8hP594i1325FfzaiPhJAW04IjWymlKQjzHNiqfr4XAibb0eVgax7C07QiE+eLqQKMQ6 s18OFDYxdiFyQDiWn691+XmOIQtM6GQTQADTOCflRhLXQRTkP5Zp3A8ihU/fNr50iW+/ vAfYutklqGfA3oAoZqqxhNnx1ee53u93suSVKGw9IgPeQJU8Q6TPmHADPHUXvJjB3hTB 5R7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VWOpj0aj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id v10-20020aa7d64a000000b00446fdce2a62si1401634edr.420.2022.10.24.20.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 20:46:13 -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=@linaro.org header.s=google header.b=VWOpj0aj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C989681E12; Tue, 25 Oct 2022 05:46:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="VWOpj0aj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E91DD83F5C; Tue, 25 Oct 2022 05:46: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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DC5F383F26 for ; Tue, 25 Oct 2022 05:46:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jun.nie@linaro.org Received: by mail-pf1-x430.google.com with SMTP id y1so10742113pfr.3 for ; Mon, 24 Oct 2022 20:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VjflpozRKyKPjH/rIdmEGyHXptDqXgp7l7Ocv//vYgU=; b=VWOpj0aj4aiOQuO2Lmr45KOdqPhD88W3B1exqjkqAHXPSyTHUAWEZ9W5q1mZ7S8q0P gJlaXQAmIRkDoiZVsJ68a5HpCPRtJ3QF5YU1HO5RICyCxNSaA7Q8T9to0NxHZ+zXy+zH MYz+oelcP8pwtCJ3gS+FaOLCNsRVk7hZrWUgAetKax9UxDYWArM1Tv0elcioSep5aQzS CXsa80moRVw02o/zrCEd4cz24D3NVXk86gfCPlx9foZqpcb8C13o6v2Fnbi5YBgcYRYc RYjo5RaWyEZsPluWEywI0IE7IFKUZkhCy3+g5/vOnY14e7p2OVeJYPRoK9rZ+eFg3mSR nnzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VjflpozRKyKPjH/rIdmEGyHXptDqXgp7l7Ocv//vYgU=; b=c2HK8hnAsgoTQkd+mcXaBbpP3HvyNkwhC+4vqmoT/WueM7yHxJGQ6DylRSDM5eSCBl 18RW4lAWlm52g+gE484MDisS+e6E6V68WQ9hSS+beO/hYzR9vjFEJxB6aq1e9FGpd5iN uKC/00BLlo8CAz05r73Vnm48TjnfGkAPZgxe017K7I+4aup5h8rsSaHhLIrAyJTlLTpS Jwce9oX8SwcpAmmr70hKNM5+JH0jBKH6quVhZQRJh//j6Oxgm2qRSbZ97FtKG6TZdX3e QEYEIY557CM1FIIS9eak5y6WzZiODy4lUPaB/YK545yikxSa296s0VrKn33L9jGrN+h9 cRTg== X-Gm-Message-State: ACrzQf1JWABnll/R59wE90Ezd546rJMqbGkaY65O9F2yf/bNvAo0khXC f/jljeOtx8I2hyAJjXjH/sMnAQ== X-Received: by 2002:a62:51c3:0:b0:56b:a0e2:3c51 with SMTP id f186-20020a6251c3000000b0056ba0e23c51mr13022173pfb.68.1666669563034; Mon, 24 Oct 2022 20:46:03 -0700 (PDT) Received: from localhost.localdomain ([112.65.12.161]) by smtp.gmail.com with ESMTPSA id ik29-20020a170902ab1d00b00176b63535adsm404841plb.260.2022.10.24.20.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 20:46:02 -0700 (PDT) From: Jun Nie To: uboot-imx@nxp.com, marcel.ziswiler@toradex.com, sbabic@denx.de, richard.hu@technexion.com, festevam@gmail.com, vanessa.maegima@nxp.com, otavio@ossystems.com.br, u-boot@lists.denx.de Cc: shawn.guo@linaro.org, Jun Nie Subject: [PATCH] imx: spl: Add weak reset_cpu() Date: Tue, 25 Oct 2022 11:45:47 +0800 Message-Id: <20221025034547.76866-1-jun.nie@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Add weak reset_cpu() to reduce redundant code. And it ease the new platforms that only need a empty function to pass build without below compiling failure. arch/arm/lib/reset.o: In function `do_reset': /git/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu' make[1]: *** [scripts/Makefile.spl:526: spl/u-boot-spl] Error 1 make: *** [Makefile:2087: spl/u-boot-spl] Error 2 Signed-off-by: Jun Nie --- arch/arm/mach-imx/spl.c | 4 ++++ board/ronetix/imx7-cm/spl.c | 4 ---- board/technexion/pico-imx6ul/spl.c | 4 ---- board/technexion/pico-imx7d/spl.c | 4 ---- board/toradex/apalis_imx6/apalis_imx6.c | 4 ---- board/toradex/colibri_imx6/colibri_imx6.c | 4 ---- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index ef00969a5e..6abbdb8909 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -388,3 +388,7 @@ void *spl_load_simple_fit_fix_load(const void *fit) return (void *)new; } + +__weak void reset_cpu(void) +{ +} diff --git a/board/ronetix/imx7-cm/spl.c b/board/ronetix/imx7-cm/spl.c index d36f734e49..864e95b187 100644 --- a/board/ronetix/imx7-cm/spl.c +++ b/board/ronetix/imx7-cm/spl.c @@ -115,10 +115,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | \ PAD_CTL_PUS_PU47KOHM) diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index 251f5a1b7d..df01b5f8b5 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -147,10 +147,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \ PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c index df5f058577..75d6aa8445 100644 --- a/board/technexion/pico-imx7d/spl.c +++ b/board/technexion/pico-imx7d/spl.c @@ -127,10 +127,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 8d2642f25d..b59d7cceea 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -1056,10 +1056,6 @@ int board_fit_config_name_match(const char *name) } #endif -void reset_cpu(void) -{ -} - #endif /* CONFIG_SPL_BUILD */ static struct mxc_serial_plat mxc_serial_plat = { diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index ab2ab587ff..261e46bc35 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -1116,10 +1116,6 @@ int board_fit_config_name_match(const char *name) } #endif -void reset_cpu(void) -{ -} - #endif /* CONFIG_SPL_BUILD */ static struct mxc_serial_plat mxc_serial_plat = {