From patchwork Tue Feb 22 08:43:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Subhasish Ghosh X-Patchwork-Id: 579781 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1M8iF4o017527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Feb 2011 08:44:36 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1M8gC7t020915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Feb 2011 02:42:12 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id p1M8gCm4009321; Tue, 22 Feb 2011 02:42:12 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 2461E80627; Tue, 22 Feb 2011 02:42:11 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id A096880627 for ; Tue, 22 Feb 2011 02:42:09 -0600 (CST) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id p1M8g9vB012055 for ; Tue, 22 Feb 2011 02:42:09 -0600 (CST) Received: from psmtp.com (na3sys009amx227.postini.com [74.125.149.111]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id p1M8g8pO025508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Feb 2011 02:42:08 -0600 Received: from source ([209.85.213.45]) (using TLSv1) by na3sys009amx227.postini.com ([74.125.148.10]) with SMTP; Tue, 22 Feb 2011 08:42:08 GMT Received: by ywl41 with SMTP id 41so912122ywl.4 for ; Tue, 22 Feb 2011 00:42:07 -0800 (PST) Received: by 10.90.75.17 with SMTP id x17mr3193853aga.64.1298364127509; Tue, 22 Feb 2011 00:42:07 -0800 (PST) Received: from subhasishg ([122.166.13.232]) by mx.google.com with ESMTPS id c39sm4050439anc.7.2011.02.22.00.42.02 (version=SSLv3 cipher=OTHER); Tue, 22 Feb 2011 00:42:06 -0800 (PST) Message-ID: From: "Subhasish Ghosh" To: "Arnd Bergmann" , References: <1297435892-28278-1-git-send-email-subhasish@mistralsolutions.com> <20110218143500.23b3044b@lxorguk.ukuu.org.uk> <201102181951.32631.arnd@arndb.de> In-Reply-To: <201102181951.32631.arnd@arndb.de> Subject: Re: [PATCH v2 13/13] tty: pruss SUART driver Date: Tue, 22 Feb 2011 14:13:21 +0530 Organization: Mistral Solutions MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: sachi@mistralsolutions.com, davinci-linux-open-source@linux.davincidsp.com, Greg Kroah-Hartman , open list , m-watkins@ti.com, Thomas Gleixner , Alan Cox X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 22 Feb 2011 08:44:36 +0000 (UTC) diff --git a/drivers/tty/serial/da8xx_pruss/pruss_suart.c b/drivers/tty/serial/da8xx_pruss/pruss_suart.c index d222e2e..edc3863 100644 --- a/drivers/tty/serial/da8xx_pruss/pruss_suart.c +++ b/drivers/tty/serial/da8xx_pruss/pruss_suart.c @@ -72,7 +72,7 @@ struct suart_fifo { struct omapl_pru_suart { struct uart_port port[NR_SUART]; struct device *dev; /* pdev->dev */ - struct semaphore port_sem[NR_SUART]; + bool tx_empty[NR_SUART]; struct clk *clk_mcasp; struct suart_fifo suart_fifo_addr[NR_SUART]; const struct firmware *fw; @@ -122,13 +122,10 @@ static void omapl_pru_tx_chars(struct omapl_pru_suart *soft_uart, u32 uart_no) if (!(suart_get_duplex(soft_uart, uart_no) & ePRU_SUART_HALF_TX)) return; - if (down_trylock(&soft_uart->port_sem[uart_no])) - return; - if (uart_circ_empty(xmit) || uart_tx_stopped(&soft_uart->port[uart_no])) { pruss_suart_stop_tx(&soft_uart->port[uart_no]); - up(&soft_uart->port_sem[uart_no]); + soft_uart->tx_empty[uart_no] = true; return; }