From patchwork Sat Dec 15 06:05:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1013838 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="EGXmRl7f"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43Gxjn5PVHz9s5c for ; Sat, 15 Dec 2018 17:05:44 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id B5822C221EF; Sat, 15 Dec 2018 06:05:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 20E68C21F75; Sat, 15 Dec 2018 06:05:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D7360C21F75; Sat, 15 Dec 2018 06:05:31 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id 4193FC21F07 for ; Sat, 15 Dec 2018 06:05:31 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id g189so3659551pgc.5 for ; Fri, 14 Dec 2018 22:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=c+UobEf875mloin5WY6eIOWGy65SGrgZwzTssT8siV8=; b=EGXmRl7fD4IN1iPA8qpGpx0rsZtww4/pBBhnS2wesmpxhIPoO4cBVIh/ytjfFgb6mI YzzgNl/MDF3U0Se+fuPYKcHm7CHU3bNphXGSwldIa9u1Crn1UvU8CCn2Z1p4Kj+I5mYj 1wBqQzGM+DD/8sAnJlHJeWUlJvFojUM5Y989ObMuzVYcegFkVknCnq69J7PytfXWjRXb TXJ6tMT4q1XnLvmFLtnibh61XoVS9DCvL4paMJrLnADLp69PnPiQIBjCUddO/GsQMX/F QYs9VsqRwtTG5WfBJWPzfxiBQL8TuOIX2uXG6RXqwv+OcOYXLN7BmNbVimgJJ/6p6Hdf lJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c+UobEf875mloin5WY6eIOWGy65SGrgZwzTssT8siV8=; b=XIu24fLhwyWOFWGKF2cBTmYXpVn/Ha/oHlaKANV8SW9hMs69WHUTAIQKjXXZnQk6Vv h1jFJyINU78Pu9SZcXuWUk5tfhlFgjJ71e/SkfL9Inm0Py43ixZ8OF8O677xE2t91pXL H6cO4k5INaqyR169qr8vtDD/N8obSW9KJR/FbSvvr04edfRglyk/as5zXOhkuVoN+U3t bs4dbHBXhG5IBicT5P5Sh717NnDtOpaAJvTgkBXKH+Z22Ii5kkPNE4oXHaT5wRvvAUXY 8UqGNeMaAwVEdW0/T2kUoGMWbg84DlqdNuG6EOdqmnDD5YueTD5bvQs33PvvsDyHShzI 0bwA== X-Gm-Message-State: AA+aEWbPYS2jWLIl+AKdcqKtYgiaHP5/xTI4gCKrbGBVRvWEZA7CL7FC 1jvQVYWGo9Ln2unedpzFNqIJqg== X-Google-Smtp-Source: AFSGD/Uvz7+fzsnyN35OlHL2D/X9a0MS7VUrIkcH8NkkcNaP2O1E2m7OC3aj8hm+f+OVQwV7Kxu0/A== X-Received: by 2002:a62:6ec8:: with SMTP id j191mr5482607pfc.198.1544853928967; Fri, 14 Dec 2018 22:05:28 -0800 (PST) Received: from localhost.localdomain ([106.51.16.228]) by smtp.gmail.com with ESMTPSA id a4sm7153647pgv.70.2018.12.14.22.05.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 22:05:28 -0800 (PST) From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer Date: Sat, 15 Dec 2018 11:35:14 +0530 Message-Id: <20181215060516.61933-1-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 Cc: U-Boot Mailing List , Palmer Dabbelt , Alexander Graf , Christoph Hellwig , Atish Patra Subject: [U-Boot] [PATCH v3 0/2] SiFive UART support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This patchset adds SiFive UART driver for SiFive UART found on SiFive boards. The driver is tested on QEMU sifive_u machine. In fact, with this patchset same U-Boot binary boots on QEMU virt machine and QEMU sifive_u machine in both M-mode and S-mode. The patches are based upon latest RISC-V UBoot tree (git://git.denx.de/u-boot-riscv.git) at commit id 48cbf6246052de10d35b616b5efb2f783904a49d Changes since v2: - Added pending() callback implementation for tstc() console API to work correctly. Changes since v1: - Fixed copyright header in SiFive UART driver - Imply SIFIVE_SERIAL for QEMU emulation instead of enabling it in defconfigs. Anup Patel (2): drivers: serial: Add SiFive UART driver riscv: qemu: Imply SIFIVE_SERIAL for emulation board/emulation/qemu-riscv/Kconfig | 1 + drivers/serial/Kconfig | 13 ++ drivers/serial/Makefile | 1 + drivers/serial/serial_sifive.c | 215 +++++++++++++++++++++++++++++ 4 files changed, 230 insertions(+) create mode 100644 drivers/serial/serial_sifive.c