From patchwork Thu Oct 4 22:05:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 1550391 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 B54CE3FC1A for ; Thu, 4 Oct 2012 22:11:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TJtb6-0005Xd-KS; Thu, 04 Oct 2012 22:08:50 +0000 Received: from mho-04-ewr.mailhop.org ([204.13.248.74] helo=mho-02-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TJtXc-0003Na-1D for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2012 22:05:17 +0000 Received: from c-98-234-237-12.hsd1.ca.comcast.net ([98.234.237.12] helo=muffinssi.local) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1TJtXZ-0004Hi-HT; Thu, 04 Oct 2012 22:05:09 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 98.234.237.12 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/rdg0QKB1ydq5XlLEUy+JB Subject: [PATCH 15/16] ARM: OMAP: Move plat/omap-serial.h to linux/platform_data/serial-omap.h To: linux-arm-kernel@lists.infradead.org From: Tony Lindgren Date: Thu, 04 Oct 2012 15:05:08 -0700 Message-ID: <20121004220508.26676.98612.stgit@muffinssi.local> In-Reply-To: <20121004213950.26676.21898.stgit@muffinssi.local> References: <20121004213950.26676.21898.stgit@muffinssi.local> User-Agent: StGit/0.16-2-g0d85 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [204.13.248.74 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Greg Kroah-Hartman , linux-omap@vger.kernel.org, Alan Cox , linux-serial@vger.kernel.org, "Govindraj.R" 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 We cannot keep this in plat for ARM common zImage work. Some of the defines are local to the omap-serial.c driver, so move the defines there. Also rename DRIVER_NAME to OMAP_SERIAL_DRIVER_NAME to avoid confusion. Note that patch depends on at least omap patch "ARM: OMAP: Split plat/serial.h for omap1 and omap2+". Cc: Alan Cox Cc: Greg Kroah-Hartman Cc: Govindraj.R Cc: linux-serial@vger.kernel.org Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/serial.c | 5 ++- drivers/tty/serial/omap-serial.c | 35 ++++++++++++++++++++-- include/linux/platform_data/serial-omap.h | 40 +------------------------ 3 files changed, 36 insertions(+), 44 deletions(-) rename arch/arm/plat-omap/include/plat/omap-serial.h => include/linux/platform_data/serial-omap.h (67%) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 777d504..60374a4 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -26,8 +26,9 @@ #include #include #include +#include +#include -#include #include "common.h" #include #include "omap_hwmod.h" @@ -293,7 +294,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, info = omap_serial_default_info; oh = uart->oh; - name = DRIVER_NAME; + name = OMAP_SERIAL_DRIVER_NAME; omap_up.dma_enabled = info->dma_enabled; omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6ede6fd..cc431a2 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -38,11 +38,11 @@ #include #include #include +#include #include #include #include - -#include +#include #define UART_BUILD_REVISION(x, y) (((x) << 8) | (y)) @@ -71,6 +71,35 @@ #define OMAP_UART_MVR_MAJ_SHIFT 8 #define OMAP_UART_MVR_MIN_MASK 0x3f +#define OMAP_MODE13X_SPEED 230400 + +#define OMAP_UART_SCR_TX_EMPTY 0x08 + +/* WER = 0x7F + * Enable module level wakeup in WER reg + */ +#define OMAP_UART_WER_MOD_WKUP 0X7F + +/* Enable XON/XOFF flow control on output */ +#define OMAP_UART_SW_TX 0x8 + +/* Enable XON/XOFF flow control on input */ +#define OMAP_UART_SW_RX 0x2 + +#define OMAP_UART_SYSC_RESET 0X07 +#define OMAP_UART_TCR_TRIG 0X0F +#define OMAP_UART_SW_CLR 0XF0 +#define OMAP_UART_FIFO_CLR 0X06 + +#define OMAP_UART_DMA_CH_FREE -1 + +#define OMAP_MAX_HSUART_PORTS 6 + +#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA + +#define UART_ERRATA_i202_MDR1_ACCESS BIT(0) +#define UART_ERRATA_i291_DMA_FORCEIDLE BIT(1) + struct uart_omap_port { struct uart_port port; struct uart_omap_dma uart_dma; @@ -1588,7 +1617,7 @@ static struct platform_driver serial_omap_driver = { .probe = serial_omap_probe, .remove = __devexit_p(serial_omap_remove), .driver = { - .name = DRIVER_NAME, + .name = OMAP_SERIAL_DRIVER_NAME, .pm = &serial_omap_dev_pm_ops, .of_match_table = of_match_ptr(omap_serial_of_match), }, diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/include/linux/platform_data/serial-omap.h similarity index 67% rename from arch/arm/plat-omap/include/plat/omap-serial.h rename to include/linux/platform_data/serial-omap.h index f4a4cd0..512aae9 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/include/linux/platform_data/serial-omap.h @@ -14,14 +14,7 @@ * (at your option) any later version. */ -#ifndef __OMAP_SERIAL_H__ -#define __OMAP_SERIAL_H__ - -#include -#include -#include - -#define DRIVER_NAME "omap_uart" +#define OMAP_SERIAL_DRIVER_NAME "omap_uart" /* * Use tty device name as ttyO, [O -> OMAP] @@ -30,35 +23,6 @@ */ #define OMAP_SERIAL_NAME "ttyO" -#define OMAP_MODE13X_SPEED 230400 - -#define OMAP_UART_SCR_TX_EMPTY 0x08 - -/* WER = 0x7F - * Enable module level wakeup in WER reg - */ -#define OMAP_UART_WER_MOD_WKUP 0X7F - -/* Enable XON/XOFF flow control on output */ -#define OMAP_UART_SW_TX 0x8 - -/* Enable XON/XOFF flow control on input */ -#define OMAP_UART_SW_RX 0x2 - -#define OMAP_UART_SYSC_RESET 0X07 -#define OMAP_UART_TCR_TRIG 0X0F -#define OMAP_UART_SW_CLR 0XF0 -#define OMAP_UART_FIFO_CLR 0X06 - -#define OMAP_UART_DMA_CH_FREE -1 - -#define OMAP_MAX_HSUART_PORTS 6 - -#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA - -#define UART_ERRATA_i202_MDR1_ACCESS BIT(0) -#define UART_ERRATA_i291_DMA_FORCEIDLE BIT(1) - struct omap_uart_port_info { bool dma_enabled; /* To specify DMA Mode */ unsigned int uartclk; /* UART clock rate */ @@ -102,5 +66,3 @@ struct uart_omap_dma { unsigned int rx_poll_rate; unsigned int rx_timeout; }; - -#endif /* __OMAP_SERIAL_H__ */