From patchwork Wed Apr 6 07:26:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 89992 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 74AA2100AC7 for ; Wed, 6 Apr 2011 17:25:22 +1000 (EST) Received: from VA3EHSOBE007.bigfish.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Cybertrust SureServer Standard Validation CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 55A36B6EDD for ; Wed, 6 Apr 2011 17:25:12 +1000 (EST) Received: from mail157-va3-R.bigfish.com (10.7.14.236) by VA3EHSOBE007.bigfish.com (10.7.40.11) with Microsoft SMTP Server id 14.1.225.8; Wed, 6 Apr 2011 07:25:07 +0000 Received: from mail157-va3 (localhost.localdomain [127.0.0.1]) by mail157-va3-R.bigfish.com (Postfix) with ESMTP id 490A111E84A9; Wed, 6 Apr 2011 07:25:07 +0000 (UTC) X-SpamScore: -3 X-BigFish: VS-3(zzbb2cKzz1202hzz8275bh8275dhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail157-va3 (localhost.localdomain [127.0.0.1]) by mail157-va3 (MessageSwitch) id 1302074707175233_17275; Wed, 6 Apr 2011 07:25:07 +0000 (UTC) Received: from VA3EHSMHS001.bigfish.com (unknown [10.7.14.235]) by mail157-va3.bigfish.com (Postfix) with ESMTP id 278E7140804F; Wed, 6 Apr 2011 07:25:07 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS001.bigfish.com (10.7.99.11) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 6 Apr 2011 07:24:55 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.270.2; Wed, 6 Apr 2011 02:24:54 -0500 Received: from udp164303uds.ap.freescale.net (udp164303uds.ap.freescale.net [10.232.14.58]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p367OpFM025262; Wed, 6 Apr 2011 02:24:52 -0500 (CDT) From: Prabhakar Kushwaha To: Subject: [PATCH] powerpc/kernel: Don't add disabled serial device Date: Wed, 6 Apr 2011 12:56:29 +0530 Message-ID: <1302074789-442-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.7.3 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: meet2prabhu@gmail.com, Prabhakar Kushwaha X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org serial port nodes with the property status="disabled" are not usable and so avoid adding "disabled" port with the system. Signed-off-by: Prabhakar Kushwaha --- Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branch master) This patch is made to support "Re-organizing P1020RDB P2020RDB dts". Creation of Serial port node doesn't follow of_platform_device_create() way which takes care case status = "disabled". arch/powerpc/kernel/legacy_serial.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index c834757..26566ca 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -330,9 +330,11 @@ void __init find_legacy_serial_ports(void) if (!parent) continue; if (of_match_node(legacy_serial_parents, parent) != NULL) { - index = add_legacy_soc_port(np, np); - if (index >= 0 && np == stdout) - legacy_serial_console = index; + if (of_device_is_available(np)) { + index = add_legacy_soc_port(np, np); + if (index >= 0 && np == stdout) + legacy_serial_console = index; + } } of_node_put(parent); }