From patchwork Mon Mar 8 17:20:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aguirre Rodriguez, Sergio Alberto" X-Patchwork-Id: 84083 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o28HK2Fq029524 for ; Mon, 8 Mar 2010 17:20:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753401Ab0CHRUJ (ORCPT ); Mon, 8 Mar 2010 12:20:09 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:45648 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753355Ab0CHRUB (ORCPT ); Mon, 8 Mar 2010 12:20:01 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o28HJumC003258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Mar 2010 11:19:56 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o28HJrcr028188; Mon, 8 Mar 2010 11:19:53 -0600 (CST) Received: from localhost (dtx0091359-ubuntu-1.am.dhcp.ti.com [128.247.79.73]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o28HJrZ23311; Mon, 8 Mar 2010 11:19:53 -0600 (CST) From: Sergio Aguirre To: linux-omap@vger.kernel.org Cc: Kevin Hilman , Vikram Pandita , Paul Walmsley , Tony Lindgren , Sergio Aguirre Subject: [RFC part1/2 merge v2][PATCH 01/11] OMAP3: serial: Check for zero-based physical addr Date: Mon, 8 Mar 2010 11:20:44 -0600 Message-Id: <1268068854-13429-2-git-send-email-saaguirre@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1268068854-13429-1-git-send-email-saaguirre@ti.com> References: <1268068854-13429-1-git-send-email-saaguirre@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Mar 2010 17:20:10 +0000 (UTC) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index da77930..1ca4330 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -664,6 +664,12 @@ void __init omap_serial_early_init(void) struct device *dev = &pdev->dev; struct plat_serial8250_port *p = dev->platform_data; + /* Don't map zero-based physical address */ + if (p->mapbase == 0) { + printk(KERN_WARNING "omap serial: No physical address" + " for uart#%d, so skipping early_init...\n", i); + continue; + } /* * Module 4KB + L4 interconnect 4KB * Static mapping, never released @@ -727,6 +733,10 @@ void __init omap_serial_init_port(int port) pdev = &uart->pdev; dev = &pdev->dev; + /* Don't proceed if there's no clocks available */ + if (!uart->ick || !uart->fck) + return; + omap_uart_enable_clocks(uart); omap_uart_reset(uart);