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 X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77330C433B4 for ; Fri, 21 May 2021 13:28:47 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A17561164 for ; Fri, 21 May 2021 13:28:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A17561164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QqNRYzZTRXDfpO+sn3y2LOoTRrC7LmJg1Ax5+/iAVbU=; b=RSniHClGqxUWvfOeUqDv2a2JmC /G1s0ZghMSNlx9kLL29Zqan87CoQ47bDcAoY+yLu7Ep4BnXPN7wIP98RT/Xh51cH3lX6X1vrTtNSg 7rTpORfFRBSIq0swaXp+0i5gk/6Yn5EFsXrDEsSDIstyLSaXGXR7lREGQIz8ux4CghR3uRMs+Mecx xsERdBWOdLi2ZWtCHlSZ6gUtqICAX5Q9kjf2rmCaFSgbutvMRUDQZs0RINAY/+8N+EndADw86qIHG xnnr4ZGhJ8AbTXYFQqiFvsCGltYSxSxD6cFp5wRW0Ws9YIQwEH29d6YZI/tymQA2AN5G3kLE3nEG3 lDiUU5nA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk5BC-005Vt0-8K; Fri, 21 May 2021 13:27:06 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk5B7-005Vqd-Rm for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 13:27:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nALjNO1NNzuBgJsBKkuRLfzdmUfp2pocRq1SvmK+pwE=; b=brIae9ZS2ER1oH6+5YKfM5gukr zrDq7rpeauLEA3Enr//rfPDMjfcHJsxK+ilzGetST6XX7hgQQh+2JjNoaUPALto8Dh0op3Wn++N+C TC2acq5Dm7rYAhjH/OgYzhaE7ZwnkBzEPEjM/gEA/9hianOpEObk5pPnjSjrIEQUY0mj0eL3unCN7 xwIDkZVHUz6YEx89BqQPfukkJjMPAHJi9FGh4zTSWXNDCfPxlMfTbIrb+P1HJ6rESCXAQSLFwIv3u u4wwG4rorHEBQMdiVNw4gMlDe5xrkMhy5Y9oEMAnHFg3Wl6Upbu4N7uWNwGpyGo7ZibLvN9MD0WWx pRlvEoWw==; Received: from mail-vk1-f173.google.com ([209.85.221.173]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lk5B5-00H8tJ-9r for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 13:27:00 +0000 Received: by mail-vk1-f173.google.com with SMTP id n7so4276322vkl.2 for ; Fri, 21 May 2021 06:26:57 -0700 (PDT) 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=nALjNO1NNzuBgJsBKkuRLfzdmUfp2pocRq1SvmK+pwE=; b=AbulHp7TFzZvYldFka2jEB/MKoTpfvDtRjN5grwGMCSDdjnqfCTEUdbSIXvg6rvWW8 +jYtRqFYM/AfFyJXS78u6PkThJMSmelZHrFZeRMb1F5p01mmbnRRNydhwaoscPJWZn6C lVmcVFNCmF0HjX/AmH1tSjpw5r9Rmh+Mb34ul6uxwzj0uMnxMzZFEZ0Zd1ZuxH2QVl/3 leKyDkYCMFNBjQM8fx+NIcFxkOs98rSzvwQOm2fL/3M3lIS/ONODPw/vR921OHJw82l7 NhLka3LHOs9Oh2RD39tNjDDmRl1bH4Y/SBGLtAIE+oloz5cSroz7soBNTpy8EWB7xAT4 EnEA== X-Gm-Message-State: AOAM532MocXgG3fOkbubBZEcnhiG3FFtcVms3x1Rp7l0Gpf7NeFNxaQs +pSU1DKhamvxCls8hxjM2UjNlNWRD0BD73ewcq4= X-Google-Smtp-Source: ABdhPJygoEQwq7jd+zWCduTRNR1S0jH3r5s+WptgfvrzjUs6HpafzgXjDNeh7jnILhWaxTadyffP3VHnsfRzwl6y/KY= X-Received: by 2002:a1f:d8c3:: with SMTP id p186mr9636190vkg.1.1621603617121; Fri, 21 May 2021 06:26:57 -0700 (PDT) MIME-Version: 1.0 References: <20210514192218.13022-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20210514192218.13022-11-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20210514192218.13022-11-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Fri, 21 May 2021 15:26:45 +0200 Message-ID: Subject: Re: [PATCH 10/16] serial: sh-sci: Add support for RZ/G2L SoC To: Lad Prabhakar Cc: Rob Herring , Magnus Damm , Michael Turquette , Stephen Boyd , Greg Kroah-Hartman , Catalin Marinas , Will Deacon , Jiri Slaby , Philipp Zabel , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Linux-Renesas , linux-clk , "open list:SERIAL DRIVERS" , Linux ARM , Biju Das , Prabhakar , Chris Brandt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_062659_363109_4A75F9E0 X-CRM114-Status: GOOD ( 28.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Prabhakar, On Fri, May 14, 2021 at 9:23 PM Lad Prabhakar wrote: > From: Biju Das > > Add serial support for RZ/G2L SoC with earlycon and > extended mode register support. > > Signed-off-by: Biju Das > Reviewed-by: Lad Prabhakar Thanks for your patch! > --- a/drivers/tty/serial/sh-sci.c > +++ b/drivers/tty/serial/sh-sci.c > @@ -306,6 +306,7 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = { > [SCFDR] = { 0x0E, 16 }, > [SCSPTR] = { 0x10, 16 }, > [SCLSR] = { 0x12, 16 }, > + [SEMR] = { 0x14, 8 }, This is the parameter section for RZ/T and RZ/A2. Please update the comments above, to say this also applies to RZ/G2L. I can confirm the documentation for RZ/T1 and RZ/A2 agrees about the existence and behavior of SEMR. > }, > .fifosize = 16, > .overrun_reg = SCLSR, > @@ -2527,6 +2528,8 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, > case 27: smr_val |= SCSMR_SRC_27; break; > } > smr_val |= cks; > + if (sci_getreg(port, SEMR)->size) > + serial_port_out(port, SEMR, 0); As this is done in both branches of the if() statement, I think it should be moved up. > serial_port_out(port, SCSCR, scr_val | s->hscif_tot); > serial_port_out(port, SCSMR, smr_val); > serial_port_out(port, SCBRR, brr); > @@ -2561,6 +2564,8 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, > scr_val = s->cfg->scscr & (SCSCR_CKE1 | SCSCR_CKE0); > smr_val |= serial_port_in(port, SCSMR) & > (SCSMR_CKEDG | SCSMR_SRC_MASK | SCSMR_CKS); > + if (sci_getreg(port, SEMR)->size) > + serial_port_out(port, SEMR, 0); (else branch) > serial_port_out(port, SCSCR, scr_val | s->hscif_tot); > serial_port_out(port, SCSMR, smr_val); > } > @@ -3170,6 +3175,10 @@ static const struct of_device_id of_sci_match[] = { > .compatible = "renesas,scif-r7s9210", > .data = SCI_OF_DATA(PORT_SCIF, SCIx_RZ_SCIFA_REGTYPE), > }, > + { > + .compatible = "renesas,scif-r9a07g044", > + .data = SCI_OF_DATA(PORT_SCIF, SCIx_RZ_SCIFA_REGTYPE), > + }, > /* Family-specific types */ > { > .compatible = "renesas,rcar-gen1-scif", The rest looks good to me. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel