From patchwork Thu May 20 13:39:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Govindraj.R" X-Patchwork-Id: 101193 X-Patchwork-Delegate: khilman@deeprootsystems.com 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 o4KDdAbx006958 for ; Thu, 20 May 2010 13:39:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754583Ab0ETNjS (ORCPT ); Thu, 20 May 2010 09:39:18 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:39911 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754547Ab0ETNjS (ORCPT ); Thu, 20 May 2010 09:39:18 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4KDdHCo028111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2010 08:39:18 -0500 Received: from webmail.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o4KDdFOB001344; Thu, 20 May 2010 08:39:16 -0500 (CDT) Received: from 192.168.10.88 (proxying for 10.24.255.17) (SquirrelMail authenticated user x0100947); by dbdmail.itg.ti.com with HTTP; Thu, 20 May 2010 19:09:17 +0530 (IST) Message-ID: <49040.192.168.10.88.1274362757.squirrel@dbdmail.itg.ti.com> Date: Thu, 20 May 2010 19:09:17 +0530 (IST) Subject: [pm-wip/uart][PATCH 6/6] Serial: Update UART HWMOD layer. From: "Govindraj.R" To: linux-omap@vger.kernel.org Cc: "Kevin Hilman" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal 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]); Thu, 20 May 2010 13:39:19 +0000 (UTC) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 9b71c1e..38a74d0 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -25,12 +25,9 @@ #include #include #include - -#ifdef CONFIG_SERIAL_8250_CONSOLE #include -#endif -#ifdef CONFIG_SERIAL_OMAP_CONSOLE +#ifdef CONFIG_SERIAL_OMAP #include #endif @@ -483,8 +480,11 @@ void omap_uart_enable_irqs(int enable) list_for_each_entry(uart, &uart_list, node) { if (enable) - ret = request_irq(uart->irq, omap_uart_interrupt, - IRQF_SHARED, "serial idle", (void *)uart); + ret = request_threaded_irq(uart->irq, NULL, + omap_uart_interrupt, + IRQF_SHARED, + "serial idle", + (void *)uart); else free_irq(uart->irq, (void *)uart); } @@ -529,11 +529,11 @@ DEVICE_ATTR(sleep_timeout, 0644, sleep_timeout_show, sleep_timeout_store); #define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr)) #else static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} +static void omap_uart_block_sleep(struct omap_uart_state *uart) {} #define DEV_CREATE_FILE(dev, attr) #endif /* CONFIG_PM */ - -#ifdef CONFIG_SERIAL_8250_CONSOLE +#ifndef CONFIG_SERIAL_OMAP /* * Override the default 8250 read handler: mem_serial_in() * Empty RX fifo read causes an abort on omap3630 and omap4 @@ -635,14 +635,13 @@ void __init omap_serial_init_port(int port) void *pdata = NULL; u32 pdata_size = 0; char *name; -#ifdef CONFIG_SERIAL_8250_CONSOLE +#ifndef CONFIG_SERIAL_OMAP struct plat_serial8250_port ports[2] = { {}, {.flags = 0}, }; struct plat_serial8250_port *p = &ports[0]; -#endif -#ifdef CONFIG_SERIAL_OMAP_CONSOLE +#else struct omap_uart_port_info omap_up; #endif @@ -657,7 +656,7 @@ void __init omap_serial_init_port(int port) oh = uart->oh; uart->dma_enabled = 0; -#ifdef CONFIG_SERIAL_8250_CONSOLE +#ifndef CONFIG_SERIAL_OMAP name = "serial8250"; /* @@ -680,7 +679,6 @@ void __init omap_serial_init_port(int port) p->irqflags = IRQF_SHARED; p->private_data = uart; -#if 0 /* * omap44xx: Never read empty UART fifo * omap3xxx: Never read empty UART fifo on UARTs @@ -696,13 +694,12 @@ void __init omap_serial_init_port(int port) p->serial_in = serial_in_override; p->serial_out = serial_out_override; } -#endif pdata = &ports[0]; pdata_size = 2 * sizeof(struct plat_serial8250_port); -#endif -#ifdef CONFIG_SERIAL_OMAP_CONSOLE - name = "omap-hsuart"; +#else + + name = DRIVER_NAME; omap_up.dma_enabled = uart->dma_enabled; omap_up.uartclk = OMAP24XX_BASE_BAUD * 16;