From patchwork Wed Jul 11 11:41:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 10519571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 53ADC6028E for ; Wed, 11 Jul 2018 11:48:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 525E828D77 for ; Wed, 11 Jul 2018 11:48:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46A0328DD2; Wed, 11 Jul 2018 11:48:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1B9C28D77 for ; Wed, 11 Jul 2018 11:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbeGKLwn (ORCPT ); Wed, 11 Jul 2018 07:52:43 -0400 Received: from mail02.asahi-net.or.jp ([202.224.55.14]:47581 "EHLO mail02.asahi-net.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726450AbeGKLwn (ORCPT ); Wed, 11 Jul 2018 07:52:43 -0400 X-Greylist: delayed 407 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Jul 2018 07:52:43 EDT Received: from sa76r4.ysato.localdomain (ae199037.dynamic.ppp.asahi-net.or.jp [14.3.199.37]) (Authenticated sender: PQ4Y-STU) by mail02.asahi-net.or.jp (Postfix) with ESMTPA id A04B8F327A; Wed, 11 Jul 2018 20:41:59 +0900 (JST) Received: by sa76r4.ysato.localdomain (Postfix, from userid 1000) id 7EC1434007C; Wed, 11 Jul 2018 20:41:59 +0900 (JST) From: Yoshinori Sato To: linux-sh@vger.kernel.org Cc: Yoshinori Sato Subject: [PATCH] [RFC] serial: sh-sci: fix register alocation in h8300. Date: Wed, 11 Jul 2018 20:41:22 +0900 Message-Id: <20180711114121.10735-1-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.18.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP h8300's SCI registers aligned byte address. Although it may be appropriate to put it in sci_port_params, because I can not think of a good way, I did it like this. Signei-off-by: Yoshinori Sato --- drivers/tty/serial/sh-sci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index c181eb37f985..827ef57cebb8 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2862,12 +2862,16 @@ static int sci_init_single(struct platform_device *dev, port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags; port->fifosize = sci_port->params->fifosize; +#if !defined(CONFIG_H8300) if (port->type == PORT_SCI) { if (sci_port->reg_size >= 0x20) port->regshift = 2; else port->regshift = 1; } +#else + port->regshift = 0; +#endif /* * The UART port needs an IRQ value, so we peg this to the RX IRQ