From: Bryan Wu <bryan.wu@analog.com>
To: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Cc: dbrownell@users.sourceforge.net,
Michael Hennerich <michael.hennerich@analog.com>,
Bryan Wu <bryan.wu@analog.com>
Subject: [PATCH 12/12] Blackfin serial driver: use new GPIO API
Date: Wed, 8 Aug 2007 11:35:37 +0800 [thread overview]
Message-ID: <11865441413182-git-send-email-bryan.wu@analog.com> (raw)
In-Reply-To: <11865441373719-git-send-email-bryan.wu@analog.com>
From: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | 39 ++++++++++-----------
1 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 2f4afc9..f21a162 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -1,5 +1,6 @@
#include <linux/serial.h>
#include <asm/dma.h>
+#include <asm/portmux.h>
#define NR_PORTS 4
@@ -143,50 +144,48 @@ struct bfin_serial_res bfin_serial_resource[] = {
int nr_ports = ARRAY_SIZE(bfin_serial_resource);
+#define DRIVER_NAME "bfin-uart"
+
static void bfin_serial_hw_init(struct bfin_serial_port *uart)
{
#ifdef CONFIG_SERIAL_BFIN_UART0
- /* Enable UART0 RX and TX on pin 7 & 8 of PORT E */
- bfin_write_PORTE_FER(0x180 | bfin_read_PORTE_FER());
- bfin_write_PORTE_MUX(0x3C000 | bfin_read_PORTE_MUX());
+ peripheral_request(P_UART0_TX, DRIVER_NAME);
+ peripheral_request(P_UART0_RX, DRIVER_NAME);
#endif
#ifdef CONFIG_SERIAL_BFIN_UART1
- /* Enable UART1 RX and TX on pin 0 & 1 of PORT H */
- bfin_write_PORTH_FER(0x3 | bfin_read_PORTH_FER());
- bfin_write_PORTH_MUX(~0xF & bfin_read_PORTH_MUX());
+ peripheral_request(P_UART1_TX, DRIVER_NAME);
+ peripheral_request(P_UART1_RX, DRIVER_NAME);
+
#ifdef CONFIG_BFIN_UART1_CTSRTS
- /* Enable UART1 RTS and CTS on pin 9 & 10 of PORT E */
- bfin_write_PORTE_FER(0x600 | bfin_read_PORTE_FER());
- bfin_write_PORTE_MUX(~0x3C0000 & bfin_read_PORTE_MUX());
+ peripheral_request(P_UART1_RTS, DRIVER_NAME);
+ peripheral_request(P_UART1_CTS DRIVER_NAME);
#endif
#endif
#ifdef CONFIG_SERIAL_BFIN_UART2
- /* Enable UART2 RX and TX on pin 4 & 5 of PORT B */
- bfin_write_PORTB_FER(0x30 | bfin_read_PORTB_FER());
- bfin_write_PORTB_MUX(~0xF00 & bfin_read_PORTB_MUX());
+ peripheral_request(P_UART2_TX, DRIVER_NAME);
+ peripheral_request(P_UART2_RX, DRIVER_NAME);
#endif
#ifdef CONFIG_SERIAL_BFIN_UART3
- /* Enable UART3 RX and TX on pin 6 & 7 of PORT B */
- bfin_write_PORTB_FER(0xC0 | bfin_read_PORTB_FER());
- bfin_write_PORTB_MUX(~0xF000 | bfin_read_PORTB_MUX());
+ peripheral_request(P_UART3_TX, DRIVER_NAME);
+ peripheral_request(P_UART3_RX, DRIVER_NAME);
+
#ifdef CONFIG_BFIN_UART3_CTSRTS
- /* Enable UART3 RTS and CTS on pin 2 & 3 of PORT B */
- bfin_write_PORTB_FER(0xC | bfin_read_PORTB_FER());
- bfin_write_PORTB_MUX(~0xF0 | bfin_read_PORTB_MUX());
+ peripheral_request(P_UART3_RTS, DRIVER_NAME);
+ peripheral_request(P_UART3_CTS DRIVER_NAME);
#endif
#endif
SSYNC();
#ifdef CONFIG_SERIAL_BFIN_CTSRTS
if (uart->cts_pin >= 0) {
- gpio_request(uart->cts_pin, NULL);
+ gpio_request(uart->cts_pin, DRIVER_NAME);
gpio_direction_input(uart->cts_pin);
}
if (uart->rts_pin >= 0) {
- gpio_request(uart->rts_pin, NULL);
+ gpio_request(uart->rts_pin, DRIVER_NAME);
gpio_direction_output(uart->rts_pin);
}
#endif
--
1.5.2
next prev parent reply other threads:[~2007-08-08 3:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-08 3:35 [PATCH 00/12] Blackfin arch GPIO updating Bryan Wu
2007-08-08 3:35 ` [PATCH 01/12] Blackfin arch: add peripheral resource allocation support Bryan Wu
2007-08-17 18:12 ` David Brownell
2007-08-08 3:35 ` [PATCH 02/12] Blackfin arch: Add label to call new GPIO API Bryan Wu
2007-08-17 18:24 ` David Brownell
2007-08-17 19:45 ` Mike Frysinger
2007-08-17 20:09 ` David Brownell
2007-08-17 20:19 ` Mike Frysinger
2007-08-17 20:21 ` Mike Frysinger
2007-08-17 21:15 ` David Brownell
2007-08-17 21:53 ` Robin Getz
2007-08-17 22:34 ` David Brownell
2007-08-18 19:07 ` Robin Getz
2007-08-19 21:54 ` David Brownell
2007-08-20 1:55 ` Robin Getz
2007-08-20 3:41 ` David Brownell
2007-08-08 3:35 ` [PATCH 03/12] Blackfin arch: fix PORT_J BUG for BF537/6 EMAC driver Bryan Wu
2007-08-08 3:35 ` [PATCH 04/12] Blackfin arch: Finalize the generic gpio support - add gpio_to_irq and irq_to_gpio Bryan Wu
2007-08-08 3:35 ` [PATCH 05/12] Blackfin arch: Advertise GENERIC_GPIO and remove duplicated GENERIC_CALIBRATE_DELAY Bryan Wu
2007-08-08 3:35 ` [PATCH 06/12] Blackfin arch: Add PORT_J.High (needed for BF548-EZkit Touchscreen interrupts) - remove PORT_C.H Bryan Wu
2007-08-08 3:35 ` [PATCH 07/12] Blackfin arch: bug fixing, add missing BF533_FAMILY GPIO_PFx definition Bryan Wu
2007-08-08 3:35 ` [PATCH 08/12] Blackfin arch: add missing gpio error handling to make sure we roll back requests in case one fails Bryan Wu
2007-08-08 3:35 ` [PATCH 09/12] Blackfin arch: scrub remaining ASSEMBLY usage since the switch to __ASSEMBLY__ Bryan Wu
2007-08-08 3:35 ` [PATCH 10/12] Blackfin arch: update platform driver resource information to the ezkitBF548 board file Bryan Wu
2007-08-08 3:35 ` [PATCH 11/12] Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch Bryan Wu
2007-08-08 3:35 ` Bryan Wu [this message]
2007-08-17 17:29 ` [PATCH 12/12] Blackfin serial driver: use new GPIO API David Brownell
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=11865441413182-git-send-email-bryan.wu@analog.com \
--to=bryan.wu@analog.com \
--cc=akpm@linux-foundation.org \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=torvalds@linux-foundation.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
Powered by JetHome