Commit ecd9561687a0952a96a0a705f618e59cb6f3189b
1 parent
7dec62e96b
Exists in
master
and in
39 other branches
serial: Add SERIAL_SH_SCI_NR_UARTS for sh-sci.
sh-sci needs to be able to define its number of ports to support, we do this with a config option, like most other ports do. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 2 changed files with 41 additions and 2 deletions Side-by-side Diff
drivers/serial/Kconfig
... | ... | @@ -642,12 +642,17 @@ |
642 | 642 | select SERIAL_CORE_CONSOLE |
643 | 643 | |
644 | 644 | config SERIAL_SH_SCI |
645 | - tristate "SH SCI(F) serial port support" | |
645 | + tristate "SuperH SCI(F) serial port support" | |
646 | 646 | depends on SUPERH || H8300 |
647 | 647 | select SERIAL_CORE |
648 | 648 | |
649 | +config SERIAL_SH_SCI_NR_UARTS | |
650 | + int "Maximum number of SCI(F) serial ports" | |
651 | + depends on SERIAL_SH_SCI | |
652 | + default "2" | |
653 | + | |
649 | 654 | config SERIAL_SH_SCI_CONSOLE |
650 | - bool "Support for console on SH SCI(F)" | |
655 | + bool "Support for console on SuperH SCI(F)" | |
651 | 656 | depends on SERIAL_SH_SCI=y |
652 | 657 | select SERIAL_CORE_CONSOLE |
653 | 658 |
include/asm-sh/sci.h
1 | +#ifndef __ASM_SH_SCI_H | |
2 | +#define __ASM_SH_SCI_H | |
3 | + | |
4 | +#include <linux/serial_core.h> | |
5 | + | |
6 | +/* | |
7 | + * Generic header for SuperH SCI(F) | |
8 | + * | |
9 | + * Do not place SH-specific parts in here, sh64 and h8300 depend on this too. | |
10 | + */ | |
11 | + | |
12 | +/* Offsets into the sci_port->irqs array */ | |
13 | +enum { | |
14 | + SCIx_ERI_IRQ, | |
15 | + SCIx_RXI_IRQ, | |
16 | + SCIx_TXI_IRQ, | |
17 | + SCIx_BRI_IRQ, | |
18 | + SCIx_NR_IRQS, | |
19 | +}; | |
20 | + | |
21 | +/* | |
22 | + * Platform device specific platform_data struct | |
23 | + */ | |
24 | +struct plat_sci_port { | |
25 | + void __iomem *membase; /* io cookie */ | |
26 | + unsigned long mapbase; /* resource base */ | |
27 | + unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ | |
28 | + unsigned int type; /* SCI / SCIF / IRDA */ | |
29 | + upf_t flags; /* UPF_* flags */ | |
30 | +}; | |
31 | + | |
32 | +int early_sci_setup(struct uart_port *port); | |
33 | + | |
34 | +#endif /* __ASM_SH_SCI_H */ |