From patchwork Fri Jun 18 11:01:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitoshi Mitake X-Patchwork-Id: 106839 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5IB1RZ2028503 for ; Fri, 18 Jun 2010 11:01:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760937Ab0FRLB2 (ORCPT ); Fri, 18 Jun 2010 07:01:28 -0400 Received: from ns.dcl.info.waseda.ac.jp ([133.9.216.194]:53972 "EHLO ns.dcl.info.waseda.ac.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760946Ab0FRLB0 (ORCPT ); Fri, 18 Jun 2010 07:01:26 -0400 Received: from localhost (localhost [127.0.0.1]) by ns.dcl.info.waseda.ac.jp (Postfix) with ESMTP id 0066E1273DA2; Fri, 18 Jun 2010 20:01:26 +0900 (JST) X-Virus-Scanned: amavisd-new at dcl.info.waseda.ac.jp Received: from ns.dcl.info.waseda.ac.jp ([127.0.0.1]) by localhost (ns.dcl.info.waseda.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6bE7zKBS2let; Fri, 18 Jun 2010 20:01:25 +0900 (JST) Received: from localhost.localdomain (fw-cisco.dcl.info.waseda.ac.jp [133.9.216.204]) by ns.dcl.info.waseda.ac.jp (Postfix) with ESMTP id C7DE91273D96; Fri, 18 Jun 2010 20:01:25 +0900 (JST) From: Hitoshi Mitake To: Paul Mundt Cc: linux-sh@vger.kernel.org, Hitoshi Mitake , Magnus Damm , Nobuhiro Iwamatsu Subject: [PATCH v4 4/4] Very dirty and easy fix for sh-sci. Date: Fri, 18 Jun 2010 20:01:15 +0900 Message-Id: <1276858875-10548-5-git-send-email-mitake@dcl.info.waseda.ac.jp> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1275292796-26602-1-git-send-email-mitake@dcl.info.waseda.ac.jp> References: <1275292796-26602-1-git-send-email-mitake@dcl.info.waseda.ac.jp> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 18 Jun 2010 11:01:28 +0000 (UTC) diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index f70c49f..dfaeeaf 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h @@ -140,7 +140,15 @@ # define SCSPTR0 0xffe00024 /* 16 bit SCIF */ # define SCSPTR1 0xffe10024 /* 16 bit SCIF */ # define SCIF_ORER 0x0001 /* Overrun error bit */ -# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ + +#if defined(CONFIG_SH_SH2007) +/* TIE=0,RIE=0,TE=1,RE=1,REIE=1,CKE1=0 */ +# define SCSCR_INIT(port) 0x38 +#else +/* TIE=0,RIE=0,TE=1,RE=1,REIE=1,CKE1=1 */ +# define SCSCR_INIT(port) 0x3a +#endif + #elif defined(CONFIG_CPU_SUBTYPE_SH7785) || \ defined(CONFIG_CPU_SUBTYPE_SH7786) # define SCSPTR0 0xffea0024 /* 16 bit SCIF */ @@ -599,9 +607,10 @@ static inline int sci_rxd_in(struct uart_port *port) * -- Mitch Davis - 15 Jul 2000 */ -#if defined(CONFIG_CPU_SUBTYPE_SH7780) || \ - defined(CONFIG_CPU_SUBTYPE_SH7785) || \ - defined(CONFIG_CPU_SUBTYPE_SH7786) +#if (defined(CONFIG_CPU_SUBTYPE_SH7780) || \ + defined(CONFIG_CPU_SUBTYPE_SH7785) || \ + defined(CONFIG_CPU_SUBTYPE_SH7786)) \ + && !defined(CONFIG_SH_SH2007) #define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(16*bps)-1) #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \