From patchwork Thu Jul 17 07:42:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 4573211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DDFC79F3B4 for ; Thu, 17 Jul 2014 07:45:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 119702018A for ; Thu, 17 Jul 2014 07:45:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 397DB20107 for ; Thu, 17 Jul 2014 07:45:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7gLa-0004Cv-H6; Thu, 17 Jul 2014 07:43:22 +0000 Received: from galois.linutronix.de ([2001:470:1f0b:db:abcd:42:0:1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7gLK-000402-Lm for linux-arm-kernel@lists.infradead.org; Thu, 17 Jul 2014 07:43:11 +0000 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1X7gKZ-0007hi-QM; Thu, 17 Jul 2014 09:42:19 +0200 Date: Thu, 17 Jul 2014 09:42:19 +0200 From: Sebastian Andrzej Siewior To: Tony Lindgren Subject: Re: [PATCH 5/5] tty: serial: Add 8250-core based omap driver Message-ID: <20140717074219.GA29193@linutronix.de> References: <1405521903-5877-1-git-send-email-bigeasy@linutronix.de> <1405521903-5877-6-git-send-email-bigeasy@linutronix.de> <20140717070859.GD18374@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140717070859.GD18374@atomide.com> X-Key-Id: 97C4700B X-Key-Fingerprint: 09E2 D1F3 9A3A FF13 C3D3 961C 0688 1C1E 97C4 700B User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140717_004306_879758_D39270FE X-CRM114-Status: GOOD ( 11.64 ) X-Spam-Score: -0.0 (/) Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Felipe Balbi , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Tony Lindgren | 2014-07-17 00:09:00 [-0700]: >Seems to boot a bit further now with output from serial console >initially, then I'm getting the following error again that's probably >related to clocks not enabled when the registers are accessed: It is (mostly) the same thing as before. We have additionally omap_8250_startup() in the backtrace but it is the same thing. So you say I miss a clock? Looking through serial8250_do_startup() I see: - pm_runtime_get_sync(port->dev); which should get the clocks up - serial8250_clear_fifos() which does a write at address + 8. Seems to work. - serial_port_in(port, UART_LSR); does a read at address + 0x14, seems to work. - serial_port_in(port, UART_RX); does a read at address + 0. This is probably the bad one. Now comparing with omap-serial I noticed that I do a 32bit access instead a 16bit. Could you please try the following hack: besides that, I don't see what could be different. >Regards, > >Tony Sebastian diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 2e4a93b..94af5a3 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -420,13 +420,13 @@ static void mem_serial_out(struct uart_port *p, int offset, int value) static void mem32_serial_out(struct uart_port *p, int offset, int value) { offset = offset << p->regshift; - writel(value, p->membase + offset); + writew(value, p->membase + offset); } static unsigned int mem32_serial_in(struct uart_port *p, int offset) { offset = offset << p->regshift; - return readl(p->membase + offset); + return readw(p->membase + offset); } static unsigned int io_serial_in(struct uart_port *p, int offset)