Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1398641pxj; Fri, 21 May 2021 13:16:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7zAzS+rqniHj3PT6GFxQ6xv/7HIuMe+hWUagQG1KjVnaEXFjWjCGMbqv2J/wUDbjg7TPv X-Received: by 2002:a6b:e50d:: with SMTP id y13mr631596ioc.204.1621628200719; Fri, 21 May 2021 13:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628200; cv=none; d=google.com; s=arc-20160816; b=U1UFFfQfy7IH5GTv1Hj1jokm6hOvZAFwzMg4vntIqDuT6pypdvBOG7F7wLVb4VGlw5 ABGwXTpidcY/KHWMxQJTg6Mnts5wbe+f0DIQkY3T6qUAvpxhn+Rdo5m6h+1rs8Dreixb y6DHVD1iM2YepVKLPPZtNqz2JVUVM0iFUrH4eg93qkDQkV8xPA6hUPDaOY2aUXIJknQd 9XPw7nYPQVjQ7C78O3llb0EfKpQuYlSxPfQyxCx6YtJUmK7vooktLlt78N9dKhjt2xrZ 12jDFeRaaz72aQDoZmwi14qSFc1wa/cQHdZavvt3HPk6nD4DWrvd70TmsRfu7zu7kX7e Mfdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=nALjNO1NNzuBgJsBKkuRLfzdmUfp2pocRq1SvmK+pwE=; b=ijcFIXO8jNqMj8Z0F3HKTKVr+qMl/oT8uMYj7ZiyarpDOSM0ysFlk0edKI1aIl8QNv iBRZcY8BSwqhoMQkUkNkYOIFw2+n90vz4lZSu4GA/OUxr9HF22+dBK+VHlxsDqCx4qF5 8Wg3N35Q768CCLcoEx0tcZ4q2gmSKyYBH7zheSjjkb8KjjQltcNuihIteIhIbXHtfSPQ OUxUQdOwljx+/Sf+r06+0YEWmq9fnJc1GFVJeIjVrsBm6APWAMwr/5v545MYVMD3s2o4 swAyJFWBVcQ/m+3KHZX/UGmM+h+sAu8LpauAXxLaEmK7sIArAXm6c9nx7BgY9Z5j7II9 TFRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si6317723jam.34.2021.05.21.13.16.27; Fri, 21 May 2021 13:16:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234601AbhEUN2n (ORCPT + 99 others); Fri, 21 May 2021 09:28:43 -0400 Received: from mail-vk1-f174.google.com ([209.85.221.174]:42624 "EHLO mail-vk1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233813AbhEUN2V (ORCPT ); Fri, 21 May 2021 09:28:21 -0400 Received: by mail-vk1-f174.google.com with SMTP id m129so4284671vkh.9; 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=YUJFx5Zmykk5cG0kxcCgQY0g0TaNYgRTnTOEDLcZLbsfElzudVxkBfN/p4W1BBCWAx J4a0JCxtrPS0YKnTmlQuAFoVOMpEcCzBQaBegg3BsWL4V8WzHUAiJkTLV/2UKL1GxvnQ /q7CsSabHnonJqyBHsjIYyJKdMLt8gamDNjMyD8+KrSx6GK8TJWK5sneQXO2OAGqMbfN IqClszA5uXHGTYZ8d9I/oUo+C4kX/2Fm8E7y+/GAOYsbRQHqANYYoef/uyEBL2ez1GZU PBA7qDIazQWIEAvZrDl+LE/wlBhULbnev2xjs61eqmHORxungV5VwOlpmFPPKkmBvzxZ 3q3A== X-Gm-Message-State: AOAM533PeIEcix13lrA26nenKW2clpCJnAOVMBHofBTa/j9YrPMcZwOn W35+GsqV+wNxSP2MeuYFTV5FaSEJtoYi5cD5110= 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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