提交 57afb399 编写于 作者: S Sonic Zhang 提交者: Mike Frysinger

serial: bfin_5xx: move resources into board files

Rather than maintain Kconfig entries where people have to enter raw
numbers and hardcode lists of addresses/pins in the driver itself,
push it all to platform resources.  This lets us simplify the driver,
the Kconfig, and gives board porters greater flexibility.

In the process, we need to also start supporting the early platform
interface.  Not a big deal, but it causes the patch to be bigger than
a simple resource relocation.

All the Blackfin boards already have their resources updated and in
place for this change.
Signed-off-by: NSonic Zhang <sonic.zhang@analog.com>
Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 94a038c2
......@@ -13,6 +13,17 @@
#include <mach/anomaly.h>
#include <mach/bfin_serial.h>
#if defined(CONFIG_BFIN_UART0_CTSRTS) || \
defined(CONFIG_BFIN_UART1_CTSRTS) || \
defined(CONFIG_BFIN_UART2_CTSRTS) || \
defined(CONFIG_BFIN_UART3_CTSRTS)
# ifdef BFIN_UART_BF54X_STYLE
# define CONFIG_SERIAL_BFIN_HARD_CTSRTS
# else
# define CONFIG_SERIAL_BFIN_CTSRTS
# endif
#endif
struct circ_buf;
struct timer_list;
struct work_struct;
......@@ -203,6 +214,7 @@ struct bfin_uart_regs {
#define UART_PUT_LSR(p, v) bfin_write16(port_membase(p) + OFFSET_LSR, v)
/* This handles hard CTS/RTS */
#define BFIN_UART_CTSRTS_HARD
#define UART_CLEAR_SCTS(p) bfin_write16((port_membase(p) + OFFSET_MSR), SCTS)
#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
#define UART_DISABLE_RTS(x) UART_PUT_MCR(x, UART_GET_MCR(x) & ~(ARTS | MRTS))
......
......@@ -776,24 +776,7 @@ config BFIN_UART0_CTSRTS
bool "Enable UART0 hardware flow control"
depends on SERIAL_BFIN_UART0
help
Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
signal.
config UART0_CTS_PIN
int "UART0 CTS pin"
depends on BFIN_UART0_CTSRTS && !BF548
default 23
help
The default pin is GPIO_GP7.
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
config UART0_RTS_PIN
int "UART0 RTS pin"
depends on BFIN_UART0_CTSRTS && !BF548
default 22
help
The default pin is GPIO_GP6.
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
Enable hardware flow control in the driver.
config SERIAL_BFIN_UART1
bool "Enable UART1"
......@@ -805,22 +788,7 @@ config BFIN_UART1_CTSRTS
bool "Enable UART1 hardware flow control"
depends on SERIAL_BFIN_UART1
help
Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
signal.
config UART1_CTS_PIN
int "UART1 CTS pin"
depends on BFIN_UART1_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
config UART1_RTS_PIN
int "UART1 RTS pin"
depends on BFIN_UART1_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
Enable hardware flow control in the driver.
config SERIAL_BFIN_UART2
bool "Enable UART2"
......@@ -832,22 +800,7 @@ config BFIN_UART2_CTSRTS
bool "Enable UART2 hardware flow control"
depends on SERIAL_BFIN_UART2
help
Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
signal.
config UART2_CTS_PIN
int "UART2 CTS pin"
depends on BFIN_UART2_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
config UART2_RTS_PIN
int "UART2 RTS pin"
depends on BFIN_UART2_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
Enable hardware flow control in the driver.
config SERIAL_BFIN_UART3
bool "Enable UART3"
......@@ -859,22 +812,7 @@ config BFIN_UART3_CTSRTS
bool "Enable UART3 hardware flow control"
depends on SERIAL_BFIN_UART3
help
Enable hardware flow control in the driver. Using GPIO emulate the CTS/RTS
signal.
config UART3_CTS_PIN
int "UART3 CTS pin"
depends on BFIN_UART3_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
config UART3_RTS_PIN
int "UART3 RTS pin"
depends on BFIN_UART3_CTSRTS && !BF548
default -1
help
Refer to arch/blackfin/mach-*/include/mach/gpio.h to see the GPIO map.
Enable hardware flow control in the driver.
config SERIAL_IMX
bool "IMX serial port support"
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册