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 11403C433EF for ; Mon, 11 Apr 2022 02:26:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9EB683DAA; Mon, 11 Apr 2022 04:26:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 297D483DA4; Mon, 11 Apr 2022 04:26:32 +0200 (CEST) Received: from mail-m17664.qiye.163.com (mail-m17664.qiye.163.com [59.111.176.64]) (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 2C39A83DB7 for ; Mon, 11 Apr 2022 04:26:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m17664.qiye.163.com (Hmail) with ESMTPA id D06BB140278; Mon, 11 Apr 2022 10:26:16 +0800 (CST) Message-ID: <4e91b069-ac8c-1bf6-8a52-dabb57401d29@rock-chips.com> Date: Mon, 11 Apr 2022 10:26:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v5 13/13] rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL Content-Language: en-US To: Johan Jonker Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, heiko@sntech.de, peng.fan@nxp.com, jh80.chung@samsung.com, u-boot@lists.denx.de References: <20220409165514.19220-1-jbx6244@gmail.com> <20220409165514.19220-14-jbx6244@gmail.com> From: Kever Yang In-Reply-To: <20220409165514.19220-14-jbx6244@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUlKS0tKN1dZLVlBSVdZDwkaFQgSH1lBWRlNQxlWHUtNGhlJSU 9PGhpMVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PBw6CBw4DD5KM0IOPT9KHBce QxEKCSpVSlVKTU9CTU9IQkxMSU1PVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFITkhLNwY+ X-HM-Tid: 0a8016717934da2fkuwsd06bb140278 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 On 2022/4/10 00:55, Johan Jonker wrote: > The serial_rockchip.c driver converts platdata to the data structure > used in the ns16550.c file and then calls the function > ns16550_serial_probe(). > When compiled with OF_REAL the serial_rockchip.c driver returns > now -ENODEV when probed and does no harm. > The config ROCKCHIP_SERIAL is currently depends on SPL_OF_PLATDATA. > Allow serial port use for both SPL and TPL by removing this > dependency and SPL_BUILD restriction. > > Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Thanks, - Kever > --- > drivers/serial/Kconfig | 4 ++-- > drivers/serial/Makefile | 2 -- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig > index 06a69e78de..9bf83b29ca 100644 > --- a/drivers/serial/Kconfig > +++ b/drivers/serial/Kconfig > @@ -762,11 +762,11 @@ config PL01X_SERIAL > > config ROCKCHIP_SERIAL > bool "Rockchip on-chip UART support" > - depends on DM_SERIAL && SPL_OF_PLATDATA > + depends on DM_SERIAL > select SYS_NS16550 > help > Select this to enable a debug UART for Rockchip devices when using > - CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). > + OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). > This uses the ns16550 driver, converting the platdata from of-platdata > to the ns16550 format. > > diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile > index b68b5e7b2b..d8e26d72ea 100644 > --- a/drivers/serial/Makefile > +++ b/drivers/serial/Makefile > @@ -46,9 +46,7 @@ obj-$(CONFIG_MXC_UART) += serial_mxc.o > obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o > obj-$(CONFIG_MESON_SERIAL) += serial_meson.o > obj-$(CONFIG_INTEL_MID_SERIAL) += serial_intel_mid.o > -ifdef CONFIG_SPL_BUILD > obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o > -endif > obj-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o > obj-$(CONFIG_SANDBOX_SERIAL) += sandbox.o > obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o