Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 364F2C4338F for ; Mon, 16 Aug 2021 08:04:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2CE761AFA for ; Mon, 16 Aug 2021 08:04:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A2CE761AFA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CE4C080C87; Mon, 16 Aug 2021 10:04:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1629101092; bh=0mNUNSNESg147yadcRUEQfehIqD24wMRm1dPSuh1xeQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t55yARUJn6zA1+uVyv1rWiDUTBxJPZU8gtc2/c1prqfbLT70Ue30HTeGMq6SmPUQz xX5+cgx8aoPrdhc0LA9LJhJ0z6b6oPLvLMf/8Lxp4WC/49K4IjQcda63Fswolrmgn0 pYhRLuJQ1qVftAe47k+Si+3BOvWDezh2oDAE0qgyZ8zdpWh3lyUxOOa8nFbfnJqXzF fZtYoNCPWQa9tWY/fpcrkKSHlgJCGhYxvRYiJY+DOtL5lp+5Hwa7nEivrhg8yCEY/2 7GkOXec4ILZWQ3OjucqdYlvCLgUrSESGRYGnhppAFvrqlkrcvT2SeZFyFkNB3Piy3L nkqP1ZM9jg2EA== Received: by phobos.denx.de (Postfix, from userid 109) id 8524B8296A; Mon, 16 Aug 2021 10:04:50 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:1::465:204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 556CA800D0 for ; Mon, 16 Aug 2021 10:04:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4Gp6C20j46zQkH1; Mon, 16 Aug 2021 10:04:46 +0200 (CEST) Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id t_4nqy_h-8TU; Mon, 16 Aug 2021 10:04:39 +0200 (CEST) Subject: Re: [PATCH 2/2] serial: a37xx: Do not call get_ref_clk() in _debug_uart_init() To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Marek Behun Cc: Konstantin Porotchkin , u-boot@lists.denx.de References: <20210726125859.5588-1-pali@kernel.org> <20210726125859.5588-2-pali@kernel.org> <20210726165522.55a21808@thinkpad> <20210726145804.lktqk73qkxac7mwb@pali> <20210726172426.0f7de52a@thinkpad> <20210811185751.w2sxsd24ln52adlz@pali> From: Stefan Roese Message-ID: Date: Mon, 16 Aug 2021 10:04:39 +0200 MIME-Version: 1.0 In-Reply-To: <20210811185751.w2sxsd24ln52adlz@pali> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DFE341861 X-Rspamd-UID: 9433c8 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Pali, On 11.08.21 20:57, Pali Rohár wrote: > On Monday 26 July 2021 17:24:26 Marek Behun wrote: >> On Mon, 26 Jul 2021 16:58:04 +0200 >> Pali Rohár wrote: >> >>> On Monday 26 July 2021 16:55:22 Marek Behun wrote: >>>> On Mon, 26 Jul 2021 14:58:59 +0200 >>>> Pali Rohár wrote: >>>> >>>>> Static inline function _debug_uart_init() should avoid calling external >>>>> (non-inline) functions. >>>> >>>> Why? >>> >>> Function is called in stage when stack is not fully initialized and >>> documentation suggest to avoid stack usage and other functions. >> >> OK, but maybe we should use the macro names for register constants. >> >> Could you move (in a separate patch) the corresponding macros from >> arch/arm/mach-mvebu/armada3700/cpu.c to >> arch/arm/mach-mvebu/include/mach/soc.h and then in this patch >> include in the serial driver and use the constant >> names? > > Implemented in separate patch as Stefan wanted: > http://patchwork.ozlabs.org/project/uboot/patch/20210811185330.15414-2-pali@kernel.org/ Did I really want this? You're removing the macro names with this patch, and I would prefer using the defines/names instead of register numbers like here: +#elif defined(CONFIG_ARMADA_3700) +/* SAR values for Armada 3700 */ +#define CONFIG_SYS_REF_CLK ((readl(MVEBU_REGISTER(0x13808)) & BIT(9)) ? \ + 40000000 : 25000000) #endif Or did I miss something? Thanks, Stefan