From patchwork Wed Feb 6 11:47:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 14633 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DBE4423F99 for ; Wed, 6 Feb 2013 11:48:36 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 952D9A180D1 for ; Wed, 6 Feb 2013 11:48:36 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so765398vbb.17 for ; Wed, 06 Feb 2013 03:48:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=005S4hH5A3M0CVdCnuBAYpMMngGIN2vmV5e+MBqx9jA=; b=IPEjwW9sRqfZWC1WeHYNOyn8gndikdwFxh2L46rMc76FLNNGK58nEREG1y/SQfiA84 /9vF+BAgDLakrBcnwchc2PkTdl50Uxf0d7SBYQdYc/lRPYfQNk/lZTzHcwf83oq9cYJs 89VRgTRo7T8D2/YB4ZaxvkWZmyT6Ee3hBMjgRTp8w9DpTwX9XI7JE7jFudI6/AEJGu6i ++onODtyDA0eEzHxtT1d8pbSjQ2ASQt+82LY3xyxtb2nwm5oULFeD9jyrYZKLIgRRhhl /LwjBxH62pKC6IUO+UMLRB/z6PmshdgCAl9SU6o/32SHLRjxIJtV/TRhqFAWHdLxYH3v vApw== X-Received: by 10.52.24.98 with SMTP id t2mr24970391vdf.69.1360151316141; Wed, 06 Feb 2013 03:48:36 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp17339vec; Wed, 6 Feb 2013 03:48:35 -0800 (PST) X-Received: by 10.66.88.37 with SMTP id bd5mr74858824pab.75.1360151315108; Wed, 06 Feb 2013 03:48:35 -0800 (PST) Received: from mail-da0-f51.google.com (mail-da0-f51.google.com [209.85.210.51]) by mx.google.com with ESMTPS id j9si28551943pay.144.2013.02.06.03.48.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 03:48:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.51 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.210.51; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.51 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-da0-f51.google.com with SMTP id n15so618661dad.10 for ; Wed, 06 Feb 2013 03:48:34 -0800 (PST) X-Received: by 10.66.80.70 with SMTP id p6mr75092992pax.23.1360151314571; Wed, 06 Feb 2013 03:48:34 -0800 (PST) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id f9sm37145024paz.12.2013.02.06.03.48.29 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 03:48:33 -0800 (PST) From: Haojian Zhuang To: jslaby@suse.cz, linus.walleij@linaro.org, anton.vorontsov@linaro.org, linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Haojian Zhuang , Alan Cox , Greg Kroah-Hartman , linux-serial@vger.kernel.org Subject: [PATCH 2/2] tty: serial: use module_init on pl011_init Date: Wed, 6 Feb 2013 19:47:15 +0800 Message-Id: <1360151235-11980-2-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360151235-11980-1-git-send-email-haojian.zhuang@linaro.org> References: <1360151235-11980-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQnLr5MX2x1lbfCb/ZOxiVph1c7t6WhapZ7l7drB1+lFYHjE4cXadYuyiTVNyMJ6gNgngFRB If amba serial driver is probed defer, amba serial driver may be probed after init process. So the error log shows in below. [ 0.389403] Warning: unable to open an initial console. [ 0.390107] Freeing init memory: 2328K It results in serial console not enabled. So replace arch_initcall by module_init on pl011_init(). The boot sequence is changed in below. pinctrl driver --> amba serial driver --> init process Signed-off-by: Haojian Zhuang Cc: Alan Cox Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org --- drivers/tty/serial/amba-pl011.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index d43d530..8b7dacb 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2129,11 +2129,7 @@ static void __exit pl011_exit(void) uart_unregister_driver(&amba_reg); } -/* - * While this can be a module, if builtin it's most likely the console - * So let's leave module_exit but move module_init to an earlier place - */ -arch_initcall(pl011_init); +module_init(pl011_init); module_exit(pl011_exit); MODULE_AUTHOR("ARM Ltd/Deep Blue Solutions Ltd");