From patchwork Wed Nov 21 00:43:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Domenico Andreoli X-Patchwork-Id: 1776781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B3F8D3FCAE for ; Wed, 21 Nov 2012 00:45:10 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TayPS-0003Ix-RM; Wed, 21 Nov 2012 00:43:22 +0000 Received: from mail-ea0-f177.google.com ([209.85.215.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TayPL-0003IV-Lf for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2012 00:43:16 +0000 Received: by mail-ea0-f177.google.com with SMTP id c10so818412eaa.36 for ; Tue, 20 Nov 2012 16:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to; bh=ctenRAY7nzS1FneKRrwLRfO/hGwQoJ6t3g4CtU3ioFg=; b=qrGgFu290y+kxCSAKl76ws7iuFQNONy1N1J0Fx2xnL9FzTI7fa7cyZdJ+eVc6Da1Gz h1lgepjqjUS+a85dWywWheQdHjBEQVSafAawZQTYMjU88dAGmqmaIEwd/IFlM36krC8O YacKONLqqpFSqnwp6zTpE35LzfrxX+bstR8en657hQlaSOh+h+YlyiS9O9leGxxexJgt HgARj5JTwnsjCj3RLQkYNH3PISZbEGdSB5M2T/fiCF1LzgBsld2JiCAK64dzP5gbbkOT SAf+D5CDXzCMWGnIidaUGI02upp/qX65tmgZ4NMfXk7zmV8/D62nHpn8IFYWlq9mPXSL rV1A== Received: by 10.14.203.132 with SMTP id f4mr39253129eeo.11.1353458592784; Tue, 20 Nov 2012 16:43:12 -0800 (PST) Received: from glitch (178-85-163-250.dynamic.upc.nl. [178.85.163.250]) by mx.google.com with ESMTPS id e1sm33774849eem.3.2012.11.20.16.43.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 16:43:11 -0800 (PST) Received: by glitch (Postfix, from userid 1000) id 81FC23C0274; Wed, 21 Nov 2012 01:43:09 +0100 (CET) Date: Wed, 21 Nov 2012 01:43:09 +0100 From: Domenico Andreoli To: Russell King - ARM Linux Subject: [PATCH] S3C24XX: Fix console baud rate guessing Message-ID: <20121121004309.GA29633@glitch> Mail-Followup-To: Russell King - ARM Linux , woody , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org References: <20121114173453.GJ3290@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121114173453.GJ3290@n2100.arm.linux.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121120_194315_902915_90A34E4E X-CRM114-Status: GOOD ( 25.34 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (cavokz[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: woody , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Domenico Andreoli On Wed, Nov 14, 2012 at 05:34:53PM +0000, Russell King - ARM Linux wrote: > On Wed, Nov 14, 2012 at 10:23:55PM +0800, woody wrote: > > I just built a 3.2.x ARM kernel and tried to have it boot by a boot > > loader (vivi) on my s3c2410a ARM board. The kernel was built with > > default configuration s3c2410. > > I reported that S3C2410 is totally dead with 3.x kernels about a month > ago and got no response what so ever from anyone. I guess S3C2410 is > just not cared for anymore. > > When I get sufficient motivation, I'll try and track down what's going > wrong, but it means taking the old mailing list server (and now list > archive) offline for a while. I found something also on my S3C2440. The board doesn't die but prints garbage on the console. Indeed the baud rate guessing is broken (it's ok if specified manually on the cmdline), commit c3310fbbeb9db6967900ed22eb3d0bd0bb0e892c Author: Thomas Abraham Date: Mon Oct 24 11:47:57 2011 +0200 serial: samsung: remove all uses of get_clksrc and set_clksrc With clkdev based clock lookup support, the clock set and get operation using clock names communicated between the samsung uart driver and the SoC specific extension can be removed. In addition to that, for each platform specific extension, add the default clock selection, number of clock options for uart baud generator, clock selection bit mask and shift values which is required by the clkdev support in samsung uart driver. The default clock selection value 'def_clk_sel' specifies the default clock to be used as the source clock for baud rate generator in case the platform code does not specify the same. Cc: Ben Dooks Signed-off-by: Thomas Abraham Signed-off-by: Kukjin Kim To restore previous functionality I had to change the default UCON clock back to UCLK. Signed-off-by: Domenico Andreoli --- The additional condition is that board file does not specify a the clocks being properly configured. Something that doesn't happen if the baud rate is specified onthe command line. detection and goes unnoticed if you manually specify it on the cmdline (like I do). On my S3C2440 I've a few observation diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 7f04717..316b703 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1572,7 +1572,7 @@ static struct s3c24xx_serial_drv_data s3c2440_serial_drv_data = { .tx_fifofull = S3C2440_UFSTAT_TXFULL, .tx_fifomask = S3C2440_UFSTAT_TXMASK, .tx_fifoshift = S3C2440_UFSTAT_TXSHIFT, - .def_clk_sel = S3C2410_UCON_CLKSEL2, + .def_clk_sel = S3C2410_UCON_CLKSEL1, .num_clks = 4, .clksel_mask = S3C2412_UCON_CLKMASK, .clksel_shift = S3C2412_UCON_CLKSHIFT,