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: 1776831 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 72A5D3FCAE for ; Wed, 21 Nov 2012 01:09:12 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Taymm-0005CW-32; Wed, 21 Nov 2012 01:07:28 +0000 Received: from mail-wi0-f171.google.com ([209.85.212.171]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Taymg-0005B3-Nt for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2012 01:07:23 +0000 Received: by mail-wi0-f171.google.com with SMTP id hn17so1091630wib.0 for ; Tue, 20 Nov 2012 17:07:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:sender:resent-from:resent-date:resent-message-id :resent-to:date:from:to:cc:subject:mime-version:content-type :content-disposition; bh=R4OjxQFNW97fBXSKdE0DagOmdgH6RqK36ehFS+yI4ss=; b=Nr2YmqhHmtQ+zDmoQw+5nkt8bCCAXUY7PhPeGVwdL7pAxE4iSdD6LcYJBuT6qcg7FH LU/a5q0+UZwVFARxU53Bxt82UocAwgnb3NxIFEO0PN5N0HspECMKNpDALZVvU1W5RSkn Ctur81hr3Iilk7NY+qLNFMGJlJ8z9quj+JZlGvW/5h4eLQRGFJ+n3kzm2/DJFCs4z89f pPF6S5FjQWkqjY/Ijm5RW/qhTMDt9l4FNsK5LktoKPzXrvhcmpmhwI3qfjfDCmzoGXIP LmW4BR05yaj5DWN3eT6pZ0G/lzN8D6RKRnxo3LlpdqZa/kMlYuaz5pr/CbHV3AE7RmI6 dkww== Received: by 10.216.213.164 with SMTP id a36mr6078463wep.57.1353460040023; Tue, 20 Nov 2012 17:07:20 -0800 (PST) Received: from raptus.dandreoli.com (178-85-163-250.dynamic.upc.nl. [178.85.163.250]) by mx.google.com with ESMTPS id gk9sm19984288wib.4.2012.11.20.17.07.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 17:07:19 -0800 (PST) Message-ID: <50ac2947.4969b40a.4ccc.ffff94b6@mx.google.com> Received: by raptus.dandreoli.com (Postfix, from userid 1000) id C91521F18C; Wed, 21 Nov 2012 02:07:17 +0100 (CET) Resent-From: Domenico Andreoli Resent-Date: Wed, 21 Nov 2012 02:07:17 +0100 Resent-Message-ID: <20121121010717.GA26963@raptus.dandreoli.com> Resent-To: linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, narkewoody@gmail.com, linux-arm-kernel@lists.infradead.org Date: Wed, 21 Nov 2012 01:43:09 +0100 From: Domenico Andreoli To: linux-samsung-soc@vger.kernel.org Subject: [RESEND PATCH] S3C24XX: Fix console baud rate guessing MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121120_200722_969825_EEB61E84 X-CRM114-Status: GOOD ( 18.65 ) 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.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.171 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (cavokz[at]gmail.com) -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 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay Cc: woody , Russell King - ARM Linux , 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 Between v3.2 and v3.3 my S3C2440 board started to print garbage on the console during boot. I nailed the problem down to the default UCON clock selection, which with this commit has been switched from UCLK to PCLK. 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, usable console with no UCON nor baud rate specified, I had to change the default UCON clock back to UCLK. Signed-off-by: Domenico Andreoli --- samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,