From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39315C433F5 for ; Wed, 10 Nov 2021 08:23:30 +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 832BA60200 for ; Wed, 10 Nov 2021 08:23:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 832BA60200 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 0310B83994; Wed, 10 Nov 2021 09:23:28 +0100 (CET) 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=1636532608; bh=d1Gs5tAaNAVTMk+Gf9quiLJy6sslFQaiuuuoSM4lENA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cToxfpktHSg0p+lcefHinqAqZS9nujngzX9pdM0gq3BcVkwicvXG2UIxdZygcwXs4 AgoTP29A1/D9+GuMUHgBkC20WqLqP7IC5mNGaSmMEFqoYL5Wck9GsQAWP77v1f+1VF PwpZ55JaMV0QNcWBFPPrUEZgE+MxRZJN4EucRMc9D2nKvfAccZuYDdk5gZH1gXpqms 4GPXULVxWdNJS3feEqmcWRdYGzvMIdugEMhk2uUiHSEo+LxeG4MIhVLmgdEthg7P1E ziOl7k87lcrfMOgrb82ZO5pBtiosZRuQmcQene0jvnogY0fNeLvR5+8q7VQPbNF6w2 gWr3KcrSjH6kw== Received: by phobos.denx.de (Postfix, from userid 109) id 233C483995; Wed, 10 Nov 2021 09:23:26 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (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 D8DF983992 for ; Wed, 10 Nov 2021 09:23:22 +0100 (CET) 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 smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3:0]) (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-107.mailbox.org (Postfix) with ESMTPS id 4HpyXp5WfBzQkFx; Wed, 10 Nov 2021 09:23:22 +0100 (CET) Message-ID: <7f4d5741-f470-00fb-f4fe-03e97f1f8190@denx.de> Date: Wed, 10 Nov 2021 09:23:16 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 01/11] tools: kwbimage: Add support for new commands UART_PORT and UART_MPP Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de, =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20211108171251.25382-1-kabel@kernel.org> <20211108171251.25382-2-kabel@kernel.org> From: Stefan Roese In-Reply-To: <20211108171251.25382-2-kabel@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 08.11.21 18:12, Marek Behún wrote: > From: Pali Rohár > > These two commands allow to specify custom setting of UART port used for > printing BootROM messages. > > Signed-off-by: Pali Rohár > Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwbimage.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index 67c0c628ae..f24d49496b 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -101,6 +101,8 @@ enum image_cfg_type { > IMAGE_CFG_DATA, > IMAGE_CFG_DATA_DELAY, > IMAGE_CFG_BAUDRATE, > + IMAGE_CFG_UART_PORT, > + IMAGE_CFG_UART_MPP, > IMAGE_CFG_DEBUG, > IMAGE_CFG_KAK, > IMAGE_CFG_CSK, > @@ -129,6 +131,8 @@ static const char * const id_strs[] = { > [IMAGE_CFG_DATA] = "DATA", > [IMAGE_CFG_DATA_DELAY] = "DATA_DELAY", > [IMAGE_CFG_BAUDRATE] = "BAUDRATE", > + [IMAGE_CFG_UART_PORT] = "UART_PORT", > + [IMAGE_CFG_UART_MPP] = "UART_MPP", > [IMAGE_CFG_DEBUG] = "DEBUG", > [IMAGE_CFG_KAK] = "KAK", > [IMAGE_CFG_CSK] = "CSK", > @@ -161,6 +165,8 @@ struct image_cfg_element { > struct ext_hdr_v0_reg regdata; > unsigned int regdata_delay; > unsigned int baudrate; > + unsigned int uart_port; > + unsigned int uart_mpp; > unsigned int debug; > const char *key_name; > int csk_idx; > @@ -1239,7 +1245,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, > main_hdr->nandbadblklocation = e->nandbadblklocation; > e = image_find_option(IMAGE_CFG_BAUDRATE); > if (e) > - main_hdr->options = baudrate_to_option(e->baudrate); > + main_hdr->options |= baudrate_to_option(e->baudrate); > + e = image_find_option(IMAGE_CFG_UART_PORT); > + if (e) > + main_hdr->options |= (e->uart_port & 3) << 3; > + e = image_find_option(IMAGE_CFG_UART_MPP); > + if (e) > + main_hdr->options |= (e->uart_mpp & 7) << 5; > e = image_find_option(IMAGE_CFG_DEBUG); > if (e) > main_hdr->flags = e->debug ? 0x1 : 0; > @@ -1441,6 +1453,12 @@ static int image_create_config_parse_oneline(char *line, > case IMAGE_CFG_BAUDRATE: > el->baudrate = strtoul(value1, NULL, 10); > break; > + case IMAGE_CFG_UART_PORT: > + el->uart_port = strtoul(value1, NULL, 16); > + break; > + case IMAGE_CFG_UART_MPP: > + el->uart_mpp = strtoul(value1, NULL, 16); > + break; > case IMAGE_CFG_DEBUG: > el->debug = strtoul(value1, NULL, 10); > break; > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de