Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp617833imu; Fri, 11 Jan 2019 06:17:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Y6aWGioRptpShE6EdR2mGp7mtPdPx1FcZZu1FT9ZQNSByxpjyZYHiOhUQLKJoZCgCrqzm X-Received: by 2002:a17:902:b90b:: with SMTP id bf11mr14662584plb.284.1547216241398; Fri, 11 Jan 2019 06:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547216241; cv=none; d=google.com; s=arc-20160816; b=H20yO7Dal7KpmlURr+MBoJ12ctkqNM8e6SUZEbjnxqF2kV8Y11MywarthMub2eNnz0 e1G5jjSk0bWuj7qMtG5uWLjBE5lRUd1fFIZGVlYRkOVPJbRN07Of0ZGNqTOxGmyunw+e nc40OKF9Wr8CSXfBlEgIrRieBaZ5PW4iIKv7MXvX+h9bizp165bNTdXd/nfX5TPtlsO6 GnaeCCzKc5i516C1MIerVFGbdvm+68Tj+fUuJHSi32qRVEIYMqWcK33gQoBRsepYwr9p SSloO5E+FeGeqtxTcpYJOOpaE5imgmA8bBPBlAJfrICZewXnJkydu3C1loub+C4wcV1l J4rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iCboTPOZEsIJhvmech9H+xpyazvbxiQ3ukJhOtVy2aI=; b=wlTZLxs/Sq57DKF3usho0Dcp8NFZ5Zrp8obepoCCvqr+6Jy9rx0YGDRznNXr+fJyTj X9eAej/bfuii1OJoAYAibfHv1hBe2icvCV9owx1IZ82wf+ASZQvNLdKfVA33Pe/rneX5 G9MUFf9oM2uCKdykp08J4Y1f4eGoru+pOGOMXivfDyhx66Nt49URpHBa2G+sL8dKQ2+m z1rpqlfVf+WKQ4VbT1Ja6KUduTgvdNlaU8sdTbjOQLBVQWSWl/Vlt+eqL/sFPExtfpND QQm79kCjdQEDNWcgk6wml4Mui8PmE+arKb6QHnyyoIuCHNprMFOcBGNG9Q3Q9ZV9F53Q 1fkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=mvNnOY5K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si26196384pgj.300.2019.01.11.06.17.05; Fri, 11 Jan 2019 06:17:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=mvNnOY5K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729734AbfAKLNo (ORCPT + 99 others); Fri, 11 Jan 2019 06:13:44 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39370 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbfAKLNn (ORCPT ); Fri, 11 Jan 2019 06:13:43 -0500 Received: by mail-wr1-f65.google.com with SMTP id t27so14740653wra.6 for ; Fri, 11 Jan 2019 03:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iCboTPOZEsIJhvmech9H+xpyazvbxiQ3ukJhOtVy2aI=; b=mvNnOY5KzGyN8P8YNvsZEJ4Ct9MEd8+eoEzDhrsjmnn/QF9XNOaP0rbwsZXrIevrSv lZaFre1lAEzrucFLWyzk2Z85iUlWnoDrcWcLDjwUCDElC5QbJigb41S1Ak6gNIAsXE2m A9GZX/zne+xt/vb522i2HTvAYmaYTR4/z+RViGQvRILyXopUg9tipBtUO4iTeuRkhvjj GdcngrN2I19NsJgPvkwUr77+DycOrKnxQhWpcqyEYXzZRPqZW8DO/8rVwJIyxJbBIRfW CdsAcV9rKvqMnKh4f4TpsGGM8vgkTZg/dF0i4Usht2KGiLvixzEU6Pe80sHpufq1q4D3 LJBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iCboTPOZEsIJhvmech9H+xpyazvbxiQ3ukJhOtVy2aI=; b=D3rOo0NK4g8V6OXzSwE4HmqvOHHY7TcBUJSenDrWe3vRIorEi+qxTXFftT2J4CgLpX /xPtCrMmZN3hYG4OJ+QOS6GayqKAkhQ/VFhjm8ShMyXv+f3Nb0P7PdkulrsQjpIEQY1e Hr26seWEw22C4DVuQC75SIdS1dFS8NKR/w1n7G6zRdH7PINjdJ0KDFPaAi8bzfsIezY5 Cgtf8dBPTQ0iCG+0rl9poyqp+e3Glqsry24xj++8Pmzlfo+3+S9DqYWdPItzAXMfQI9a aCmIhu5kioNYqzEcoc9DMpYnEQNFkwInOgV9a84LKoOJfP6yiKOiqLZXcwyLF7rkQ94F XS0Q== X-Gm-Message-State: AJcUukcIsIIi1+Eya4JRcBeMXhrMoDQ3jd/uggUncgVEZuJaWjHv1CSo GBMOJCK4KFTftDMJmmUaI+nnxJql7GWq0QieZy5cPg== X-Received: by 2002:adf:f785:: with SMTP id q5mr13771853wrp.9.1547205221410; Fri, 11 Jan 2019 03:13:41 -0800 (PST) MIME-Version: 1.0 References: <20181204135507.3706-1-anup@brainfault.org> <20181204135507.3706-2-anup@brainfault.org> In-Reply-To: From: Anup Patel Date: Fri, 11 Jan 2019 16:43:30 +0530 Message-ID: Subject: Re: [PATCH] tty/serial: use uart_console_write in the RISC-V SBL early console To: Andreas Schwab Cc: Greg Kroah-Hartman , Jiri Slaby , Palmer Dabbelt , Albert Ou , Atish Patra , Christoph Hellwig , Rob Herring , linux-riscv@lists.infradead.org, "linux-kernel@vger.kernel.org List" , linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2019 at 10:41 PM Andreas Schwab wrote: > > This enables proper NLCR processing. > > Suggested-by: Anup Patel > Signed-off-by: Andreas Schwab > --- > drivers/tty/serial/earlycon-riscv-sbi.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/tty/serial/earlycon-riscv-sbi.c b/drivers/tty/serial/earlycon-riscv-sbi.c > index e1a551aae3..ce81523c31 100644 > --- a/drivers/tty/serial/earlycon-riscv-sbi.c > +++ b/drivers/tty/serial/earlycon-riscv-sbi.c > @@ -10,13 +10,16 @@ > #include > #include > > -static void sbi_console_write(struct console *con, > - const char *s, unsigned int n) > +static void sbi_putc(struct uart_port *port, int c) > { > - int i; > + sbi_console_putchar(c); > +} > > - for (i = 0; i < n; ++i) > - sbi_console_putchar(s[i]); > +static void sbi_console_write(struct console *con, > + const char *s, unsigned n) > +{ > + struct earlycon_device *dev = con->data; > + uart_console_write(&dev->port, s, n, sbi_putc); > } > > static int __init early_sbi_setup(struct earlycon_device *device, > -- > 2.20.1 > > -- > Andreas Schwab, SUSE Labs, schwab@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." Looks good to me. Reviewed-by: Anup Patel Regards, Anup