From patchwork Fri Feb 3 16:09:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 723803 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vFMmW0f6Cz9s76 for ; Sat, 4 Feb 2017 03:30:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DBC1CB3892; Fri, 3 Feb 2017 17:30:22 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id STFFjE9BzuSY; Fri, 3 Feb 2017 17:30:22 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ECEB5B3887; Fri, 3 Feb 2017 17:30:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 28C864ABEE for ; Fri, 3 Feb 2017 17:30:09 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cwDMx0UOAb-I for ; Fri, 3 Feb 2017 17:30:09 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gloria.sntech.de (gloria.sntech.de [95.129.55.99]) by theia.denx.de (Postfix) with ESMTPS id 047FD4ABD8 for ; Fri, 3 Feb 2017 17:30:08 +0100 (CET) Received: from host-78-129-33-179.dynamic.voo.be ([78.129.33.179] helo=phil.sntech) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1cZgRN-0002I2-Sb; Fri, 03 Feb 2017 17:10:25 +0100 From: Heiko Stuebner To: sjg@chromium.org Date: Fri, 3 Feb 2017 17:09:28 +0100 Message-Id: <20170203160939.27594-6-heiko@sntech.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170203160939.27594-1-heiko@sntech.de> References: <20170203160939.27594-1-heiko@sntech.de> Cc: romain.perier@collabora.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 05/16] rockchip: serial: Adapt rockchip of-platdata driver for rk3188 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add necessary structs to have the driver also work for the serial on the rk3188. Signed-off-by: Heiko Stuebner Reviewed-by: Simon Glass --- drivers/serial/serial_rockchip.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c index 6bac95a414..7e030a6aed 100644 --- a/drivers/serial/serial_rockchip.c +++ b/drivers/serial/serial_rockchip.c @@ -12,12 +12,19 @@ #include #include +#if defined(CONFIG_ROCKCHIP_RK3188) +struct rockchip_uart_platdata { + struct dtd_rockchip_rk3188_uart dtplat; + struct ns16550_platdata plat; +}; +struct dtd_rockchip_rk3188_uart *dtplat, s_dtplat; +#elif defined(CONFIG_ROCKCHIP_RK3288) struct rockchip_uart_platdata { struct dtd_rockchip_rk3288_uart dtplat; struct ns16550_platdata plat; }; - struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat; +#endif static int rockchip_serial_probe(struct udevice *dev) { @@ -32,6 +39,16 @@ static int rockchip_serial_probe(struct udevice *dev) return ns16550_serial_probe(dev); } +U_BOOT_DRIVER(rockchip_rk3188_uart) = { + .name = "rockchip_rk3188_uart", + .id = UCLASS_SERIAL, + .priv_auto_alloc_size = sizeof(struct NS16550), + .platdata_auto_alloc_size = sizeof(struct rockchip_uart_platdata), + .probe = rockchip_serial_probe, + .ops = &ns16550_serial_ops, + .flags = DM_FLAG_PRE_RELOC, +}; + U_BOOT_DRIVER(rockchip_rk3288_uart) = { .name = "rockchip_rk3288_uart", .id = UCLASS_SERIAL,