Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp12149imm; Thu, 30 Aug 2018 05:56:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbTIOGaJAs5x2i4IDizUnTHpNZMvS6D7TRVkxGIe1AD7AJsFLa+O31+SRMVXf6EE7+rtxL9 X-Received: by 2002:a63:1021:: with SMTP id f33-v6mr9642278pgl.72.1535633768210; Thu, 30 Aug 2018 05:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535633768; cv=none; d=google.com; s=arc-20160816; b=R2csYEaLG8t2T6fQEW4/e+antTTNwrgHRlmfEuFWT9LgXyNW4PqWxqdjimwI7kvPbr 9vFv7VVUZ4IS7vUsvN1cZdX9vk2xj3aBfvEIxSN8I12IrZ/kLHsSo/mO4PMTwIIzo64U Sveh2CIp+bB6pUIAu0F6Ksc8q4+gGvIeDcNdOlIlUz4EGexzN3H1oiHJUF+TUummH99u b9q0K+T0ofj1YSdf/s7bJQV1vGtg0Hk6OcRiplLFwVJAPc2Tz7D3SeXaPAs6nlJKrA90 9IuYp3xgJZ1l5TAgvb9vvzJcvw+bBeivAhRDjNVWpNiu1tK0UBu3RrggUvQfudurRmpL rPQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=+rb5unGU9xNSQ4Agy9/dMko94nG597zyJM9KUqttEsY=; b=tXC3Q/MUo/NYeAV+X4zKtFdUS6yokrBgHq8L7XeC/2U315Tb+58nb9C77iMVKlHIc+ jg/bE4nnY+PZ+DVykHvhlimcwb3TpJi2W1oheMQ3AqIUhYbWJlG3MrqWk9X1xnICvBY3 Z61J7y6ndwNn2Ny3k3T3j0Ek/8DGDN1wEhEle55ynbFaPvPcRmqNsQu5mQpwGWUly1zc pT5PNRKLv5suq9e1yruCYlHf45jnYZ4LfiGjdWhCfrKT56u6Jk2pvH/yMo/SxBAuNrB7 4sMEBNG5Bqd1GSOhdAeIoso3NIYBsbGcB2nr/wGnRgxoOd0DgLWx7/+DtgVjsCzUcHbd OUpg== ARC-Authentication-Results: i=1; mx.google.com; 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 184-v6si6559581pgb.587.2018.08.30.05.55.53; Thu, 30 Aug 2018 05:56:08 -0700 (PDT) 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; 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 S1728915AbeH3Q4I (ORCPT + 99 others); Thu, 30 Aug 2018 12:56:08 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:49608 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728816AbeH3Q4I (ORCPT ); Thu, 30 Aug 2018 12:56:08 -0400 Received: from ramsan.of.borg ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id VQu51y00H3XaVaC06Qu550; Thu, 30 Aug 2018 14:54:06 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fvMSb-0007Yc-M3; Thu, 30 Aug 2018 14:54:05 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1fvMSb-0005Wg-KV; Thu, 30 Aug 2018 14:54:05 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman Cc: Jiri Slaby , Chris Brandt , Wolfram Sang , Ulrich Hecht , linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/2] Revert "serial: sh-sci: Allow for compressed SCIF address" Date: Thu, 30 Aug 2018 14:54:04 +0200 Message-Id: <20180830125404.21192-3-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180830125404.21192-1-geert+renesas@glider.be> References: <20180830125404.21192-1-geert+renesas@glider.be> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 2d4dd0da45401c7ae7332b4d1eb7bbb1348edde9. This broke earlycon on all Renesas ARM platforms using a SCIF port for the serial console (R-Car, RZ/A1, RZ/G1, RZ/G2 SoCs), due to an incorrect value of port->regshift. Signed-off-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 5d42c9a63001575a..ab3f6e91853da3c2 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -346,15 +346,15 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = { [SCIx_SH4_SCIF_REGTYPE] = { .regs = { [SCSMR] = { 0x00, 16 }, - [SCBRR] = { 0x02, 8 }, - [SCSCR] = { 0x04, 16 }, - [SCxTDR] = { 0x06, 8 }, - [SCxSR] = { 0x08, 16 }, - [SCxRDR] = { 0x0a, 8 }, - [SCFCR] = { 0x0c, 16 }, - [SCFDR] = { 0x0e, 16 }, - [SCSPTR] = { 0x10, 16 }, - [SCLSR] = { 0x12, 16 }, + [SCBRR] = { 0x04, 8 }, + [SCSCR] = { 0x08, 16 }, + [SCxTDR] = { 0x0c, 8 }, + [SCxSR] = { 0x10, 16 }, + [SCxRDR] = { 0x14, 8 }, + [SCFCR] = { 0x18, 16 }, + [SCFDR] = { 0x1c, 16 }, + [SCSPTR] = { 0x20, 16 }, + [SCLSR] = { 0x24, 16 }, }, .fifosize = 16, .overrun_reg = SCLSR, @@ -2837,7 +2837,7 @@ static int sci_init_single(struct platform_device *dev, { struct uart_port *port = &sci_port->port; const struct resource *res; - unsigned int i, regtype; + unsigned int i; int ret; sci_port->cfg = p; @@ -2874,7 +2874,6 @@ static int sci_init_single(struct platform_device *dev, if (unlikely(sci_port->params == NULL)) return -EINVAL; - regtype = sci_port->params - sci_port_params; switch (p->type) { case PORT_SCIFB: sci_port->rx_trigger = 48; @@ -2929,10 +2928,6 @@ static int sci_init_single(struct platform_device *dev, port->regshift = 1; } - if (regtype == SCIx_SH4_SCIF_REGTYPE) - if (sci_port->reg_size >= 0x20) - port->regshift = 1; - /* * The UART port needs an IRQ value, so we peg this to the RX IRQ * for the multi-IRQ ports, which is where we are primarily -- 2.17.1