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 2D330C433EF for ; Sat, 9 Apr 2022 16:57:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BD0783DF7; Sat, 9 Apr 2022 18:56:27 +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=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hHBCoQ9Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB7178343B; Sat, 9 Apr 2022 18:55:41 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 C103183BF6 for ; Sat, 9 Apr 2022 18:55:36 +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=jbx6244@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id z99so4776124ede.5 for ; Sat, 09 Apr 2022 09:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xLffyhAYd/E168pMO3NkA4W4bilNANSKi/zXAD8KlDU=; b=hHBCoQ9ZLcGo2xFKWaS6E+r4oK4sQQQuP6sX/Whk6F6yrDJvJPVODti+SrySjmwvqB Vvx8w06Q5oHTfJA+ngI8M0ybJ55FzchaqOE7mtduDeb5xNV2KXielvqet/+Z8eUqadQI Ck765Qevdcp6bfBJJGBRQk/ZeRg3eSUQP4o4ScUsYv8SnsCzSKBhWZYLBYPP5IZQveRz MAM8i2FwdeCfCm8kBZMLslTdhnRsXNbafdu5WKVL1AxxqOuwskAx7DrvBeoR1pk2CgZJ jEYA5tINhpciMoxlnvQ1ikOdGPzk95irzwOl/1HR12W4a77pFGjaPbZ2Lo8FR35KjtTl MaWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xLffyhAYd/E168pMO3NkA4W4bilNANSKi/zXAD8KlDU=; b=LyKLj68jaDK4wQnmf4yIP9AzPR6cHZY0WhNm1skDbFNahYihNYWcDnhl3AAX4xHX4f IdcHA9UKFMy6BBSbxNtSWjLNO6zP/5LKhl5V2tnDSbsj1/MQ6CtjkIXH9Py5zf9sON0w DqKdugM0piOPDxPhmu3+TJASTnWkrbezxgArOOYRX+fsGdmGSiU94EWvdNDs0XF2ucMw X1wSi1hFJqMlC5HEkce5OqzC9cLH6pYcozDFu3qOUde4Aw74+69qyPrJZY3nZV+FuX7J R6ZGqP87O7O/oNu64UUT7cmWvbFgf/1PQ2obZpCL/7guabpkVrgKPlq0t5PYZzKtkb57 woEg== X-Gm-Message-State: AOAM530i1SKIe/2aadD8qXGiYxq2K2JJ3Kk4oI0Dd8HMdlPQsZQojAPT 0sORXPkROYs3GIEg+Q5V8s0= X-Google-Smtp-Source: ABdhPJwGcRE1WrNVqPnqcOq+sR6HH71djkrJ1LZo390dfXqHW7dD0zkSOzUZZN2ty5fGXyrZnhmNNg== X-Received: by 2002:a50:baa1:0:b0:418:849a:c66a with SMTP id x30-20020a50baa1000000b00418849ac66amr25394348ede.234.1649523334526; Sat, 09 Apr 2022 09:55:34 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id t14-20020a170906608e00b006d1455acc62sm10004538ejj.74.2022.04.09.09.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Apr 2022 09:55:34 -0700 (PDT) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, heiko@sntech.de, peng.fan@nxp.com, jh80.chung@samsung.com, u-boot@lists.denx.de Subject: [PATCH v5 13/13] rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL Date: Sat, 9 Apr 2022 18:55:14 +0200 Message-Id: <20220409165514.19220-14-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220409165514.19220-1-jbx6244@gmail.com> References: <20220409165514.19220-1-jbx6244@gmail.com> MIME-Version: 1.0 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 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 --- 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 -- 2.20.1