summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/sirfsoc_uart.h
diff options
context:
space:
mode:
authorQipan Li <Qipan.Li@csr.com>2015-04-29 06:45:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 17:01:20 (GMT)
commita6ffe8966acbb66bbff03bb9273dfe88b04585c2 (patch)
tree191e939a4fb2b027493712f11f4e7fac0141e9d3 /drivers/tty/serial/sirfsoc_uart.h
parent2c40b57dc82de8e1337666341efe41a0fe9dd741 (diff)
downloadlinux-a6ffe8966acbb66bbff03bb9273dfe88b04585c2.tar.xz
serial: sirf: use dynamic method allocate uart structure
In different platform of SiRF SoCs, there is no same uart and usp-uart numbers, it is not convenient to use hard-coded ports array and port lines. here we drop the hard-coded ports table , and drop "cell-index". then move to use alias id to get line. for example: aliases { serial0 = &uart0; serial1 = &uart1; serial2 = &uart2; serial3 = &uart3; serial4 = &uart4; serial5 = &uart5; serial6 = &uart6; serial9 = &usp2; }; at the same, enlarge the max port number according to the chip with the most UART. Signed-off-by: Qipan Li <Qipan.Li@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sirfsoc_uart.h')
-rw-r--r--drivers/tty/serial/sirfsoc_uart.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/serial/sirfsoc_uart.h b/drivers/tty/serial/sirfsoc_uart.h
index 11fd681..cd30ba9 100644
--- a/drivers/tty/serial/sirfsoc_uart.h
+++ b/drivers/tty/serial/sirfsoc_uart.h
@@ -9,8 +9,6 @@
struct sirfsoc_uart_param {
const char *uart_name;
const char *port_name;
- u32 uart_nr;
- u32 register_uart_nr;
};
struct sirfsoc_register {
@@ -183,8 +181,6 @@ struct sirfsoc_uart_register sirfsoc_usp = {
.uart_param = {
.uart_name = "ttySiRF",
.port_name = "sirfsoc-uart",
- .uart_nr = 2,
- .register_uart_nr = 3,
},
};
@@ -255,8 +251,6 @@ struct sirfsoc_uart_register sirfsoc_uart = {
.uart_param = {
.uart_name = "ttySiRF",
.port_name = "sirfsoc_uart",
- .uart_nr = 3,
- .register_uart_nr = 0,
},
};
/* uart io ctrl */
@@ -365,7 +359,7 @@ struct sirfsoc_uart_register sirfsoc_uart = {
#define SIRFSOC_UART_MINOR 0
#define SIRFUART_PORT_NAME "sirfsoc-uart"
#define SIRFUART_MAP_SIZE 0x200
-#define SIRFSOC_UART_NR 6
+#define SIRFSOC_UART_NR 11
#define SIRFSOC_PORT_TYPE 0xa5
/* Uart Common Use Macro*/