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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 986A7C433F5 for ; Wed, 13 Apr 2022 19:35:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 237B483AE2; Wed, 13 Apr 2022 21:35:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="ounIqEhL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2A64A83E38; Wed, 13 Apr 2022 21:35:37 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 D690A83AD0 for ; Wed, 13 Apr 2022 21:35:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7611DB8275E; Wed, 13 Apr 2022 19:35:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B128C385A3; Wed, 13 Apr 2022 19:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649878533; bh=OxX+mUgT+EIxqHPzT3ujAt/3LwJd6cvHlUS8L+ij0ec=; h=From:To:Cc:Subject:Date:From; b=ounIqEhL4dL/uMbtB1cgM2DkFrtUadBQh5d89cTjhcHrlUtgS88RgsJ4RLJY6M68w ucjvBwFXun+HNMa7yQDuKW7qr+9L7zCsikoS8v+MoS9R3hINDURUm/X2mtzexzv3M0 whkb/fz/0pGlyNesB25gR0/QAfSx2OFY8N+1CTI5G3bgj0IRf0iaWxD20s091xBNDO ZxXPrb5d3LOQz4/i9b9hGlY94IGZU+RbT8pejOyjKpVeza6cBb2g4ongm7k+nkbva8 27usJubYebyaLZUqoc3Scbp9PrEeQqxwCCrj2iOoxoraCFf6eue0D4rb2+TZfTPQw6 WjHirYk5DVVzw== Received: by pali.im (Postfix) id 10AC4805; Wed, 13 Apr 2022 21:35:30 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Merlijn Wajer , Tom Rini Cc: maemo-leste@lists.dyne.org, u-boot@lists.denx.de Subject: [UNTESTED PATCH] Nokia RX-51: Convert to CONFIG_DM_SERIAL Date: Wed, 13 Apr 2022 21:34:14 +0200 Message-Id: <20220413193414.16759-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean For CONFIG_DM_SERIAL it is required to increase CONFIG_SYS_MALLOC_F_LEN as default value is not enough for memory hungry CONFIG_DM_SERIAL code. Signed-off-by: Pali Rohár --- Who has serial console on the real device, please test this patch if serial console is still working. I do not have adapter for serial console so I tested this patch only in qemu. --- board/nokia/rx51/rx51.c | 12 ++++++++++++ configs/nokia_rx51_defconfig | 5 ++--- include/configs/nokia_rx51.h | 1 - 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 621cff095619..460d248eaaeb 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -788,3 +789,14 @@ U_BOOT_DRVINFOS(rx51_video) = { U_BOOT_DRVINFOS(rx51_kp) = { { "rx51_kp" }, }; + +static const struct ns16550_plat rx51_serial = { + .base = CONFIG_SYS_NS16550_COM3, + .reg_shift = 2, + .clock = CONFIG_SYS_NS16550_CLK, + .fcr = UART_FCR_DEFVAL, +}; + +U_BOOT_DRVINFOS(rx51_uart) = { + { "omap_serial", &rx51_serial }, +}; diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index d5688c7a212b..68acf01e9aeb 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -11,12 +11,12 @@ CONFIG_STATIC_MACH_TYPE=y CONFIG_MACH_TYPE=1955 CONFIG_SYS_TEXT_BASE=0x80008000 CONFIG_SYS_MALLOC_LEN=0xc0000 +CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_NR_DRAM_BANKS=2 CONFIG_TARGET_NOKIA_RX51=y CONFIG_SYS_LOAD_ADDR=0x80000000 CONFIG_OPTIMIZE_INLINING=y CONFIG_LTO=y -# CONFIG_SYS_MALLOC_F is not set # CONFIG_FIT is not set CONFIG_BOOTDELAY=30 CONFIG_AUTOBOOT_KEYED=y @@ -70,8 +70,7 @@ CONFIG_DM_KEYBOARD=y # CONFIG_MMC_VERBOSE is not set CONFIG_MMC_OMAP_HS=y CONFIG_MTD=y -CONFIG_CONS_INDEX=3 -CONFIG_SYS_NS16550=y +CONFIG_DM_SERIAL=y CONFIG_SPI=y CONFIG_USB=y CONFIG_USB_MUSB_UDC=y diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index e837b12b568f..f273e243e55d 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -43,7 +43,6 @@ #define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */ #define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK /* -- 2.20.1