mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Egger <siccegge@cs.fau.de>
To: Sonic Zhang <sonic.zhang@analog.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Mike Frysinger <vapier@gentoo.org>,
	Graf Yang <graf.yang@analog.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	uclinux-dist-devel@blackfin.uclinux.org,
	linux-kernel@vger.kernel.org
Cc: vamos-dev@i4.informatik.uni-erlangen.de
Subject: [PATCH 09/11] Removing dead SERIAL_BFIN_{HARD_,}CTSRTS
Date: Fri, 9 Jul 2010 15:50:35 +0200	[thread overview]
Message-ID: <2c4cc1817c05dad1183df108c35ae2e164638fc1.1278682303.git.siccegge@cs.fau.de> (raw)
In-Reply-To: <cover.1278682302.git.siccegge@cs.fau.de>

SERIAL_BFIN_{HARD_,}CTSRTS doesn't exist in Kconfig, therefore
removing all references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
---
 drivers/serial/bfin_5xx.c |  103 ---------------------------------------------
 1 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 96f7e74..2ec9e5c 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -82,53 +82,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart);
 
 static void bfin_serial_reset_irda(struct uart_port *port);
 
-#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
-	defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
-static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
-{
-	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
-	if (uart->cts_pin < 0)
-		return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
-
-	/* CTS PIN is negative assertive. */
-	if (UART_GET_CTS(uart))
-		return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
-	else
-		return TIOCM_DSR | TIOCM_CAR;
-}
-
-static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
-{
-	struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
-	if (uart->rts_pin < 0)
-		return;
-
-	/* RTS PIN is negative assertive. */
-	if (mctrl & TIOCM_RTS)
-		UART_ENABLE_RTS(uart);
-	else
-		UART_DISABLE_RTS(uart);
-}
-
-/*
- * Handle any change of modem status signal.
- */
-static irqreturn_t bfin_serial_mctrl_cts_int(int irq, void *dev_id)
-{
-	struct bfin_serial_port *uart = dev_id;
-	unsigned int status;
-
-	status = bfin_serial_get_mctrl(&uart->port);
-	uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
-#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	uart->scts = 1;
-	UART_CLEAR_SCTS(uart);
-	UART_CLEAR_IER(uart, EDSSI);
-#endif
-
-	return IRQ_HANDLED;
-}
-#else
 static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
 {
 	return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
@@ -137,7 +90,6 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
 static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
 {
 }
-#endif
 
 /*
  * interrupts are disabled on entry
@@ -727,35 +679,6 @@ static int bfin_serial_startup(struct uart_port *port)
 # endif
 #endif
 
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0) {
-		if (request_irq(gpio_to_irq(uart->cts_pin),
-			bfin_serial_mctrl_cts_int,
-			IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
-			IRQF_DISABLED, "BFIN_UART_CTS", uart)) {
-			uart->cts_pin = -1;
-			pr_info("Unable to attach BlackFin UART CTS interrupt.\
-				 So, disable it.\n");
-		}
-	}
-	if (uart->rts_pin >= 0) {
-		gpio_request(uart->rts_pin, DRIVER_NAME);
-		gpio_direction_output(uart->rts_pin, 0);
-	}
-#endif
-#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (request_irq(uart->status_irq,
-		bfin_serial_mctrl_cts_int,
-		IRQF_DISABLED, "BFIN_UART_MODEM_STATUS", uart)) {
-		pr_info("Unable to attach BlackFin UART Modem \
-			Status interrupt.\n");
-	}
-
-	/* CTS RTS PINs are negative assertive. */
-	UART_PUT_MCR(uart, ACTS);
-	UART_SET_IER(uart, EDSSI);
-#endif
-
 	UART_SET_IER(uart, ERBFI);
 	return 0;
 }
@@ -790,16 +713,6 @@ static void bfin_serial_shutdown(struct uart_port *port)
 	free_irq(uart->port.irq+1, uart);
 #endif
 
-#ifdef CONFIG_SERIAL_BFIN_CTSRTS
-	if (uart->cts_pin >= 0)
-		free_irq(gpio_to_irq(uart->cts_pin), uart);
-	if (uart->rts_pin >= 0)
-		gpio_free(uart->rts_pin);
-#endif
-#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
-	if (UART_GET_IER(uart) && EDSSI)
-		free_irq(uart->status_irq, uart);
-#endif
 }
 
 static void
@@ -1134,13 +1047,6 @@ static void __init bfin_serial_init_ports(void)
 			bfin_serial_resource[i].uart_rx_dma_channel;
 		init_timer(&(bfin_serial_ports[i].rx_dma_timer));
 #endif
-#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
-	defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
-		bfin_serial_ports[i].cts_pin	    =
-			bfin_serial_resource[i].uart_cts_pin;
-		bfin_serial_ports[i].rts_pin	    =
-			bfin_serial_resource[i].uart_rts_pin;
-#endif
 	}
 }
 
@@ -1198,12 +1104,7 @@ bfin_serial_console_setup(struct console *co, char *options)
 	int baud = 57600;
 	int bits = 8;
 	int parity = 'n';
-# if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
-	defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
-	int flow = 'r';
-# else
 	int flow = 'n';
-# endif
 
 	/*
 	 * Check whether an invalid uart number has been specified, and
@@ -1401,10 +1302,6 @@ static int bfin_serial_remove(struct platform_device *dev)
 			continue;
 		uart_remove_one_port(&bfin_serial_reg, &bfin_serial_ports[i].port);
 		bfin_serial_ports[i].port.dev = NULL;
-#if defined(CONFIG_SERIAL_BFIN_CTSRTS)
-		gpio_free(bfin_serial_ports[i].cts_pin);
-		gpio_free(bfin_serial_ports[i].rts_pin);
-#endif
 	}
 
 	return 0;
-- 
1.7.0.4


  parent reply	other threads:[~2010-07-09 13:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 13:47 [PATCH 00/11] Removing dead code Christoph Egger
2010-07-09 13:49 ` [PATCH 03/11] Removing dead PP04 Christoph Egger
2010-07-09 13:49 ` [PATCH 04/11] Removing dead (ALMA_ANS | DRAGONIXVZ | M68EZ328ADS) Christoph Egger
2010-07-13  3:56   ` Greg Ungerer
2010-07-09 13:49 ` [PATCH 05/11] Removing dead ETRAX_RS485_ON_PORT_G Christoph Egger
2010-07-09 13:49 ` [PATCH 06/11] Removing dead ETRAX_RS485_LTC1387 Christoph Egger
2010-07-09 13:50 ` [PATCH 07/11] Removing dead ETRAX_EXTERN_PB6CLK_ENABLED Christoph Egger
2010-07-09 13:50 ` [PATCH 08/11] Removing dead ETRAX_SERIAL_PROC_ENTRY Christoph Egger
2010-07-09 13:50 ` Christoph Egger [this message]
2010-07-09 14:21   ` [Uclinux-dist-devel] [PATCH 09/11] Removing dead SERIAL_BFIN_{HARD_, }CTSRTS Hennerich, Michael
2010-07-09 13:50 ` [PATCH 10/11] Removing dead SERIAL_BFIN_SPORT_CTSRTS Christoph Egger
2010-07-09 15:38   ` Mike Frysinger
2010-07-09 13:50 ` [PATCH 11/11] Removing dead SERIAL_BFIN_SPORT_CONSOLE Christoph Egger
2010-07-09 15:39   ` Mike Frysinger
2010-07-09 13:51 ` [PATCH 02/11] Removing dead CONSOLE_* Christoph Egger
2010-07-09 13:52 ` [PATCH 01/11] Removing dead 68328_SERIAL_UART Christoph Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c4cc1817c05dad1183df108c35ae2e164638fc1.1278682303.git.siccegge@cs.fau.de \
    --to=siccegge@cs.fau.de \
    --cc=akpm@linux-foundation.org \
    --cc=graf.yang@analog.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sonic.zhang@analog.com \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vamos-dev@i4.informatik.uni-erlangen.de \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®