From patchwork Thu Aug 3 11:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Massimo Pegorer X-Patchwork-Id: 1816385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=gfntp4E+; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RGmLx678wz1ybS for ; Thu, 3 Aug 2023 21:09:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7DDE686AB7; Thu, 3 Aug 2023 13:09:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gfntp4E+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 289C386CA0; Thu, 3 Aug 2023 13:08:37 +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,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 085A886BFD for ; Thu, 3 Aug 2023 13:08:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=massimo.pegorer+oss@gmail.com Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9923833737eso116458666b.3 for ; Thu, 03 Aug 2023 04:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691060914; x=1691665714; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=VV8qMHbsvIuk28AwyiKtLIR/LUEMX4qe0vgONqzyBAw=; b=gfntp4E+7HlfsG67HDq/xozDliPU7STK8I1aLh64iPRCTdwjI4hDYSenFOSO/eQkFM dDYBGsBLiaGF9hgBo2wlCu9tSKaiZbkpwdx9ROvV9MHTZgkcrvN0/GZJpbFXnmGEYZk/ L2UQGUFd8xDTxOICS0B4Q10lJxeSYEQU12KSLR78qWl/OCuyOjeJqwIjm4hKg1YDRVwI UjChMk6S/mgGSPpuNUcyg+XIdiDVFeMstRGe46VN2QTuNn0cljyTBqlYBQLueLS66Auk fm9cI5Bic86AKDFdfkhy3d3j8UI7sRKlao4ytKGktw0Fp2UXKH8Ly0RsCy68xcuDv1Im ew6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691060914; x=1691665714; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VV8qMHbsvIuk28AwyiKtLIR/LUEMX4qe0vgONqzyBAw=; b=L4gpcARFx1h6jYYKFD2zxvUX2g4spynplnAVGzpf8q+YsnboY472aMT3sJEEc684uz 73NfIwOaB+V/WEDgoit+MFHmig1YLbl6KAGnBH9x1GNHL+YLCbefr0lJpYlKxWCjE0xg 5GZkb2M0NIB/jI/5nSLGgnGLT+upTqp9WZ8FbRAtSmOODq/ssLnoDisEB24JIoErTaek yERaEDlSYeeG2FIlVvJnBEMfmJLGoJ3b8q7W4Bu/aOMP13nibAElWNqZmj1uUeVfkBjT tpQ/97VR+edeaRkZ71GpP+rPhq0umQ7kdevTXfBad2y00exCDv3K8l3REl/BKGlh4Tbi xm4A== X-Gm-Message-State: ABy/qLbpjpUNSCwAd2HuyRR1SENnrsGlKJ7l9ZKGXOdOXVm8MRWAcWIz YZDGgSB9qVvRd39qfyijM66XfAKYWlqQtQ== X-Google-Smtp-Source: APBJJlG8Mc9O7+yK3V+Hb0RyuxqFg45SibqheSmlmpfLnTqzZwop6JvNCwf9N3vtXrn+qyckduSb7Q== X-Received: by 2002:a17:906:220b:b0:992:61c5:dab0 with SMTP id s11-20020a170906220b00b0099261c5dab0mr7469571ejs.62.1691060914278; Thu, 03 Aug 2023 04:08:34 -0700 (PDT) Received: from pegmas-T15.fritz.box ([151.71.248.167]) by smtp.gmail.com with ESMTPSA id e3-20020a17090681c300b00997d76981e0sm10329528ejx.208.2023.08.03.04.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 04:08:33 -0700 (PDT) From: Massimo Pegorer To: u-boot@lists.denx.de, Simon Glass , Philipp Tomsich , Kever Yang , Akash Gajjar Cc: Lukasz Majewski , Sean Anderson , Massimo Pegorer Subject: [PATCH 0/3] rockchip: rk3308: Fix two minor UART warnings Date: Thu, 3 Aug 2023 13:08:10 +0200 Message-Id: <20230803110813.175956-1-massimo.pegorer+oss@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 03 Aug 2023 13:09:10 +0200 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.8 at phobos.denx.de X-Virus-Status: Clean Two minor issues arise as warning during boot phases once log features and CONFIG_LOG_ERROR_RETURN are enabled: - clk_get_rate() return err (SPL, pre relocation and U-Boot proper phases) - uclass_get_device_by_phandle_id() return err (pre relocation phase only) Both issues are not fatal and do not cause any functional problem, anyway they are fixed with these patches. Moreover, the support added in RK3308 clock driver to get UARTs rate makes 'clock-frequency' property useless in RK3308 based boards *-u-boot.dtsi files: due to the fact that UART is inited by an external TPL, in other boot phases (SPL, U-Boot proper) there is no need to know UART clock from DT but get it just reading how external TPL has configured SoC registers. s() returning err=-2 U-Boot SPL 2023.07-00560-gf2090b144c (Jul 27 2023 - 16:27:11 +0200) Trying to boot from MMC1 INFO: Preloader serial: 0 NOTICE: BL31: v1.3(release):30f1405 NOTICE: BL31: Built : 17:08:28, Sep 23 2019 INFO: Lastlog: last=0x100000, realtime=0x102000, size=0x2000 INFO: ARM GICv2 driver initialized INFO: Using opteed sec cpu_context! INFO: boot cpu mask: 1 INFO: plat_rockchip_pmu_init: pd status 0xe b INFO: BL31: Initializing runtime services WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK ERROR: Error initializing runtime service opteed_fast INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x600000 INFO: SPSR = 0x3c9 clk_get_rate() returning err=-2 pinctrl_select_state_full() ns16550_serial serial@ff0a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 pinctrl_select_state_full() ns16550_serial serial@ff0a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 pinctrl_select_state_full() ns16550_serial serial@ff0a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2023.07-00560-gf2090b144c (Jul 27 2023 - 16:27:11 +0200) Model: Radxa ROCK Pi S DRAM: 512 MiB (effective 510 MiB) clk_get_rate() returning err=-2 Core: 287 devices, 23 uclasses, devicetree: separate MMC: mmc@ff480000: 1, mmc@ff490000: 0, mmc@ff4a0000: 2 Massimo Pegorer (3): clk: rockchip: rk3308: Fix ordering between masking and shifting clk: rockchip: rk3308: Support reading UART rate and clock registers dts: rockchip: rk3308: Avoid warning for serial probe on prereloc arch/arm/dts/rk3308-rock-pi-s-u-boot.dtsi | 29 +++++++- arch/arm/include/asm/arch-rk3308/cru_rk3308.h | 15 ++++ drivers/clk/rockchip/clk_rk3308.c | 69 +++++++++++++++++-- 3 files changed, 106 insertions(+), 7 deletions(-)