mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	TTY/Serial patches for 4.15-rc1
Here is the big tty/serial driver pull request for 4.15-rc1.
 
 Lots of serial driver updates in here, some small vt cleanups, and a
 raft of SPDX and license boilerplate cleanups, messing up the diffstat a
 bit.
 
 Nothing major, with no realy functional changes except better hardware
 support for some platforms.
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWgnD+w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynAmgCfSSr/9qiCE0vfP5eVYjddzxfWyZ4AoMbKORZC
 5x2KVW0Btrbs3WmnD7ZU
 =PSea
 -----END PGP SIGNATURE-----
Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH:
 "Here is the big tty/serial driver pull request for 4.15-rc1.
  Lots of serial driver updates in here, some small vt cleanups, and a
  raft of SPDX and license boilerplate cleanups, messing up the diffstat
  a bit.
  Nothing major, with no realy functional changes except better hardware
  support for some platforms.
  All of these have been in linux-next for a while with no reported
  issues"
* tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits)
  tty: ehv_bytechan: fix spelling mistake
  tty: serial: meson: allow baud-rates lower than 9600
  serial: 8250_fintek: Fix crash with baud rate B0
  serial: 8250_fintek: Disable delays for ports != 0
  serial: 8250_fintek: Return -EINVAL on invalid configuration
  tty: Remove redundant license text
  tty: serdev: Remove redundant license text
  tty: hvc: Remove redundant license text
  tty: serial: Remove redundant license text
  tty: add SPDX identifiers to all remaining files in drivers/tty/
  tty: serial: jsm: remove redundant pointer ts
  tty: serial: jsm: add space before the open parenthesis '('
  tty: serial: jsm: fix coding style
  tty: serial: jsm: delete space between function name and '('
  tty: serial: jsm: add blank line after declarations
  tty: serial: jsm: change the type of local variable
  tty: serial: imx: remove dead code imx_dma_rxint
  tty: serial: imx: disable ageing timer interrupt if dma in use
  serial: 8250: fix potential deadlock in rs485-mode
  serial: m32r_sio: Drop redundant .data assignment
  ...
			
			
This commit is contained in:
		
						commit
						fb0255fb29
					
				
					 202 changed files with 1279 additions and 1671 deletions
				
			
		| 
						 | 
					@ -71,7 +71,7 @@ channel: a phandle to the DMA controller plus the following four integer cells:
 | 
				
			||||||
Example:
 | 
					Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	usart1: serial@40011000 {
 | 
						usart1: serial@40011000 {
 | 
				
			||||||
		compatible = "st,stm32-usart", "st,stm32-uart";
 | 
							compatible = "st,stm32-uart";
 | 
				
			||||||
		reg = <0x40011000 0x400>;
 | 
							reg = <0x40011000 0x400>;
 | 
				
			||||||
		interrupts = <37>;
 | 
							interrupts = <37>;
 | 
				
			||||||
		clocks = <&clk_pclk2>;
 | 
							clocks = <&clk_pclk2>;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,6 +24,7 @@ Optional properties:
 | 
				
			||||||
	- dma-names: "rx" for RX channel, "tx" for TX channel.
 | 
						- dma-names: "rx" for RX channel, "tx" for TX channel.
 | 
				
			||||||
- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
 | 
					- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
 | 
				
			||||||
  capable USARTs.
 | 
					  capable USARTs.
 | 
				
			||||||
 | 
					- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<chip> compatible description:
 | 
					<chip> compatible description:
 | 
				
			||||||
- at91rm9200:  legacy USART support
 | 
					- at91rm9200:  legacy USART support
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,6 +9,7 @@ Optional properties:
 | 
				
			||||||
- fsl,irda-mode : Indicate the uart supports irda mode
 | 
					- fsl,irda-mode : Indicate the uart supports irda mode
 | 
				
			||||||
- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
 | 
					- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
 | 
				
			||||||
                  in DCE mode by default.
 | 
					                  in DCE mode by default.
 | 
				
			||||||
 | 
					- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Please check Documentation/devicetree/bindings/serial/serial.txt
 | 
					Please check Documentation/devicetree/bindings/serial/serial.txt
 | 
				
			||||||
for the complete list of generic properties.
 | 
					for the complete list of generic properties.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,7 @@ Required properties:
 | 
				
			||||||
Optional properties:
 | 
					Optional properties:
 | 
				
			||||||
- dmas: A list of two dma specifiers, one for each entry in dma-names.
 | 
					- dmas: A list of two dma specifiers, one for each entry in dma-names.
 | 
				
			||||||
- dma-names: should contain "tx" and "rx".
 | 
					- dma-names: should contain "tx" and "rx".
 | 
				
			||||||
 | 
					- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Note: Optional properties for DMA support. Write them both or both not.
 | 
					Note: Optional properties for DMA support. Write them both or both not.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@ Optional properties:
 | 
				
			||||||
- dmas : DMA specifier, consisting of a phandle to the DMA controller
 | 
					- dmas : DMA specifier, consisting of a phandle to the DMA controller
 | 
				
			||||||
         node and a DMA channel number.
 | 
					         node and a DMA channel number.
 | 
				
			||||||
- dma-names : "rx" for receive channel, "tx" for transmit channel.
 | 
					- dma-names : "rx" for receive channel, "tx" for transmit channel.
 | 
				
			||||||
 | 
					- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Example:
 | 
					Example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,14 +2,10 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Required properties:
 | 
					Required properties:
 | 
				
			||||||
- compatible: can be either:
 | 
					- compatible: can be either:
 | 
				
			||||||
  - "st,stm32-usart",
 | 
					 | 
				
			||||||
  - "st,stm32-uart",
 | 
					  - "st,stm32-uart",
 | 
				
			||||||
  - "st,stm32f7-usart",
 | 
					 | 
				
			||||||
  - "st,stm32f7-uart",
 | 
					  - "st,stm32f7-uart",
 | 
				
			||||||
  - "st,stm32h7-usart"
 | 
					 | 
				
			||||||
  - "st,stm32h7-uart".
 | 
					  - "st,stm32h7-uart".
 | 
				
			||||||
  depending on whether the device supports synchronous mode
 | 
					  depending is compatible with stm32(f4), stm32f7 or stm32h7.
 | 
				
			||||||
  and is compatible with stm32(f4), stm32f7 or stm32h7.
 | 
					 | 
				
			||||||
- reg: The address and length of the peripheral registers space
 | 
					- reg: The address and length of the peripheral registers space
 | 
				
			||||||
- interrupts:
 | 
					- interrupts:
 | 
				
			||||||
  - The interrupt line for the USART instance,
 | 
					  - The interrupt line for the USART instance,
 | 
				
			||||||
| 
						 | 
					@ -33,7 +29,7 @@ usart4: serial@40004c00 {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
usart2: serial@40004400 {
 | 
					usart2: serial@40004400 {
 | 
				
			||||||
	compatible = "st,stm32-usart", "st,stm32-uart";
 | 
						compatible = "st,stm32-uart";
 | 
				
			||||||
	reg = <0x40004400 0x400>;
 | 
						reg = <0x40004400 0x400>;
 | 
				
			||||||
	interrupts = <38>;
 | 
						interrupts = <38>;
 | 
				
			||||||
	clocks = <&clk_pclk1>;
 | 
						clocks = <&clk_pclk1>;
 | 
				
			||||||
| 
						 | 
					@ -43,7 +39,7 @@ usart2: serial@40004400 {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
usart1: serial@40011000 {
 | 
					usart1: serial@40011000 {
 | 
				
			||||||
	compatible = "st,stm32-usart", "st,stm32-uart";
 | 
						compatible = "st,stm32-uart";
 | 
				
			||||||
	reg = <0x40011000 0x400>;
 | 
						reg = <0x40011000 0x400>;
 | 
				
			||||||
	interrupts = <37>;
 | 
						interrupts = <37>;
 | 
				
			||||||
	clocks = <&rcc 0 164>;
 | 
						clocks = <&rcc 0 164>;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -314,7 +314,7 @@ iwdg: watchdog@40003000 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart2: serial@40004400 {
 | 
							usart2: serial@40004400 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40004400 0x400>;
 | 
								reg = <0x40004400 0x400>;
 | 
				
			||||||
			interrupts = <38>;
 | 
								interrupts = <38>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART2)>;
 | 
								clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART2)>;
 | 
				
			||||||
| 
						 | 
					@ -322,7 +322,7 @@ usart2: serial@40004400 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart3: serial@40004800 {
 | 
							usart3: serial@40004800 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40004800 0x400>;
 | 
								reg = <0x40004800 0x400>;
 | 
				
			||||||
			interrupts = <39>;
 | 
								interrupts = <39>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART3)>;
 | 
								clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART3)>;
 | 
				
			||||||
| 
						 | 
					@ -386,7 +386,7 @@ dac2: dac@2 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart7: serial@40007800 {
 | 
							usart7: serial@40007800 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40007800 0x400>;
 | 
								reg = <0x40007800 0x400>;
 | 
				
			||||||
			interrupts = <82>;
 | 
								interrupts = <82>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART7)>;
 | 
								clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART7)>;
 | 
				
			||||||
| 
						 | 
					@ -394,7 +394,7 @@ usart7: serial@40007800 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart8: serial@40007c00 {
 | 
							usart8: serial@40007c00 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40007c00 0x400>;
 | 
								reg = <0x40007c00 0x400>;
 | 
				
			||||||
			interrupts = <83>;
 | 
								interrupts = <83>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART8)>;
 | 
								clocks = <&rcc 0 STM32F4_APB1_CLOCK(UART8)>;
 | 
				
			||||||
| 
						 | 
					@ -444,7 +444,7 @@ timer@7 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart1: serial@40011000 {
 | 
							usart1: serial@40011000 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40011000 0x400>;
 | 
								reg = <0x40011000 0x400>;
 | 
				
			||||||
			interrupts = <37>;
 | 
								interrupts = <37>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART1)>;
 | 
								clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART1)>;
 | 
				
			||||||
| 
						 | 
					@ -455,7 +455,7 @@ usart1: serial@40011000 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart6: serial@40011400 {
 | 
							usart6: serial@40011400 {
 | 
				
			||||||
			compatible = "st,stm32-usart", "st,stm32-uart";
 | 
								compatible = "st,stm32-uart";
 | 
				
			||||||
			reg = <0x40011400 0x400>;
 | 
								reg = <0x40011400 0x400>;
 | 
				
			||||||
			interrupts = <71>;
 | 
								interrupts = <71>;
 | 
				
			||||||
			clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART6)>;
 | 
								clocks = <&rcc 0 STM32F4_APB2_CLOCK(USART6)>;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -136,7 +136,7 @@ rtc: rtc@40002800 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart2: serial@40004400 {
 | 
							usart2: serial@40004400 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40004400 0x400>;
 | 
								reg = <0x40004400 0x400>;
 | 
				
			||||||
			interrupts = <38>;
 | 
								interrupts = <38>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_USART2>;
 | 
								clocks = <&rcc 1 CLK_USART2>;
 | 
				
			||||||
| 
						 | 
					@ -144,7 +144,7 @@ usart2: serial@40004400 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart3: serial@40004800 {
 | 
							usart3: serial@40004800 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40004800 0x400>;
 | 
								reg = <0x40004800 0x400>;
 | 
				
			||||||
			interrupts = <39>;
 | 
								interrupts = <39>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_USART3>;
 | 
								clocks = <&rcc 1 CLK_USART3>;
 | 
				
			||||||
| 
						 | 
					@ -177,7 +177,7 @@ cec: cec@40006c00 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart7: serial@40007800 {
 | 
							usart7: serial@40007800 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40007800 0x400>;
 | 
								reg = <0x40007800 0x400>;
 | 
				
			||||||
			interrupts = <82>;
 | 
								interrupts = <82>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_UART7>;
 | 
								clocks = <&rcc 1 CLK_UART7>;
 | 
				
			||||||
| 
						 | 
					@ -185,7 +185,7 @@ usart7: serial@40007800 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart8: serial@40007c00 {
 | 
							usart8: serial@40007c00 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40007c00 0x400>;
 | 
								reg = <0x40007c00 0x400>;
 | 
				
			||||||
			interrupts = <83>;
 | 
								interrupts = <83>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_UART8>;
 | 
								clocks = <&rcc 1 CLK_UART8>;
 | 
				
			||||||
| 
						 | 
					@ -193,7 +193,7 @@ usart8: serial@40007c00 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart1: serial@40011000 {
 | 
							usart1: serial@40011000 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40011000 0x400>;
 | 
								reg = <0x40011000 0x400>;
 | 
				
			||||||
			interrupts = <37>;
 | 
								interrupts = <37>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_USART1>;
 | 
								clocks = <&rcc 1 CLK_USART1>;
 | 
				
			||||||
| 
						 | 
					@ -201,7 +201,7 @@ usart1: serial@40011000 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart6: serial@40011400 {
 | 
							usart6: serial@40011400 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40011400 0x400>;
 | 
								reg = <0x40011400 0x400>;
 | 
				
			||||||
			interrupts = <71>;
 | 
								interrupts = <71>;
 | 
				
			||||||
			clocks = <&rcc 1 CLK_USART6>;
 | 
								clocks = <&rcc 1 CLK_USART6>;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,7 +67,7 @@ timer5: timer@40000c00 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart2: serial@40004400 {
 | 
							usart2: serial@40004400 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40004400 0x400>;
 | 
								reg = <0x40004400 0x400>;
 | 
				
			||||||
			interrupts = <38>;
 | 
								interrupts = <38>;
 | 
				
			||||||
			status = "disabled";
 | 
								status = "disabled";
 | 
				
			||||||
| 
						 | 
					@ -99,7 +99,7 @@ dac2: dac@2 {
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		usart1: serial@40011000 {
 | 
							usart1: serial@40011000 {
 | 
				
			||||||
			compatible = "st,stm32f7-usart", "st,stm32f7-uart";
 | 
								compatible = "st,stm32f7-uart";
 | 
				
			||||||
			reg = <0x40011000 0x400>;
 | 
								reg = <0x40011000 0x400>;
 | 
				
			||||||
			interrupts = <37>;
 | 
								interrupts = <37>;
 | 
				
			||||||
			status = "disabled";
 | 
								status = "disabled";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1505,41 +1505,38 @@ static void acpi_init_coherency(struct acpi_device *adev)
 | 
				
			||||||
	adev->flags.coherent_dma = cca;
 | 
						adev->flags.coherent_dma = cca;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int acpi_check_spi_i2c_slave(struct acpi_resource *ares, void *data)
 | 
					static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	bool *is_spi_i2c_slave_p = data;
 | 
						bool *is_serial_bus_slave_p = data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
 | 
						if (ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						*is_serial_bus_slave_p = true;
 | 
				
			||||||
	 * devices that are connected to UART still need to be enumerated to
 | 
					 | 
				
			||||||
	 * platform bus
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if (ares->data.common_serial_bus.type != ACPI_RESOURCE_SERIAL_TYPE_UART)
 | 
					 | 
				
			||||||
		*is_spi_i2c_slave_p = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	 /* no need to do more checking */
 | 
						 /* no need to do more checking */
 | 
				
			||||||
	return -1;
 | 
						return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool acpi_is_spi_i2c_slave(struct acpi_device *device)
 | 
					static bool acpi_is_serial_bus_slave(struct acpi_device *device)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct list_head resource_list;
 | 
						struct list_head resource_list;
 | 
				
			||||||
	bool is_spi_i2c_slave = false;
 | 
						bool is_serial_bus_slave = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Macs use device properties in lieu of _CRS resources */
 | 
						/* Macs use device properties in lieu of _CRS resources */
 | 
				
			||||||
	if (x86_apple_machine &&
 | 
						if (x86_apple_machine &&
 | 
				
			||||||
	    (fwnode_property_present(&device->fwnode, "spiSclkPeriod") ||
 | 
						    (fwnode_property_present(&device->fwnode, "spiSclkPeriod") ||
 | 
				
			||||||
	     fwnode_property_present(&device->fwnode, "i2cAddress")))
 | 
						     fwnode_property_present(&device->fwnode, "i2cAddress") ||
 | 
				
			||||||
 | 
						     fwnode_property_present(&device->fwnode, "baud")))
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	INIT_LIST_HEAD(&resource_list);
 | 
						INIT_LIST_HEAD(&resource_list);
 | 
				
			||||||
	acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave,
 | 
						acpi_dev_get_resources(device, &resource_list,
 | 
				
			||||||
			       &is_spi_i2c_slave);
 | 
								       acpi_check_serial_bus_slave,
 | 
				
			||||||
 | 
								       &is_serial_bus_slave);
 | 
				
			||||||
	acpi_dev_free_resource_list(&resource_list);
 | 
						acpi_dev_free_resource_list(&resource_list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return is_spi_i2c_slave;
 | 
						return is_serial_bus_slave;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
 | 
					void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
 | 
				
			||||||
| 
						 | 
					@ -1557,7 +1554,7 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
 | 
				
			||||||
	acpi_bus_get_flags(device);
 | 
						acpi_bus_get_flags(device);
 | 
				
			||||||
	device->flags.match_driver = false;
 | 
						device->flags.match_driver = false;
 | 
				
			||||||
	device->flags.initialized = true;
 | 
						device->flags.initialized = true;
 | 
				
			||||||
	device->flags.spi_i2c_slave = acpi_is_spi_i2c_slave(device);
 | 
						device->flags.serial_bus_slave = acpi_is_serial_bus_slave(device);
 | 
				
			||||||
	acpi_device_clear_enumerated(device);
 | 
						acpi_device_clear_enumerated(device);
 | 
				
			||||||
	device_initialize(&device->dev);
 | 
						device_initialize(&device->dev);
 | 
				
			||||||
	dev_set_uevent_suppress(&device->dev, true);
 | 
						dev_set_uevent_suppress(&device->dev, true);
 | 
				
			||||||
| 
						 | 
					@ -1841,10 +1838,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
 | 
				
			||||||
static void acpi_default_enumeration(struct acpi_device *device)
 | 
					static void acpi_default_enumeration(struct acpi_device *device)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Do not enumerate SPI/I2C slaves as they will be enumerated by their
 | 
						 * Do not enumerate SPI/I2C/UART slaves as they will be enumerated by
 | 
				
			||||||
	 * respective parents.
 | 
						 * their respective parents.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (!device->flags.spi_i2c_slave) {
 | 
						if (!device->flags.serial_bus_slave) {
 | 
				
			||||||
		acpi_create_platform_device(device, NULL);
 | 
							acpi_create_platform_device(device, NULL);
 | 
				
			||||||
		acpi_device_set_enumerated(device);
 | 
							acpi_device_set_enumerated(device);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
| 
						 | 
					@ -1941,7 +1938,7 @@ static void acpi_bus_attach(struct acpi_device *device)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	device->flags.match_driver = true;
 | 
						device->flags.match_driver = true;
 | 
				
			||||||
	if (ret > 0 && !device->flags.spi_i2c_slave) {
 | 
						if (ret > 0 && !device->flags.serial_bus_slave) {
 | 
				
			||||||
		acpi_device_set_enumerated(device);
 | 
							acpi_device_set_enumerated(device);
 | 
				
			||||||
		goto ok;
 | 
							goto ok;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -1950,7 +1947,7 @@ static void acpi_bus_attach(struct acpi_device *device)
 | 
				
			||||||
	if (ret < 0)
 | 
						if (ret < 0)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!device->pnp.type.platform_id && !device->flags.spi_i2c_slave)
 | 
						if (!device->pnp.type.platform_id && !device->flags.serial_bus_slave)
 | 
				
			||||||
		acpi_device_set_enumerated(device);
 | 
							acpi_device_set_enumerated(device);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		acpi_default_enumeration(device);
 | 
							acpi_default_enumeration(device);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Serial driver for the amiga builtin port.
 | 
					 * Serial driver for the amiga builtin port.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * TTY over Blackfin JTAG Communication
 | 
					 * TTY over Blackfin JTAG Communication
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2008-2009 Analog Devices Inc.
 | 
					 * Copyright 2008-2009 Analog Devices Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Enter bugs at http://blackfin.uclinux.org/
 | 
					 * Enter bugs at http://blackfin.uclinux.org/
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the GPL-2 or later.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DRV_NAME "bfin-jtag-comm"
 | 
					#define DRV_NAME "bfin-jtag-comm"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
#undef	BLOCKMOVE
 | 
					#undef	BLOCKMOVE
 | 
				
			||||||
#define	Z_WAKE
 | 
					#define	Z_WAKE
 | 
				
			||||||
#undef	Z_EXT_CHARS_IN_BUFFER
 | 
					#undef	Z_EXT_CHARS_IN_BUFFER
 | 
				
			||||||
| 
						 | 
					@ -286,8 +287,7 @@ static long cyz_polling_cycle = CZ_DEF_POLL;
 | 
				
			||||||
static DEFINE_TIMER(cyz_timerlist, cyz_poll);
 | 
					static DEFINE_TIMER(cyz_timerlist, cyz_poll);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#else				/* CONFIG_CYZ_INTR */
 | 
					#else				/* CONFIG_CYZ_INTR */
 | 
				
			||||||
static void cyz_rx_restart(unsigned long);
 | 
					static void cyz_rx_restart(struct timer_list *);
 | 
				
			||||||
static struct timer_list cyz_rx_full_timer[NR_PORTS];
 | 
					 | 
				
			||||||
#endif				/* CONFIG_CYZ_INTR */
 | 
					#endif				/* CONFIG_CYZ_INTR */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void cyy_writeb(struct cyclades_port *port, u32 reg, u8 val)
 | 
					static void cyy_writeb(struct cyclades_port *port, u32 reg, u8 val)
 | 
				
			||||||
| 
						 | 
					@ -992,10 +992,8 @@ static void cyz_handle_rx(struct cyclades_port *info)
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		char_count = rx_put - rx_get + rx_bufsize;
 | 
							char_count = rx_put - rx_get + rx_bufsize;
 | 
				
			||||||
	if (char_count >= readl(&buf_ctrl->rx_threshold) &&
 | 
						if (char_count >= readl(&buf_ctrl->rx_threshold) &&
 | 
				
			||||||
			!timer_pending(&cyz_rx_full_timer[
 | 
								!timer_pending(&info->rx_full_timer))
 | 
				
			||||||
					info->line]))
 | 
							mod_timer(&info->rx_full_timer, jiffies + 1);
 | 
				
			||||||
		mod_timer(&cyz_rx_full_timer[info->line],
 | 
					 | 
				
			||||||
				jiffies + 1);
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	info->idle_stats.recv_idle = jiffies;
 | 
						info->idle_stats.recv_idle = jiffies;
 | 
				
			||||||
	tty_schedule_flip(&info->port);
 | 
						tty_schedule_flip(&info->port);
 | 
				
			||||||
| 
						 | 
					@ -1197,9 +1195,9 @@ static irqreturn_t cyz_interrupt(int irq, void *dev_id)
 | 
				
			||||||
	return IRQ_HANDLED;
 | 
						return IRQ_HANDLED;
 | 
				
			||||||
}				/* cyz_interrupt */
 | 
					}				/* cyz_interrupt */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void cyz_rx_restart(unsigned long arg)
 | 
					static void cyz_rx_restart(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct cyclades_port *info = (struct cyclades_port *)arg;
 | 
						struct cyclades_port *info = from_timer(info, t, rx_full_timer);
 | 
				
			||||||
	struct cyclades_card *card = info->card;
 | 
						struct cyclades_card *card = info->card;
 | 
				
			||||||
	int retval;
 | 
						int retval;
 | 
				
			||||||
	__u32 channel = info->line - card->first_line;
 | 
						__u32 channel = info->line - card->first_line;
 | 
				
			||||||
| 
						 | 
					@ -3097,8 +3095,7 @@ static int cy_init_card(struct cyclades_card *cinfo)
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE;
 | 
									info->xmit_fifo_size = 4 * CYZ_FIFO_SIZE;
 | 
				
			||||||
#ifdef CONFIG_CYZ_INTR
 | 
					#ifdef CONFIG_CYZ_INTR
 | 
				
			||||||
			setup_timer(&cyz_rx_full_timer[port],
 | 
								timer_setup(&info->rx_full_timer, cyz_rx_restart, 0);
 | 
				
			||||||
				cyz_rx_restart, (unsigned long)info);
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			unsigned short chip_number;
 | 
								unsigned short chip_number;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/* ePAPR hypervisor byte channel device driver
 | 
					/* ePAPR hypervisor byte channel device driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2009-2011 Freescale Semiconductor, Inc.
 | 
					 * Copyright 2009-2011 Freescale Semiconductor, Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Author: Timur Tabi <timur@freescale.com>
 | 
					 * Author: Timur Tabi <timur@freescale.com>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This file is licensed under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 * version 2.  This program is licensed "as is" without any warranty of any
 | 
					 | 
				
			||||||
 * kind, whether express or implied.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This driver support three distinct interfaces, all of which are related to
 | 
					 * This driver support three distinct interfaces, all of which are related to
 | 
				
			||||||
 * ePAPR hypervisor byte channels.
 | 
					 * ePAPR hypervisor byte channels.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -328,7 +325,7 @@ console_initcall(ehv_bc_console_init);
 | 
				
			||||||
/******************************** TTY DRIVER ********************************/
 | 
					/******************************** TTY DRIVER ********************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * byte channel receive interupt handler
 | 
					 * byte channel receive interrupt handler
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This ISR is called whenever data is available on a byte channel.
 | 
					 * This ISR is called whenever data is available on a byte channel.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					@ -428,7 +425,7 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * byte channel transmit interupt handler
 | 
					 * byte channel transmit interrupt handler
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This ISR is called whenever space becomes available for transmitting
 | 
					 * This ISR is called whenever space becomes available for transmitting
 | 
				
			||||||
 * characters on a byte channel.
 | 
					 * characters on a byte channel.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2007 Google, Inc.
 | 
					 * Copyright (C) 2007 Google, Inc.
 | 
				
			||||||
 * Copyright (C) 2012 Intel, Inc.
 | 
					 * Copyright (C) 2012 Intel, Inc.
 | 
				
			||||||
 * Copyright (C) 2017 Imagination Technologies Ltd.
 | 
					 * Copyright (C) 2017 Imagination Technologies Ltd.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This software is licensed under the terms of the GNU General Public
 | 
					 | 
				
			||||||
 * License version 2, as published by the Free Software Foundation, and
 | 
					 | 
				
			||||||
 * may be copied, distributed, and modified under those terms.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Console via Blackfin JTAG Communication
 | 
					 * Console via Blackfin JTAG Communication
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2008-2011 Analog Devices Inc.
 | 
					 * Copyright 2008-2011 Analog Devices Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Enter bugs at http://blackfin.uclinux.org/
 | 
					 * Enter bugs at http://blackfin.uclinux.org/
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the GPL-2 or later.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
 | 
					 * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
 | 
				
			||||||
 * Copyright (C) 2001 Paul Mackerras <paulus@au.ibm.com>, IBM
 | 
					 * Copyright (C) 2001 Paul Mackerras <paulus@au.ibm.com>, IBM
 | 
				
			||||||
| 
						 | 
					@ -6,20 +7,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Additional Author(s):
 | 
					 * Additional Author(s):
 | 
				
			||||||
 *  Ryan S. Arnold <rsa@us.ibm.com>
 | 
					 *  Ryan S. Arnold <rsa@us.ibm.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * hvc_console.h
 | 
					 * hvc_console.h
 | 
				
			||||||
 * Copyright (C) 2005 IBM Corporation
 | 
					 * Copyright (C) 2005 IBM Corporation
 | 
				
			||||||
| 
						 | 
					@ -8,20 +9,6 @@
 | 
				
			||||||
 * hvc_console header information:
 | 
					 * hvc_console header information:
 | 
				
			||||||
 *      moved here from arch/powerpc/include/asm/hvconsole.h
 | 
					 *      moved here from arch/powerpc/include/asm/hvconsole.h
 | 
				
			||||||
 *      and drivers/char/hvc_console.c
 | 
					 *      and drivers/char/hvc_console.c
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef HVC_CONSOLE_H
 | 
					#ifndef HVC_CONSOLE_H
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,5 @@
 | 
				
			||||||
/* Copyright (c) 2010, 2014 The Linux Foundation. All rights reserved.
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
 *
 | 
					/* Copyright (c) 2010, 2014 The Linux Foundation. All rights reserved.  */
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 and
 | 
					 | 
				
			||||||
 * only version 2 as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * opal driver interface to hvc_console.c
 | 
					 * opal driver interface to hvc_console.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2011 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
 | 
					 * Copyright 2011 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#undef DEBUG
 | 
					#undef DEBUG
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * IBM RTAS driver interface to hvc_console.c
 | 
					 * IBM RTAS driver interface to hvc_console.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -11,20 +12,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *    inspired by drivers/char/hvc_console.c
 | 
					 *    inspired by drivers/char/hvc_console.c
 | 
				
			||||||
 *    written by Anton Blanchard and Paul Mackerras
 | 
					 *    written by Anton Blanchard and Paul Mackerras
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,7 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright 2010 Tilera Corporation. All Rights Reserved.
 | 
					 * Copyright 2010 Tilera Corporation. All Rights Reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *   This program is free software; you can redistribute it and/or
 | 
					 | 
				
			||||||
 *   modify it under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 *   as published by the Free Software Foundation, version 2.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful, but
 | 
					 | 
				
			||||||
 *   WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 | 
					 | 
				
			||||||
 *   NON INFRINGEMENT.  See the GNU General Public License for
 | 
					 | 
				
			||||||
 *   more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Tilera TILE Processor hypervisor console
 | 
					 * Tilera TILE Processor hypervisor console
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,21 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * udbg interface to hvc_console.c
 | 
					 * udbg interface to hvc_console.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * (C) Copyright David Gibson, IBM Corporation 2008.
 | 
					 * (C) Copyright David Gibson, IBM Corporation 2008.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * vio driver interface to hvc_console.c
 | 
					 * vio driver interface to hvc_console.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -14,20 +15,6 @@
 | 
				
			||||||
 * Additional Author(s):
 | 
					 * Additional Author(s):
 | 
				
			||||||
 *  Ryan S. Arnold <rsa@us.ibm.com>
 | 
					 *  Ryan S. Arnold <rsa@us.ibm.com>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * TODO:
 | 
					 * TODO:
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *   - handle error in sending hvsi protocol packets
 | 
					 *   - handle error in sending hvsi protocol packets
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,21 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * xen console driver interface to hvc_console.c
 | 
					 * xen console driver interface to hvc_console.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * (c) 2007 Gerd Hoffmann <kraxel@suse.de>
 | 
					 * (c) 2007 Gerd Hoffmann <kraxel@suse.de>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * IBM eServer Hypervisor Virtual Console Server Device Driver
 | 
					 * IBM eServer Hypervisor Virtual Console Server Device Driver
 | 
				
			||||||
 * Copyright (C) 2003, 2004 IBM Corp.
 | 
					 * Copyright (C) 2003, 2004 IBM Corp.
 | 
				
			||||||
 *  Ryan S. Arnold (rsa@us.ibm.com)
 | 
					 *  Ryan S. Arnold (rsa@us.ibm.com)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *  it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *  the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *  (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *  GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 *  along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Author(s) :  Ryan S. Arnold <rsa@us.ibm.com>
 | 
					 * Author(s) :  Ryan S. Arnold <rsa@us.ibm.com>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This is the device driver for the IBM Hypervisor Virtual Console Server,
 | 
					 * This is the device driver for the IBM Hypervisor Virtual Console Server,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,19 +1,6 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2004 Hollis Blanchard <hollisb@us.ibm.com>, IBM
 | 
					 * Copyright (C) 2004 Hollis Blanchard <hollisb@us.ibm.com>, IBM
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Host Virtual Serial Interface (HVSI) is a protocol between the hosted OS
 | 
					/* Host Virtual Serial Interface (HVSI) is a protocol between the hosted OS
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * IPWireless 3G PCMCIA Network Driver
 | 
					 * IPWireless 3G PCMCIA Network Driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,5 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *	This program is free software; you can redistribute it and/or
 | 
					 | 
				
			||||||
 *	modify it under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 *	as published by the Free Software Foundation; either version
 | 
					 | 
				
			||||||
 *	2 of the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *	Original driver code supplied by Multi-Tech
 | 
					 *	Original driver code supplied by Multi-Tech
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	Changes
 | 
					 *	Changes
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  dashtty.c - tty driver for Dash channels interface.
 | 
					 *  dashtty.c - tty driver for Dash channels interface.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2007,2008,2012 Imagination Technologies
 | 
					 *  Copyright (C) 2007,2008,2012 Imagination Technologies
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This file is subject to the terms and conditions of the GNU General Public
 | 
					 | 
				
			||||||
 * License.  See the file COPYING in the main directory of this archive
 | 
					 | 
				
			||||||
 * for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/atomic.h>
 | 
					#include <linux/atomic.h>
 | 
				
			||||||
| 
						 | 
					@ -309,7 +305,7 @@ static int put_data(void *arg)
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *	This gets called every DA_TTY_POLL and polls the channels for data
 | 
					 *	This gets called every DA_TTY_POLL and polls the channels for data
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void dashtty_timer(unsigned long ignored)
 | 
					static void dashtty_timer(struct timer_list *poll_timer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int channel;
 | 
						int channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -323,12 +319,12 @@ static void dashtty_timer(unsigned long ignored)
 | 
				
			||||||
	if (channel >= 0)
 | 
						if (channel >= 0)
 | 
				
			||||||
		fetch_data(channel);
 | 
							fetch_data(channel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mod_timer(&poll_timer, jiffies + DA_TTY_POLL);
 | 
						mod_timer(poll_timer, jiffies + DA_TTY_POLL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void add_poll_timer(struct timer_list *poll_timer)
 | 
					static void add_poll_timer(struct timer_list *poll_timer)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	setup_pinned_timer(poll_timer, dashtty_timer, 0);
 | 
						timer_setup(poll_timer, dashtty_timer, TIMER_PINNED);
 | 
				
			||||||
	poll_timer->expires = jiffies + DA_TTY_POLL;
 | 
						poll_timer->expires = jiffies + DA_TTY_POLL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
| 
						 | 
					@ -461,7 +457,7 @@ static void dashtty_hangup(struct tty_struct *tty)
 | 
				
			||||||
 * buffers. It is used to delay the expensive writeout until the writer has
 | 
					 * buffers. It is used to delay the expensive writeout until the writer has
 | 
				
			||||||
 * stopped writing.
 | 
					 * stopped writing.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void dashtty_put_timer(unsigned long ignored)
 | 
					static void dashtty_put_timer(struct timer_list *unused)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (atomic_read(&dashtty_xmit_cnt))
 | 
						if (atomic_read(&dashtty_xmit_cnt))
 | 
				
			||||||
		wake_up_interruptible(&dashtty_waitqueue);
 | 
							wake_up_interruptible(&dashtty_waitqueue);
 | 
				
			||||||
| 
						 | 
					@ -603,7 +599,7 @@ static int __init dashtty_init(void)
 | 
				
			||||||
		complete(&dport->xmit_empty);
 | 
							complete(&dport->xmit_empty);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	setup_timer(&put_timer, dashtty_put_timer, 0);
 | 
						timer_setup(&put_timer, dashtty_put_timer, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	init_waitqueue_head(&dashtty_waitqueue);
 | 
						init_waitqueue_head(&dashtty_waitqueue);
 | 
				
			||||||
	dashtty_thread = kthread_create(put_data, NULL, "ttyDA");
 | 
						dashtty_thread = kthread_create(put_data, NULL, "ttyDA");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * TTY driver for MIPS EJTAG Fast Debug Channels.
 | 
					 * TTY driver for MIPS EJTAG Fast Debug Channels.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2007-2015 Imagination Technologies Ltd
 | 
					 * Copyright (C) 2007-2015 Imagination Technologies Ltd
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This file is subject to the terms and conditions of the GNU General Public
 | 
					 | 
				
			||||||
 * License. See the file COPYING in the main directory of this archive for more
 | 
					 | 
				
			||||||
 * details.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/atomic.h>
 | 
					#include <linux/atomic.h>
 | 
				
			||||||
| 
						 | 
					@ -683,9 +680,9 @@ static irqreturn_t mips_ejtag_fdc_isr(int irq, void *dev_id)
 | 
				
			||||||
 * It simply triggers the common FDC handler code and arranges for further
 | 
					 * It simply triggers the common FDC handler code and arranges for further
 | 
				
			||||||
 * polling.
 | 
					 * polling.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void mips_ejtag_fdc_tty_timer(unsigned long opaque)
 | 
					static void mips_ejtag_fdc_tty_timer(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct mips_ejtag_fdc_tty *priv = (void *)opaque;
 | 
						struct mips_ejtag_fdc_tty *priv = from_timer(priv, t, poll_timer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mips_ejtag_fdc_handle(priv);
 | 
						mips_ejtag_fdc_handle(priv);
 | 
				
			||||||
	if (!priv->removing)
 | 
						if (!priv->removing)
 | 
				
			||||||
| 
						 | 
					@ -1002,8 +999,8 @@ static int mips_ejtag_fdc_tty_probe(struct mips_cdmm_device *dev)
 | 
				
			||||||
		raw_spin_unlock_irq(&priv->lock);
 | 
							raw_spin_unlock_irq(&priv->lock);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		/* If we didn't get an usable IRQ, poll instead */
 | 
							/* If we didn't get an usable IRQ, poll instead */
 | 
				
			||||||
		setup_pinned_timer(&priv->poll_timer, mips_ejtag_fdc_tty_timer,
 | 
							timer_setup(&priv->poll_timer, mips_ejtag_fdc_tty_timer,
 | 
				
			||||||
			    (unsigned long)priv);
 | 
								    TIMER_PINNED);
 | 
				
			||||||
		priv->poll_timer.expires = jiffies + FDC_TTY_POLL;
 | 
							priv->poll_timer.expires = jiffies + FDC_TTY_POLL;
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * Always attach the timer to the right CPU. The channels are
 | 
							 * Always attach the timer to the right CPU. The channels are
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*****************************************************************************/
 | 
					/*****************************************************************************/
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *           moxa.c  -- MOXA Intellio family multiport serial driver.
 | 
					 *           moxa.c  -- MOXA Intellio family multiport serial driver.
 | 
				
			||||||
| 
						 | 
					@ -7,11 +8,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *      This code is loosely based on the Linux serial driver, written by
 | 
					 *      This code is loosely based on the Linux serial driver, written by
 | 
				
			||||||
 *      Linus Torvalds, Theodore T'so and others.
 | 
					 *      Linus Torvalds, Theodore T'so and others.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *      This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *      it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *      the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *      (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *          mxser.c  -- MOXA Smartio/Industio family multiport serial driver.
 | 
					 *          mxser.c  -- MOXA Smartio/Industio family multiport serial driver.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -8,11 +9,6 @@
 | 
				
			||||||
 *	Linux serial driver, written by Linus Torvalds, Theodore T'so and
 | 
					 *	Linux serial driver, written by Linus Torvalds, Theodore T'so and
 | 
				
			||||||
 *	others.
 | 
					 *	others.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *      This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *      it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *      the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *      (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *	Fed through a cleanup, indent and remove of non 2.6 code by Alan Cox
 | 
					 *	Fed through a cleanup, indent and remove of non 2.6 code by Alan Cox
 | 
				
			||||||
 *	<alan@lxorguk.ukuu.org.uk>. The original 1.8 code is available on
 | 
					 *	<alan@lxorguk.ukuu.org.uk>. The original 1.8 code is available on
 | 
				
			||||||
 *	www.moxa.com.
 | 
					 *	www.moxa.com.
 | 
				
			||||||
| 
						 | 
					@ -642,8 +638,7 @@ static int mxser_set_baud(struct tty_struct *tty, long newspd)
 | 
				
			||||||
 * This routine is called to set the UART divisor registers to match
 | 
					 * This routine is called to set the UART divisor registers to match
 | 
				
			||||||
 * the specified baud rate for a serial port.
 | 
					 * the specified baud rate for a serial port.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int mxser_change_speed(struct tty_struct *tty,
 | 
					static int mxser_change_speed(struct tty_struct *tty)
 | 
				
			||||||
					struct ktermios *old_termios)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct mxser_port *info = tty->driver_data;
 | 
						struct mxser_port *info = tty->driver_data;
 | 
				
			||||||
	unsigned cflag, cval, fcr;
 | 
						unsigned cflag, cval, fcr;
 | 
				
			||||||
| 
						 | 
					@ -945,7 +940,7 @@ static int mxser_activate(struct tty_port *port, struct tty_struct *tty)
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * and set the speed of the serial port
 | 
						 * and set the speed of the serial port
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	mxser_change_speed(tty, NULL);
 | 
						mxser_change_speed(tty);
 | 
				
			||||||
	spin_unlock_irqrestore(&info->slock, flags);
 | 
						spin_unlock_irqrestore(&info->slock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					@ -1288,7 +1283,7 @@ static int mxser_set_serial_info(struct tty_struct *tty,
 | 
				
			||||||
	if (tty_port_initialized(port)) {
 | 
						if (tty_port_initialized(port)) {
 | 
				
			||||||
		if (flags != (port->flags & ASYNC_SPD_MASK)) {
 | 
							if (flags != (port->flags & ASYNC_SPD_MASK)) {
 | 
				
			||||||
			spin_lock_irqsave(&info->slock, sl_flags);
 | 
								spin_lock_irqsave(&info->slock, sl_flags);
 | 
				
			||||||
			mxser_change_speed(tty, NULL);
 | 
								mxser_change_speed(tty);
 | 
				
			||||||
			spin_unlock_irqrestore(&info->slock, sl_flags);
 | 
								spin_unlock_irqrestore(&info->slock, sl_flags);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
| 
						 | 
					@ -1946,7 +1941,7 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi
 | 
				
			||||||
	unsigned long flags;
 | 
						unsigned long flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spin_lock_irqsave(&info->slock, flags);
 | 
						spin_lock_irqsave(&info->slock, flags);
 | 
				
			||||||
	mxser_change_speed(tty, old_termios);
 | 
						mxser_change_speed(tty);
 | 
				
			||||||
	spin_unlock_irqrestore(&info->slock, flags);
 | 
						spin_unlock_irqrestore(&info->slock, flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) {
 | 
						if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) {
 | 
				
			||||||
| 
						 | 
					@ -2375,8 +2370,7 @@ static void mxser_release_ISA_res(struct mxser_board *brd)
 | 
				
			||||||
	mxser_release_vector(brd);
 | 
						mxser_release_vector(brd);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int mxser_initbrd(struct mxser_board *brd,
 | 
					static int mxser_initbrd(struct mxser_board *brd)
 | 
				
			||||||
		struct pci_dev *pdev)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct mxser_port *info;
 | 
						struct mxser_port *info;
 | 
				
			||||||
	unsigned int i;
 | 
						unsigned int i;
 | 
				
			||||||
| 
						 | 
					@ -2640,7 +2634,7 @@ static int mxser_probe(struct pci_dev *pdev,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* mxser_initbrd will hook ISR. */
 | 
						/* mxser_initbrd will hook ISR. */
 | 
				
			||||||
	retval = mxser_initbrd(brd, pdev);
 | 
						retval = mxser_initbrd(brd);
 | 
				
			||||||
	if (retval)
 | 
						if (retval)
 | 
				
			||||||
		goto err_rel3;
 | 
							goto err_rel3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2746,7 +2740,7 @@ static int __init mxser_module_init(void)
 | 
				
			||||||
				brd->info->name, ioaddr[b]);
 | 
									brd->info->name, ioaddr[b]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* mxser_initbrd will hook ISR. */
 | 
							/* mxser_initbrd will hook ISR. */
 | 
				
			||||||
		if (mxser_initbrd(brd, NULL) < 0) {
 | 
							if (mxser_initbrd(brd) < 0) {
 | 
				
			||||||
			mxser_release_ISA_res(brd);
 | 
								mxser_release_ISA_res(brd);
 | 
				
			||||||
			brd->info = NULL;
 | 
								brd->info = NULL;
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,20 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * n_gsm.c GSM 0710 tty multiplexor
 | 
					 * n_gsm.c GSM 0710 tty multiplexor
 | 
				
			||||||
 * Copyright (c) 2009/10 Intel Corporation
 | 
					 * Copyright (c) 2009/10 Intel Corporation
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *	* THIS IS A DEVELOPMENT SNAPSHOT IT IS NOT A FINAL RELEASE *
 | 
					 *	* THIS IS A DEVELOPMENT SNAPSHOT IT IS NOT A FINAL RELEASE *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * TO DO:
 | 
					 * TO DO:
 | 
				
			||||||
| 
						 | 
					@ -1646,9 +1634,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	skb_queue_head_init(&dlci->skb_list);
 | 
						skb_queue_head_init(&dlci->skb_list);
 | 
				
			||||||
	init_timer(&dlci->t1);
 | 
						setup_timer(&dlci->t1, gsm_dlci_t1, (unsigned long)dlci);
 | 
				
			||||||
	dlci->t1.function = gsm_dlci_t1;
 | 
					 | 
				
			||||||
	dlci->t1.data = (unsigned long)dlci;
 | 
					 | 
				
			||||||
	tty_port_init(&dlci->port);
 | 
						tty_port_init(&dlci->port);
 | 
				
			||||||
	dlci->port.ops = &gsm_port_ops;
 | 
						dlci->port.ops = &gsm_port_ops;
 | 
				
			||||||
	dlci->gsm = gsm;
 | 
						dlci->gsm = gsm;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-1.0+
 | 
				
			||||||
/* generic HDLC line discipline for Linux
 | 
					/* generic HDLC line discipline for Linux
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Written by Paul Fulghum paulkf@microgate.com
 | 
					 * Written by Paul Fulghum paulkf@microgate.com
 | 
				
			||||||
| 
						 | 
					@ -11,8 +12,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Original release 01/11/99
 | 
					 * Original release 01/11/99
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This code is released under the GNU General Public License (GPL)
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This module implements the tty line discipline N_HDLC for use with
 | 
					 * This module implements the tty line discipline N_HDLC for use with
 | 
				
			||||||
 * tty device drivers that support bit-synchronous HDLC communications.
 | 
					 * tty device drivers that support bit-synchronous HDLC communications.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
#include <linux/tty.h>
 | 
					#include <linux/tty.h>
 | 
				
			||||||
| 
						 | 
					@ -7,19 +8,6 @@
 | 
				
			||||||
 *  n_null.c - Null line discipline used in the failure path
 | 
					 *  n_null.c - Null line discipline used in the failure path
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) Intel 2017
 | 
					 *  Copyright (C) Intel 2017
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *  it under the terms of the GNU General Public License version 2
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *  GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int n_null_open(struct tty_struct *tty)
 | 
					static int n_null_open(struct tty_struct *tty)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-1.0+
 | 
				
			||||||
/* r3964 linediscipline for linux
 | 
					/* r3964 linediscipline for linux
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * -----------------------------------------------------------
 | 
					 * -----------------------------------------------------------
 | 
				
			||||||
| 
						 | 
					@ -5,9 +6,6 @@
 | 
				
			||||||
 * Philips Automation Projects
 | 
					 * Philips Automation Projects
 | 
				
			||||||
 * Kassel (Germany)
 | 
					 * Kassel (Germany)
 | 
				
			||||||
 * -----------------------------------------------------------
 | 
					 * -----------------------------------------------------------
 | 
				
			||||||
 * This software may be used and distributed according to the terms of
 | 
					 | 
				
			||||||
 * the GNU General Public License, incorporated herein by reference.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Author:
 | 
					 * Author:
 | 
				
			||||||
 * L. Haag
 | 
					 * L. Haag
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  n_tracerouter.c - Trace data router through tty space
 | 
					 *  n_tracerouter.c - Trace data router through tty space
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,17 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *  it under the terms of the GNU General Public License version 2
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *  GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This trace router uses the Linux line discipline framework to route
 | 
					 * This trace router uses the Linux line discipline framework to route
 | 
				
			||||||
 * trace data coming from a HW Modem to a PTI (Parallel Trace Module) port.
 | 
					 * trace data coming from a HW Modem to a PTI (Parallel Trace Module) port.
 | 
				
			||||||
 * The solution is not specific to a HW modem and this line disciple can
 | 
					 * The solution is not specific to a HW modem and this line disciple can
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  n_tracesink.c - Trace data router and sink path through tty space.
 | 
					 *  n_tracesink.c - Trace data router and sink path through tty space.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,17 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *  it under the terms of the GNU General Public License version 2
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *  GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The trace sink uses the Linux line discipline framework to receive
 | 
					 * The trace sink uses the Linux line discipline framework to receive
 | 
				
			||||||
 * trace data coming from the PTI source line discipline driver
 | 
					 * trace data coming from the PTI source line discipline driver
 | 
				
			||||||
 * to a user-desired tty port, like USB.
 | 
					 * to a user-desired tty port, like USB.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  n_tracesink.h - Kernel driver API to route trace data in kernel space.
 | 
					 *  n_tracesink.h - Kernel driver API to route trace data in kernel space.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,17 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *  it under the terms of the GNU General Public License version 2
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *  GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The PTI (Parallel Trace Interface) driver directs trace data routed from
 | 
					 * The PTI (Parallel Trace Interface) driver directs trace data routed from
 | 
				
			||||||
 * various parts in the system out through the Intel Penwell PTI port and
 | 
					 * various parts in the system out through the Intel Penwell PTI port and
 | 
				
			||||||
 * out of the mobile device for analysis with a debugging tool
 | 
					 * out of the mobile device for analysis with a debugging tool
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-1.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * n_tty.c --- implements the N_TTY line discipline.
 | 
					 * n_tty.c --- implements the N_TTY line discipline.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -15,9 +16,6 @@
 | 
				
			||||||
 * This file also contains code originally written by Linus Torvalds,
 | 
					 * This file also contains code originally written by Linus Torvalds,
 | 
				
			||||||
 * Copyright 1991, 1992, 1993, and by Julian Cowley, Copyright 1994.
 | 
					 * Copyright 1991, 1992, 1993, and by Julian Cowley, Copyright 1994.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This file may be redistributed under the terms of the GNU General Public
 | 
					 | 
				
			||||||
 * License.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Reduced memory usage for older ARM systems  - Russell King.
 | 
					 * Reduced memory usage for older ARM systems  - Russell King.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * 2000/01/20   Fixed SMP locking on put_tty_queue using bits of
 | 
					 * 2000/01/20   Fixed SMP locking on put_tty_queue using bits of
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * nozomi.c  -- HSDPA driver Broadband Wireless Data Card - Globe Trotter
 | 
					 * nozomi.c  -- HSDPA driver Broadband Wireless Data Card - Globe Trotter
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -21,20 +22,6 @@
 | 
				
			||||||
 * Copyright (c) 2006 Option Wireless n/v
 | 
					 * Copyright (c) 2006 Option Wireless n/v
 | 
				
			||||||
 * All rights Reserved.
 | 
					 * All rights Reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * --------------------------------------------------------------------------
 | 
					 * --------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,23 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * RocketPort device driver for Linux
 | 
					 * RocketPort device driver for Linux
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Written by Theodore Ts'o, 1995, 1996, 1997, 1998, 1999, 2000.
 | 
					 * Written by Theodore Ts'o, 1995, 1996, 1997, 1998, 1999, 2000.
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003 by Comtrol, Inc.
 | 
					 * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003 by Comtrol, Inc.
 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or
 | 
					 | 
				
			||||||
 * modify it under the terms of the GNU General Public License as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation; either version 2 of the
 | 
					 | 
				
			||||||
 * License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful, but
 | 
					 | 
				
			||||||
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
					 | 
				
			||||||
 * General Public License for more details.
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,11 +6,19 @@ menuconfig SERIAL_DEV_BUS
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Core support for devices connected via a serial port.
 | 
						  Core support for devices connected via a serial port.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  Note that you typically also want to enable TTY port controller support.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if SERIAL_DEV_BUS
 | 
					if SERIAL_DEV_BUS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config SERIAL_DEV_CTRL_TTYPORT
 | 
					config SERIAL_DEV_CTRL_TTYPORT
 | 
				
			||||||
	bool "Serial device TTY port controller"
 | 
						bool "Serial device TTY port controller"
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  Say Y here if you want to use the Serial device bus with common TTY
 | 
				
			||||||
 | 
						  drivers (e.g. serial drivers).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  If unsure, say Y.
 | 
				
			||||||
	depends on TTY
 | 
						depends on TTY
 | 
				
			||||||
	depends on SERIAL_DEV_BUS != m
 | 
						depends on SERIAL_DEV_BUS != m
 | 
				
			||||||
 | 
						default y
 | 
				
			||||||
 | 
					
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,19 +1,12 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2016-2017 Linaro Ltd., Rob Herring <robh@kernel.org>
 | 
					 * Copyright (C) 2016-2017 Linaro Ltd., Rob Herring <robh@kernel.org>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Based on drivers/spmi/spmi.c:
 | 
					 * Based on drivers/spmi/spmi.c:
 | 
				
			||||||
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 | 
					 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 and
 | 
					 | 
				
			||||||
 * only version 2 as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/acpi.h>
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
#include <linux/idr.h>
 | 
					#include <linux/idr.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
| 
						 | 
					@ -49,13 +42,22 @@ static const struct device_type serdev_ctrl_type = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int serdev_device_match(struct device *dev, struct device_driver *drv)
 | 
					static int serdev_device_match(struct device *dev, struct device_driver *drv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* TODO: ACPI and platform matching */
 | 
						/* TODO: platform matching */
 | 
				
			||||||
 | 
						if (acpi_driver_match_device(dev, drv))
 | 
				
			||||||
 | 
							return 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return of_driver_match_device(dev, drv);
 | 
						return of_driver_match_device(dev, drv);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int serdev_uevent(struct device *dev, struct kobj_uevent_env *env)
 | 
					static int serdev_uevent(struct device *dev, struct kobj_uevent_env *env)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* TODO: ACPI and platform modalias */
 | 
						int rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* TODO: platform modalias */
 | 
				
			||||||
 | 
						rc = acpi_device_uevent_modalias(dev, env);
 | 
				
			||||||
 | 
						if (rc != -ENODEV)
 | 
				
			||||||
 | 
							return rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return of_device_uevent_modalias(dev, env);
 | 
						return of_device_uevent_modalias(dev, env);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,21 +67,32 @@ static int serdev_uevent(struct device *dev, struct kobj_uevent_env *env)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int serdev_device_add(struct serdev_device *serdev)
 | 
					int serdev_device_add(struct serdev_device *serdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct serdev_controller *ctrl = serdev->ctrl;
 | 
				
			||||||
	struct device *parent = serdev->dev.parent;
 | 
						struct device *parent = serdev->dev.parent;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_set_name(&serdev->dev, "%s-%d", dev_name(parent), serdev->nr);
 | 
						dev_set_name(&serdev->dev, "%s-%d", dev_name(parent), serdev->nr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Only a single slave device is currently supported. */
 | 
				
			||||||
 | 
						if (ctrl->serdev) {
 | 
				
			||||||
 | 
							dev_err(&serdev->dev, "controller busy\n");
 | 
				
			||||||
 | 
							return -EBUSY;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						ctrl->serdev = serdev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = device_add(&serdev->dev);
 | 
						err = device_add(&serdev->dev);
 | 
				
			||||||
	if (err < 0) {
 | 
						if (err < 0) {
 | 
				
			||||||
		dev_err(&serdev->dev, "Can't add %s, status %d\n",
 | 
							dev_err(&serdev->dev, "Can't add %s, status %d\n",
 | 
				
			||||||
			dev_name(&serdev->dev), err);
 | 
								dev_name(&serdev->dev), err);
 | 
				
			||||||
		goto err_device_add;
 | 
							goto err_clear_serdev;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_dbg(&serdev->dev, "device %s registered\n", dev_name(&serdev->dev));
 | 
						dev_dbg(&serdev->dev, "device %s registered\n", dev_name(&serdev->dev));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
err_device_add:
 | 
						return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					err_clear_serdev:
 | 
				
			||||||
 | 
						ctrl->serdev = NULL;
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL_GPL(serdev_device_add);
 | 
					EXPORT_SYMBOL_GPL(serdev_device_add);
 | 
				
			||||||
| 
						 | 
					@ -90,7 +103,10 @@ EXPORT_SYMBOL_GPL(serdev_device_add);
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void serdev_device_remove(struct serdev_device *serdev)
 | 
					void serdev_device_remove(struct serdev_device *serdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct serdev_controller *ctrl = serdev->ctrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	device_unregister(&serdev->dev);
 | 
						device_unregister(&serdev->dev);
 | 
				
			||||||
 | 
						ctrl->serdev = NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL_GPL(serdev_device_remove);
 | 
					EXPORT_SYMBOL_GPL(serdev_device_remove);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -260,6 +276,12 @@ static int serdev_drv_remove(struct device *dev)
 | 
				
			||||||
static ssize_t modalias_show(struct device *dev,
 | 
					static ssize_t modalias_show(struct device *dev,
 | 
				
			||||||
			     struct device_attribute *attr, char *buf)
 | 
								     struct device_attribute *attr, char *buf)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						int len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
 | 
				
			||||||
 | 
						if (len != -ENODEV)
 | 
				
			||||||
 | 
							return len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return of_device_modalias(dev, buf, PAGE_SIZE);
 | 
						return of_device_modalias(dev, buf, PAGE_SIZE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
DEVICE_ATTR_RO(modalias);
 | 
					DEVICE_ATTR_RO(modalias);
 | 
				
			||||||
| 
						 | 
					@ -295,7 +317,6 @@ struct serdev_device *serdev_device_alloc(struct serdev_controller *ctrl)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	serdev->ctrl = ctrl;
 | 
						serdev->ctrl = ctrl;
 | 
				
			||||||
	ctrl->serdev = serdev;
 | 
					 | 
				
			||||||
	device_initialize(&serdev->dev);
 | 
						device_initialize(&serdev->dev);
 | 
				
			||||||
	serdev->dev.parent = &ctrl->dev;
 | 
						serdev->dev.parent = &ctrl->dev;
 | 
				
			||||||
	serdev->dev.bus = &serdev_bus_type;
 | 
						serdev->dev.bus = &serdev_bus_type;
 | 
				
			||||||
| 
						 | 
					@ -329,6 +350,15 @@ struct serdev_controller *serdev_controller_alloc(struct device *parent,
 | 
				
			||||||
	if (!ctrl)
 | 
						if (!ctrl)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL);
 | 
				
			||||||
 | 
						if (id < 0) {
 | 
				
			||||||
 | 
							dev_err(parent,
 | 
				
			||||||
 | 
								"unable to allocate serdev controller identifier.\n");
 | 
				
			||||||
 | 
							goto err_free;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ctrl->nr = id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	device_initialize(&ctrl->dev);
 | 
						device_initialize(&ctrl->dev);
 | 
				
			||||||
	ctrl->dev.type = &serdev_ctrl_type;
 | 
						ctrl->dev.type = &serdev_ctrl_type;
 | 
				
			||||||
	ctrl->dev.bus = &serdev_bus_type;
 | 
						ctrl->dev.bus = &serdev_bus_type;
 | 
				
			||||||
| 
						 | 
					@ -336,19 +366,15 @@ struct serdev_controller *serdev_controller_alloc(struct device *parent,
 | 
				
			||||||
	ctrl->dev.of_node = parent->of_node;
 | 
						ctrl->dev.of_node = parent->of_node;
 | 
				
			||||||
	serdev_controller_set_drvdata(ctrl, &ctrl[1]);
 | 
						serdev_controller_set_drvdata(ctrl, &ctrl[1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL);
 | 
					 | 
				
			||||||
	if (id < 0) {
 | 
					 | 
				
			||||||
		dev_err(parent,
 | 
					 | 
				
			||||||
			"unable to allocate serdev controller identifier.\n");
 | 
					 | 
				
			||||||
		serdev_controller_put(ctrl);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ctrl->nr = id;
 | 
					 | 
				
			||||||
	dev_set_name(&ctrl->dev, "serial%d", id);
 | 
						dev_set_name(&ctrl->dev, "serial%d", id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_dbg(&ctrl->dev, "allocated controller 0x%p id %d\n", ctrl, id);
 | 
						dev_dbg(&ctrl->dev, "allocated controller 0x%p id %d\n", ctrl, id);
 | 
				
			||||||
	return ctrl;
 | 
						return ctrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					err_free:
 | 
				
			||||||
 | 
						kfree(ctrl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL_GPL(serdev_controller_alloc);
 | 
					EXPORT_SYMBOL_GPL(serdev_controller_alloc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -385,6 +411,75 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef CONFIG_ACPI
 | 
				
			||||||
 | 
					static acpi_status acpi_serdev_register_device(struct serdev_controller *ctrl,
 | 
				
			||||||
 | 
										    struct acpi_device *adev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct serdev_device *serdev = NULL;
 | 
				
			||||||
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (acpi_bus_get_status(adev) || !adev->status.present ||
 | 
				
			||||||
 | 
						    acpi_device_enumerated(adev))
 | 
				
			||||||
 | 
							return AE_OK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						serdev = serdev_device_alloc(ctrl);
 | 
				
			||||||
 | 
						if (!serdev) {
 | 
				
			||||||
 | 
							dev_err(&ctrl->dev, "failed to allocate serdev device for %s\n",
 | 
				
			||||||
 | 
								dev_name(&adev->dev));
 | 
				
			||||||
 | 
							return AE_NO_MEMORY;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ACPI_COMPANION_SET(&serdev->dev, adev);
 | 
				
			||||||
 | 
						acpi_device_set_enumerated(adev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err = serdev_device_add(serdev);
 | 
				
			||||||
 | 
						if (err) {
 | 
				
			||||||
 | 
							dev_err(&serdev->dev,
 | 
				
			||||||
 | 
								"failure adding ACPI serdev device. status %d\n", err);
 | 
				
			||||||
 | 
							serdev_device_put(serdev);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return AE_OK;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static acpi_status acpi_serdev_add_device(acpi_handle handle, u32 level,
 | 
				
			||||||
 | 
									       void *data, void **return_value)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct serdev_controller *ctrl = data;
 | 
				
			||||||
 | 
						struct acpi_device *adev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (acpi_bus_get_device(handle, &adev))
 | 
				
			||||||
 | 
							return AE_OK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return acpi_serdev_register_device(ctrl, adev);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int acpi_serdev_register_devices(struct serdev_controller *ctrl)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						acpi_status status;
 | 
				
			||||||
 | 
						acpi_handle handle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						handle = ACPI_HANDLE(ctrl->dev.parent);
 | 
				
			||||||
 | 
						if (!handle)
 | 
				
			||||||
 | 
							return -ENODEV;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1,
 | 
				
			||||||
 | 
									     acpi_serdev_add_device, NULL, ctrl, NULL);
 | 
				
			||||||
 | 
						if (ACPI_FAILURE(status))
 | 
				
			||||||
 | 
							dev_dbg(&ctrl->dev, "failed to enumerate serdev slaves\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!ctrl->serdev)
 | 
				
			||||||
 | 
							return -ENODEV;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static inline int acpi_serdev_register_devices(struct serdev_controller *ctrl)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return -ENODEV;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif /* CONFIG_ACPI */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * serdev_controller_add() - Add an serdev controller
 | 
					 * serdev_controller_add() - Add an serdev controller
 | 
				
			||||||
 * @ctrl:	controller to be registered.
 | 
					 * @ctrl:	controller to be registered.
 | 
				
			||||||
| 
						 | 
					@ -394,7 +489,7 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int serdev_controller_add(struct serdev_controller *ctrl)
 | 
					int serdev_controller_add(struct serdev_controller *ctrl)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int ret;
 | 
						int ret_of, ret_acpi, ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Can't register until after driver model init */
 | 
						/* Can't register until after driver model init */
 | 
				
			||||||
	if (WARN_ON(!is_registered))
 | 
						if (WARN_ON(!is_registered))
 | 
				
			||||||
| 
						 | 
					@ -404,9 +499,14 @@ int serdev_controller_add(struct serdev_controller *ctrl)
 | 
				
			||||||
	if (ret)
 | 
						if (ret)
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = of_serdev_register_devices(ctrl);
 | 
						ret_of = of_serdev_register_devices(ctrl);
 | 
				
			||||||
	if (ret)
 | 
						ret_acpi = acpi_serdev_register_devices(ctrl);
 | 
				
			||||||
 | 
						if (ret_of && ret_acpi) {
 | 
				
			||||||
 | 
							dev_dbg(&ctrl->dev, "no devices registered: of:%d acpi:%d\n",
 | 
				
			||||||
 | 
								ret_of, ret_acpi);
 | 
				
			||||||
 | 
							ret = -ENODEV;
 | 
				
			||||||
		goto out_dev_del;
 | 
							goto out_dev_del;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n",
 | 
						dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n",
 | 
				
			||||||
		ctrl->nr, &ctrl->dev);
 | 
							ctrl->nr, &ctrl->dev);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,6 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2016-2017 Linaro Ltd., Rob Herring <robh@kernel.org>
 | 
					 * Copyright (C) 2016-2017 Linaro Ltd., Rob Herring <robh@kernel.org>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 and
 | 
					 | 
				
			||||||
 * only version 2 as published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/serdev.h>
 | 
					#include <linux/serdev.h>
 | 
				
			||||||
| 
						 | 
					@ -96,16 +88,21 @@ static int ttyport_open(struct serdev_controller *ctrl)
 | 
				
			||||||
	struct serport *serport = serdev_controller_get_drvdata(ctrl);
 | 
						struct serport *serport = serdev_controller_get_drvdata(ctrl);
 | 
				
			||||||
	struct tty_struct *tty;
 | 
						struct tty_struct *tty;
 | 
				
			||||||
	struct ktermios ktermios;
 | 
						struct ktermios ktermios;
 | 
				
			||||||
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tty = tty_init_dev(serport->tty_drv, serport->tty_idx);
 | 
						tty = tty_init_dev(serport->tty_drv, serport->tty_idx);
 | 
				
			||||||
	if (IS_ERR(tty))
 | 
						if (IS_ERR(tty))
 | 
				
			||||||
		return PTR_ERR(tty);
 | 
							return PTR_ERR(tty);
 | 
				
			||||||
	serport->tty = tty;
 | 
						serport->tty = tty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tty->ops->open)
 | 
						if (!tty->ops->open || !tty->ops->close) {
 | 
				
			||||||
		tty->ops->open(serport->tty, NULL);
 | 
							ret = -ENODEV;
 | 
				
			||||||
	else
 | 
							goto err_unlock;
 | 
				
			||||||
		tty_port_open(serport->port, tty, NULL);
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ret = tty->ops->open(serport->tty, NULL);
 | 
				
			||||||
 | 
						if (ret)
 | 
				
			||||||
 | 
							goto err_close;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Bring the UART into a known 8 bits no parity hw fc state */
 | 
						/* Bring the UART into a known 8 bits no parity hw fc state */
 | 
				
			||||||
	ktermios = tty->termios;
 | 
						ktermios = tty->termios;
 | 
				
			||||||
| 
						 | 
					@ -122,6 +119,14 @@ static int ttyport_open(struct serdev_controller *ctrl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tty_unlock(serport->tty);
 | 
						tty_unlock(serport->tty);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					err_close:
 | 
				
			||||||
 | 
						tty->ops->close(tty, NULL);
 | 
				
			||||||
 | 
					err_unlock:
 | 
				
			||||||
 | 
						tty_unlock(tty);
 | 
				
			||||||
 | 
						tty_release_struct(tty, serport->tty_idx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void ttyport_close(struct serdev_controller *ctrl)
 | 
					static void ttyport_close(struct serdev_controller *ctrl)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Driver for the serial port on the 21285 StrongArm-110 core logic chip.
 | 
					 * Driver for the serial port on the 21285 StrongArm-110 core logic chip.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for 8250/16550-type serial ports
 | 
					 *  Driver for 8250/16550-type serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
					 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2001 Russell King.
 | 
					 *  Copyright (C) 2001 Russell King.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,7 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (C) 2005 Russell King.
 | 
					 *  Copyright (C) 2005 Russell King.
 | 
				
			||||||
 *  Data taken from include/asm-i386/serial.h
 | 
					 *  Data taken from include/asm-i386/serial.h
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  linux/drivers/serial/acorn.c
 | 
					 *  linux/drivers/serial/acorn.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 1996-2003 Russell King.
 | 
					 *  Copyright (C) 1996-2003 Russell King.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Serial Port driver for Aspeed VUART device
 | 
					 *  Serial Port driver for Aspeed VUART device
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *    Copyright (C) 2016 Jeremy Kerr <jk@ozlabs.org>, IBM Corp.
 | 
					 *    Copyright (C) 2016 Jeremy Kerr <jk@ozlabs.org>, IBM Corp.
 | 
				
			||||||
 *    Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, IBM Corp.
 | 
					 *    Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, IBM Corp.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or
 | 
					 | 
				
			||||||
 *  modify it under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation; either version
 | 
					 | 
				
			||||||
 *  2 of the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/device.h>
 | 
					#include <linux/device.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Serial port driver for BCM2835AUX UART
 | 
					 * Serial port driver for BCM2835AUX UART
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,11 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Based on 8250_lpc18xx.c:
 | 
					 * Based on 8250_lpc18xx.c:
 | 
				
			||||||
 * Copyright (C) 2015 Joachim Eastwood <manabian@gmail.com>
 | 
					 * Copyright (C) 2015 Joachim Eastwood <manabian@gmail.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,7 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (C) 2005 Russell King.
 | 
					 *  Copyright (C) 2005 Russell King.
 | 
				
			||||||
 *  Data taken from include/asm-i386/serial.h
 | 
					 *  Data taken from include/asm-i386/serial.h
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Universal/legacy driver for 8250/16550-type serial ports
 | 
					 *  Universal/legacy driver for 8250/16550-type serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -11,11 +12,6 @@
 | 
				
			||||||
 *	      userspace-configurable "phantom" ports
 | 
					 *	      userspace-configurable "phantom" ports
 | 
				
			||||||
 *	      "serial8250" platform devices
 | 
					 *	      "serial8250" platform devices
 | 
				
			||||||
 *	      serial8250_register_8250_port() ports
 | 
					 *	      serial8250_register_8250_port() ports
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -262,17 +258,17 @@ static void serial_unlink_irq_chain(struct uart_8250_port *up)
 | 
				
			||||||
 * barely passable results for a 16550A.  (Although at the expense
 | 
					 * barely passable results for a 16550A.  (Although at the expense
 | 
				
			||||||
 * of much CPU overhead).
 | 
					 * of much CPU overhead).
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void serial8250_timeout(unsigned long data)
 | 
					static void serial8250_timeout(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct uart_8250_port *up = (struct uart_8250_port *)data;
 | 
						struct uart_8250_port *up = from_timer(up, t, timer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	up->port.handle_irq(&up->port);
 | 
						up->port.handle_irq(&up->port);
 | 
				
			||||||
	mod_timer(&up->timer, jiffies + uart_poll_timeout(&up->port));
 | 
						mod_timer(&up->timer, jiffies + uart_poll_timeout(&up->port));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void serial8250_backup_timeout(unsigned long data)
 | 
					static void serial8250_backup_timeout(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct uart_8250_port *up = (struct uart_8250_port *)data;
 | 
						struct uart_8250_port *up = from_timer(up, t, timer);
 | 
				
			||||||
	unsigned int iir, ier = 0, lsr;
 | 
						unsigned int iir, ier = 0, lsr;
 | 
				
			||||||
	unsigned long flags;
 | 
						unsigned long flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -329,8 +325,7 @@ static int univ8250_setup_irq(struct uart_8250_port *up)
 | 
				
			||||||
	if (up->bugs & UART_BUG_THRE) {
 | 
						if (up->bugs & UART_BUG_THRE) {
 | 
				
			||||||
		pr_debug("ttyS%d - using backup timer\n", serial_index(port));
 | 
							pr_debug("ttyS%d - using backup timer\n", serial_index(port));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		up->timer.function = serial8250_backup_timeout;
 | 
							up->timer.function = (TIMER_FUNC_TYPE)serial8250_backup_timeout;
 | 
				
			||||||
		up->timer.data = (unsigned long)up;
 | 
					 | 
				
			||||||
		mod_timer(&up->timer, jiffies +
 | 
							mod_timer(&up->timer, jiffies +
 | 
				
			||||||
			  uart_poll_timeout(port) + HZ / 5);
 | 
								  uart_poll_timeout(port) + HZ / 5);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -341,7 +336,6 @@ static int univ8250_setup_irq(struct uart_8250_port *up)
 | 
				
			||||||
	 * driver used to do this with IRQ0.
 | 
						 * driver used to do this with IRQ0.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (!port->irq) {
 | 
						if (!port->irq) {
 | 
				
			||||||
		up->timer.data = (unsigned long)up;
 | 
					 | 
				
			||||||
		mod_timer(&up->timer, jiffies + uart_poll_timeout(port));
 | 
							mod_timer(&up->timer, jiffies + uart_poll_timeout(port));
 | 
				
			||||||
	} else
 | 
						} else
 | 
				
			||||||
		retval = serial_link_irq_chain(up);
 | 
							retval = serial_link_irq_chain(up);
 | 
				
			||||||
| 
						 | 
					@ -354,7 +348,7 @@ static void univ8250_release_irq(struct uart_8250_port *up)
 | 
				
			||||||
	struct uart_port *port = &up->port;
 | 
						struct uart_port *port = &up->port;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	del_timer_sync(&up->timer);
 | 
						del_timer_sync(&up->timer);
 | 
				
			||||||
	up->timer.function = serial8250_timeout;
 | 
						up->timer.function = (TIMER_FUNC_TYPE)serial8250_timeout;
 | 
				
			||||||
	if (port->irq)
 | 
						if (port->irq)
 | 
				
			||||||
		serial_unlink_irq_chain(up);
 | 
							serial_unlink_irq_chain(up);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -525,8 +519,7 @@ static void __init serial8250_isa_init_ports(void)
 | 
				
			||||||
			base_ops = port->ops;
 | 
								base_ops = port->ops;
 | 
				
			||||||
		port->ops = &univ8250_port_ops;
 | 
							port->ops = &univ8250_port_ops;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		init_timer(&up->timer);
 | 
							timer_setup(&up->timer, serial8250_timeout, 0);
 | 
				
			||||||
		up->timer.function = serial8250_timeout;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		up->ops = &univ8250_driver_ops;
 | 
							up->ops = &univ8250_driver_ops;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 8250_dma.c - DMA Engine API support for 8250.c
 | 
					 * 8250_dma.c - DMA Engine API support for 8250.c
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2013 Intel Corporation
 | 
					 * Copyright (C) 2013 Intel Corporation
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/tty.h>
 | 
					#include <linux/tty.h>
 | 
				
			||||||
#include <linux/tty_flip.h>
 | 
					#include <linux/tty_flip.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Synopsys DesignWare 8250 driver.
 | 
					 * Synopsys DesignWare 8250 driver.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2011 Picochip, Jamie Iles.
 | 
					 * Copyright 2011 Picochip, Jamie Iles.
 | 
				
			||||||
 * Copyright 2013 Intel Corporation
 | 
					 * Copyright 2013 Intel Corporation
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * The Synopsys DesignWare 8250 has an extra feature whereby it detects if the
 | 
					 * The Synopsys DesignWare 8250 has an extra feature whereby it detects if the
 | 
				
			||||||
 * LCR is written whilst busy.  If it is, then a busy detect interrupt is
 | 
					 * LCR is written whilst busy.  If it is, then a busy detect interrupt is
 | 
				
			||||||
 * raised, the LCR needs to be rewritten and the uart status register read.
 | 
					 * raised, the LCR needs to be rewritten and the uart status register read.
 | 
				
			||||||
| 
						 | 
					@ -256,25 +252,31 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
 | 
				
			||||||
			       struct ktermios *old)
 | 
								       struct ktermios *old)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned int baud = tty_termios_baud_rate(termios);
 | 
						unsigned int baud = tty_termios_baud_rate(termios);
 | 
				
			||||||
 | 
						unsigned int target_rate, min_rate, max_rate;
 | 
				
			||||||
	struct dw8250_data *d = p->private_data;
 | 
						struct dw8250_data *d = p->private_data;
 | 
				
			||||||
	long rate;
 | 
						long rate;
 | 
				
			||||||
	int ret;
 | 
						int i, ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (IS_ERR(d->clk) || !old)
 | 
						if (IS_ERR(d->clk) || !old)
 | 
				
			||||||
		goto out;
 | 
							goto out;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	clk_disable_unprepare(d->clk);
 | 
						/* Find a clk rate within +/-1.6% of an integer multiple of baudx16 */
 | 
				
			||||||
	rate = clk_round_rate(d->clk, baud * 16);
 | 
						target_rate = baud * 16;
 | 
				
			||||||
	if (rate < 0)
 | 
						min_rate = target_rate - (target_rate >> 6);
 | 
				
			||||||
		ret = rate;
 | 
						max_rate = target_rate + (target_rate >> 6);
 | 
				
			||||||
	else if (rate == 0)
 | 
					 | 
				
			||||||
		ret = -ENOENT;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		ret = clk_set_rate(d->clk, rate);
 | 
					 | 
				
			||||||
	clk_prepare_enable(d->clk);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!ret)
 | 
						for (i = 1; i <= UART_DIV_MAX; i++) {
 | 
				
			||||||
		p->uartclk = rate;
 | 
							rate = clk_round_rate(d->clk, i * target_rate);
 | 
				
			||||||
 | 
							if (rate >= i * min_rate && rate <= i * max_rate)
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (i <= UART_DIV_MAX) {
 | 
				
			||||||
 | 
							clk_disable_unprepare(d->clk);
 | 
				
			||||||
 | 
							ret = clk_set_rate(d->clk, rate);
 | 
				
			||||||
 | 
							clk_prepare_enable(d->clk);
 | 
				
			||||||
 | 
							if (!ret)
 | 
				
			||||||
 | 
								p->uartclk = rate;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
out:
 | 
					out:
 | 
				
			||||||
	p->status &= ~UPSTAT_AUTOCTS;
 | 
						p->status &= ~UPSTAT_AUTOCTS;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Early serial console for 8250/16550 devices
 | 
					 * Early serial console for 8250/16550 devices
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * (c) Copyright 2004 Hewlett-Packard Development Company, L.P.
 | 
					 * (c) Copyright 2004 Hewlett-Packard Development Company, L.P.
 | 
				
			||||||
 *	Bjorn Helgaas <bjorn.helgaas@hp.com>
 | 
					 *	Bjorn Helgaas <bjorn.helgaas@hp.com>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Based on the 8250.c serial driver, Copyright (C) 2001 Russell King,
 | 
					 * Based on the 8250.c serial driver, Copyright (C) 2001 Russell King,
 | 
				
			||||||
 * and on early_printk.c by Andi Kleen.
 | 
					 * and on early_printk.c by Andi Kleen.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,20 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Renesas Emma Mobile 8250 driver
 | 
					 * Renesas Emma Mobile 8250 driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2012 Magnus Damm
 | 
					 *  Copyright (C) 2012 Magnus Damm
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/device.h>
 | 
					#include <linux/device.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Probe module for 8250/16550-type Exar chips PCI serial ports.
 | 
					 *  Probe module for 8250/16550-type Exar chips PCI serial ports.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/tty/serial/8250/8250_pci.c,
 | 
					 *  Based on drivers/tty/serial/8250/8250_pci.c,
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2017 Sudip Mukherjee, All Rights Reserved.
 | 
					 *  Copyright (C) 2017 Sudip Mukherjee, All Rights Reserved.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/acpi.h>
 | 
					#include <linux/acpi.h>
 | 
				
			||||||
#include <linux/dmi.h>
 | 
					#include <linux/dmi.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Written by Paul B Schroeder < pschroeder "at" uplogix "dot" com >
 | 
					 *  Written by Paul B Schroeder < pschroeder "at" uplogix "dot" com >
 | 
				
			||||||
 *  Based on 8250_boca.
 | 
					 *  Based on 8250_boca.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2005 Russell King.
 | 
					 *  Copyright (C) 2005 Russell King.
 | 
				
			||||||
 *  Data taken from include/asm-i386/serial.h
 | 
					 *  Data taken from include/asm-i386/serial.h
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Probe for F81216A LPC to 4 UART
 | 
					 *  Probe for F81216A LPC to 4 UART
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2014-2016 Ricardo Ribalda, Qtechnology A/S
 | 
					 *  Copyright (C) 2014-2016 Ricardo Ribalda, Qtechnology A/S
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/pci.h>
 | 
					#include <linux/pci.h>
 | 
				
			||||||
| 
						 | 
					@ -40,6 +36,16 @@
 | 
				
			||||||
#define IRQ_LEVEL_LOW	0
 | 
					#define IRQ_LEVEL_LOW	0
 | 
				
			||||||
#define IRQ_EDGE_HIGH	BIT(5)
 | 
					#define IRQ_EDGE_HIGH	BIT(5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * F81216H clock source register, the value and mask is the same with F81866,
 | 
				
			||||||
 | 
					 * but it's on F0h.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Clock speeds for UART (register F0h)
 | 
				
			||||||
 | 
					 * 00: 1.8432MHz.
 | 
				
			||||||
 | 
					 * 01: 18.432MHz.
 | 
				
			||||||
 | 
					 * 10: 24MHz.
 | 
				
			||||||
 | 
					 * 11: 14.769MHz.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
#define RS485  0xF0
 | 
					#define RS485  0xF0
 | 
				
			||||||
#define RTS_INVERT BIT(5)
 | 
					#define RTS_INVERT BIT(5)
 | 
				
			||||||
#define RS485_URA BIT(4)
 | 
					#define RS485_URA BIT(4)
 | 
				
			||||||
| 
						 | 
					@ -118,6 +124,9 @@ static int fintek_8250_enter_key(u16 base_port, u8 key)
 | 
				
			||||||
	if (!request_muxed_region(base_port, 2, "8250_fintek"))
 | 
						if (!request_muxed_region(base_port, 2, "8250_fintek"))
 | 
				
			||||||
		return -EBUSY;
 | 
							return -EBUSY;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Force to deactive all SuperIO in this base_port */
 | 
				
			||||||
 | 
						outb(EXIT_KEY, base_port + ADDR_PORT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	outb(key, base_port + ADDR_PORT);
 | 
						outb(key, base_port + ADDR_PORT);
 | 
				
			||||||
	outb(key, base_port + ADDR_PORT);
 | 
						outb(key, base_port + ADDR_PORT);
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					@ -188,14 +197,27 @@ static int fintek_8250_rs485_config(struct uart_port *port,
 | 
				
			||||||
	if (!pdata)
 | 
						if (!pdata)
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (rs485->flags & SER_RS485_ENABLED)
 | 
						/* Hardware do not support same RTS level on send and receive */
 | 
				
			||||||
 | 
						if (!(rs485->flags & SER_RS485_RTS_ON_SEND) ==
 | 
				
			||||||
 | 
								!(rs485->flags & SER_RS485_RTS_AFTER_SEND))
 | 
				
			||||||
 | 
							return -EINVAL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (rs485->flags & SER_RS485_ENABLED) {
 | 
				
			||||||
		memset(rs485->padding, 0, sizeof(rs485->padding));
 | 
							memset(rs485->padding, 0, sizeof(rs485->padding));
 | 
				
			||||||
	else
 | 
							config |= RS485_URA;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
		memset(rs485, 0, sizeof(*rs485));
 | 
							memset(rs485, 0, sizeof(*rs485));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
 | 
						rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
 | 
				
			||||||
			SER_RS485_RTS_AFTER_SEND;
 | 
								SER_RS485_RTS_AFTER_SEND;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Only the first port supports delays */
 | 
				
			||||||
 | 
						if (pdata->index) {
 | 
				
			||||||
 | 
							rs485->delay_rts_before_send = 0;
 | 
				
			||||||
 | 
							rs485->delay_rts_after_send = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (rs485->delay_rts_before_send) {
 | 
						if (rs485->delay_rts_before_send) {
 | 
				
			||||||
		rs485->delay_rts_before_send = 1;
 | 
							rs485->delay_rts_before_send = 1;
 | 
				
			||||||
		config |= TXW4C_IRA;
 | 
							config |= TXW4C_IRA;
 | 
				
			||||||
| 
						 | 
					@ -206,12 +228,6 @@ static int fintek_8250_rs485_config(struct uart_port *port,
 | 
				
			||||||
		config |= RXW4C_IRA;
 | 
							config |= RXW4C_IRA;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((!!(rs485->flags & SER_RS485_RTS_ON_SEND)) ==
 | 
					 | 
				
			||||||
			(!!(rs485->flags & SER_RS485_RTS_AFTER_SEND)))
 | 
					 | 
				
			||||||
		rs485->flags &= SER_RS485_ENABLED;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		config |= RS485_URA;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (rs485->flags & SER_RS485_RTS_ON_SEND)
 | 
						if (rs485->flags & SER_RS485_RTS_ON_SEND)
 | 
				
			||||||
		config |= RTS_INVERT;
 | 
							config |= RTS_INVERT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -280,13 +296,91 @@ static void fintek_8250_goto_highspeed(struct uart_8250_port *uart,
 | 
				
			||||||
			F81866_UART_CLK_MASK,
 | 
								F81866_UART_CLK_MASK,
 | 
				
			||||||
			F81866_UART_CLK_14_769MHZ);
 | 
								F81866_UART_CLK_14_769MHZ);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			uart->port.uartclk = 921600 * 16;
 | 
							uart->port.uartclk = 921600 * 16;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	default: /* leave clock speed untouched */
 | 
						default: /* leave clock speed untouched */
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void fintek_8250_set_termios(struct uart_port *port, struct ktermios *termios,
 | 
				
			||||||
 | 
								struct ktermios *old)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct fintek_8250 *pdata = port->private_data;
 | 
				
			||||||
 | 
						unsigned int baud = tty_termios_baud_rate(termios);
 | 
				
			||||||
 | 
						int i;
 | 
				
			||||||
 | 
						u8 reg;
 | 
				
			||||||
 | 
						static u32 baudrate_table[] = {115200, 921600, 1152000, 1500000};
 | 
				
			||||||
 | 
						static u8 clock_table[] = { F81866_UART_CLK_1_8432MHZ,
 | 
				
			||||||
 | 
								F81866_UART_CLK_14_769MHZ, F81866_UART_CLK_18_432MHZ,
 | 
				
			||||||
 | 
								F81866_UART_CLK_24MHZ };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * We'll use serial8250_do_set_termios() for baud = 0, otherwise It'll
 | 
				
			||||||
 | 
						 * crash on baudrate_table[i] % baud with "division by zero".
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						if (!baud)
 | 
				
			||||||
 | 
							goto exit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						switch (pdata->pid) {
 | 
				
			||||||
 | 
						case CHIP_ID_F81216H:
 | 
				
			||||||
 | 
							reg = RS485;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						case CHIP_ID_F81866:
 | 
				
			||||||
 | 
							reg = F81866_UART_CLK;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						default:
 | 
				
			||||||
 | 
							/* Don't change clocksource with unknown PID */
 | 
				
			||||||
 | 
							dev_warn(port->dev,
 | 
				
			||||||
 | 
								"%s: pid: %x Not support. use default set_termios.\n",
 | 
				
			||||||
 | 
								__func__, pdata->pid);
 | 
				
			||||||
 | 
							goto exit;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < ARRAY_SIZE(baudrate_table); ++i) {
 | 
				
			||||||
 | 
							if (baud > baudrate_table[i] || baudrate_table[i] % baud != 0)
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (port->uartclk == baudrate_table[i] * 16)
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (fintek_8250_enter_key(pdata->base_port, pdata->key))
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							port->uartclk = baudrate_table[i] * 16;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							sio_write_reg(pdata, LDN, pdata->index);
 | 
				
			||||||
 | 
							sio_write_mask_reg(pdata, reg, F81866_UART_CLK_MASK,
 | 
				
			||||||
 | 
									clock_table[i]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							fintek_8250_exit_key(pdata->base_port);
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (i == ARRAY_SIZE(baudrate_table)) {
 | 
				
			||||||
 | 
							baud = tty_termios_baud_rate(old);
 | 
				
			||||||
 | 
							tty_termios_encode_baud_rate(termios, baud, baud);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit:
 | 
				
			||||||
 | 
						serial8250_do_set_termios(port, termios, old);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void fintek_8250_set_termios_handler(struct uart_8250_port *uart)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct fintek_8250 *pdata = uart->port.private_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						switch (pdata->pid) {
 | 
				
			||||||
 | 
						case CHIP_ID_F81216H:
 | 
				
			||||||
 | 
						case CHIP_ID_F81866:
 | 
				
			||||||
 | 
							uart->port.set_termios = fintek_8250_set_termios;
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						default:
 | 
				
			||||||
 | 
							break;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int probe_setup_port(struct fintek_8250 *pdata,
 | 
					static int probe_setup_port(struct fintek_8250 *pdata,
 | 
				
			||||||
					struct uart_8250_port *uart)
 | 
										struct uart_8250_port *uart)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -373,6 +467,7 @@ int fintek_8250_probe(struct uart_8250_port *uart)
 | 
				
			||||||
	memcpy(pdata, &probe_data, sizeof(probe_data));
 | 
						memcpy(pdata, &probe_data, sizeof(probe_data));
 | 
				
			||||||
	uart->port.private_data = pdata;
 | 
						uart->port.private_data = pdata;
 | 
				
			||||||
	fintek_8250_set_rs485_handler(uart);
 | 
						fintek_8250_set_rs485_handler(uart);
 | 
				
			||||||
 | 
						fintek_8250_set_termios_handler(uart);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,7 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (C) 2005 Russell King.
 | 
					 *  Copyright (C) 2005 Russell King.
 | 
				
			||||||
 *  Data taken from include/asm-i386/serial.h
 | 
					 *  Data taken from include/asm-i386/serial.h
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
#include <linux/serial_reg.h>
 | 
					#include <linux/serial_reg.h>
 | 
				
			||||||
#include <linux/serial_8250.h>
 | 
					#include <linux/serial_8250.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,10 +7,6 @@
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Freescale 16550 UART "driver", Copyright (C) 2011 Paul Gortmaker.
 | 
					 * Freescale 16550 UART "driver", Copyright (C) 2011 Paul Gortmaker.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This isn't a full driver; it just provides an alternate IRQ
 | 
					 * This isn't a full driver; it just provides an alternate IRQ
 | 
				
			||||||
 * handler to deal with an errata.  Everything else is just
 | 
					 * handler to deal with an errata.  Everything else is just
 | 
				
			||||||
 * using the bog standard 8250 support.
 | 
					 * using the bog standard 8250 support.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *	Serial Device Initialisation for Lasi/Asp/Wax/Dino
 | 
					 *	Serial Device Initialisation for Lasi/Asp/Wax/Dino
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	(c) Copyright Matthew Wilcox <willy@debian.org> 2001-2002
 | 
					 *	(c) Copyright Matthew Wilcox <willy@debian.org> 2001-2002
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *	This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *	it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *      the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *      (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Driver for the 98626/98644/internal serial interface on hp300/hp400
 | 
					 * Driver for the 98626/98644/internal serial interface on hp300/hp400
 | 
				
			||||||
 * (based on the National Semiconductor INS8250/NS16550AF/WD16C552 UARTs)
 | 
					 * (based on the National Semiconductor INS8250/NS16550AF/WD16C552 UARTs)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,7 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (C) 2005 Russell King.
 | 
					 *  Copyright (C) 2005 Russell King.
 | 
				
			||||||
 *  Data taken from include/asm-i386/serial.h
 | 
					 *  Data taken from include/asm-i386/serial.h
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2010 Lars-Peter Clausen <lars@metafoo.de>
 | 
					 * Copyright (C) 2010 Lars-Peter Clausen <lars@metafoo.de>
 | 
				
			||||||
 * Copyright (C) 2015 Imagination Technologies
 | 
					 * Copyright (C) 2015 Imagination Technologies
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Ingenic SoC UART support
 | 
					 * Ingenic SoC UART support
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute	 it and/or modify it
 | 
					 | 
				
			||||||
 * under  the terms of	 the GNU General  Public License as published by the
 | 
					 | 
				
			||||||
 * Free Software Foundation;  either version 2 of the	License, or (at your
 | 
					 | 
				
			||||||
 * option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the  GNU General Public License along
 | 
					 | 
				
			||||||
 * with this program; if not, write  to the Free Software Foundation, Inc.,
 | 
					 | 
				
			||||||
 * 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Serial port driver for NXP LPC18xx/43xx UART
 | 
					 * Serial port driver for NXP LPC18xx/43xx UART
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,11 +7,6 @@
 | 
				
			||||||
 * Based on 8250_mtk.c:
 | 
					 * Based on 8250_mtk.c:
 | 
				
			||||||
 * Copyright (c) 2014 MundoReader S.L.
 | 
					 * Copyright (c) 2014 MundoReader S.L.
 | 
				
			||||||
 * Matthias Brugger <matthias.bgg@gmail.com>
 | 
					 * Matthias Brugger <matthias.bgg@gmail.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 8250_lpss.c - Driver for UART on Intel Braswell and various other Intel SoCs
 | 
					 * 8250_lpss.c - Driver for UART on Intel Braswell and various other Intel SoCs
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2016 Intel Corporation
 | 
					 * Copyright (C) 2016 Intel Corporation
 | 
				
			||||||
 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 | 
					 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/bitops.h>
 | 
					#include <linux/bitops.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 8250_mid.c - Driver for UART on Intel Penwell and various other Intel SOCs
 | 
					 * 8250_mid.c - Driver for UART on Intel Penwell and various other Intel SOCs
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2015 Intel Corporation
 | 
					 * Copyright (C) 2015 Intel Corporation
 | 
				
			||||||
 * Author: Heikki Krogerus <heikki.krogerus@linux.intel.com>
 | 
					 * Author: Heikki Krogerus <heikki.krogerus@linux.intel.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/bitops.h>
 | 
					#include <linux/bitops.h>
 | 
				
			||||||
| 
						 | 
					@ -23,10 +20,11 @@
 | 
				
			||||||
#define PCI_DEVICE_ID_INTEL_PNW_UART2	0x081c
 | 
					#define PCI_DEVICE_ID_INTEL_PNW_UART2	0x081c
 | 
				
			||||||
#define PCI_DEVICE_ID_INTEL_PNW_UART3	0x081d
 | 
					#define PCI_DEVICE_ID_INTEL_PNW_UART3	0x081d
 | 
				
			||||||
#define PCI_DEVICE_ID_INTEL_TNG_UART	0x1191
 | 
					#define PCI_DEVICE_ID_INTEL_TNG_UART	0x1191
 | 
				
			||||||
 | 
					#define PCI_DEVICE_ID_INTEL_CDF_UART	0x18d8
 | 
				
			||||||
#define PCI_DEVICE_ID_INTEL_DNV_UART	0x19d8
 | 
					#define PCI_DEVICE_ID_INTEL_DNV_UART	0x19d8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Intel MID Specific registers */
 | 
					/* Intel MID Specific registers */
 | 
				
			||||||
#define INTEL_MID_UART_DNV_FISR		0x08
 | 
					#define INTEL_MID_UART_FISR		0x08
 | 
				
			||||||
#define INTEL_MID_UART_PS		0x30
 | 
					#define INTEL_MID_UART_PS		0x30
 | 
				
			||||||
#define INTEL_MID_UART_MUL		0x34
 | 
					#define INTEL_MID_UART_MUL		0x34
 | 
				
			||||||
#define INTEL_MID_UART_DIV		0x38
 | 
					#define INTEL_MID_UART_DIV		0x38
 | 
				
			||||||
| 
						 | 
					@ -130,7 +128,7 @@ static int dnv_handle_irq(struct uart_port *p)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct mid8250 *mid = p->private_data;
 | 
						struct mid8250 *mid = p->private_data;
 | 
				
			||||||
	struct uart_8250_port *up = up_to_u8250p(p);
 | 
						struct uart_8250_port *up = up_to_u8250p(p);
 | 
				
			||||||
	unsigned int fisr = serial_port_in(p, INTEL_MID_UART_DNV_FISR);
 | 
						unsigned int fisr = serial_port_in(p, INTEL_MID_UART_FISR);
 | 
				
			||||||
	u32 status;
 | 
						u32 status;
 | 
				
			||||||
	int ret = 0;
 | 
						int ret = 0;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
| 
						 | 
					@ -377,6 +375,7 @@ static const struct pci_device_id pci_ids[] = {
 | 
				
			||||||
	MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART2, pnw_board),
 | 
						MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART2, pnw_board),
 | 
				
			||||||
	MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART3, pnw_board),
 | 
						MID_DEVICE(PCI_DEVICE_ID_INTEL_PNW_UART3, pnw_board),
 | 
				
			||||||
	MID_DEVICE(PCI_DEVICE_ID_INTEL_TNG_UART, tng_board),
 | 
						MID_DEVICE(PCI_DEVICE_ID_INTEL_TNG_UART, tng_board),
 | 
				
			||||||
 | 
						MID_DEVICE(PCI_DEVICE_ID_INTEL_CDF_UART, dnv_board),
 | 
				
			||||||
	MID_DEVICE(PCI_DEVICE_ID_INTEL_DNV_UART, dnv_board),
 | 
						MID_DEVICE(PCI_DEVICE_ID_INTEL_DNV_UART, dnv_board),
 | 
				
			||||||
	{ },
 | 
						{ },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 8250_moxa.c - MOXA Smartio/Industio MUE multiport serial driver.
 | 
					 * 8250_moxa.c - MOXA Smartio/Industio MUE multiport serial driver.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Author: Mathieu OTHACEHE <m.othacehe@gmail.com>
 | 
					 * Author: Mathieu OTHACEHE <m.othacehe@gmail.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,18 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Mediatek 8250 driver.
 | 
					 * Mediatek 8250 driver.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (c) 2014 MundoReader S.L.
 | 
					 * Copyright (c) 2014 MundoReader S.L.
 | 
				
			||||||
 * Author: Matthias Brugger <matthias.bgg@gmail.com>
 | 
					 * Author: Matthias Brugger <matthias.bgg@gmail.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
| 
						 | 
					@ -61,7 +52,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,
 | 
				
			||||||
	 * registers to their default values.
 | 
						 * registers to their default values.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	baud = uart_get_baud_rate(port, termios, old,
 | 
						baud = uart_get_baud_rate(port, termios, old,
 | 
				
			||||||
				  port->uartclk / 16 / 0xffff,
 | 
									  port->uartclk / 16 / UART_DIV_MAX,
 | 
				
			||||||
				  port->uartclk);
 | 
									  port->uartclk);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (baud <= 115200) {
 | 
						if (baud <= 115200) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,8 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Serial Port driver for Open Firmware platform devices
 | 
					 *  Serial Port driver for Open Firmware platform devices
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *    Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, IBM Corp.
 | 
					 *    Copyright (C) 2006 Arnd Bergmann <arnd@arndb.de>, IBM Corp.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or
 | 
					 | 
				
			||||||
 *  modify it under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 *  as published by the Free Software Foundation; either version
 | 
					 | 
				
			||||||
 *  2 of the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/console.h>
 | 
					#include <linux/console.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * 8250-core based driver for the OMAP internal UART
 | 
					 * 8250-core based driver for the OMAP internal UART
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -199,7 +200,7 @@ static void omap_8250_get_divisor(struct uart_port *port, unsigned int baud,
 | 
				
			||||||
	 * Old custom speed handling.
 | 
						 * Old custom speed handling.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) {
 | 
						if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) {
 | 
				
			||||||
		priv->quot = port->custom_divisor & 0xffff;
 | 
							priv->quot = port->custom_divisor & UART_DIV_MAX;
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * I assume that nobody is using this. But hey, if somebody
 | 
							 * I assume that nobody is using this. But hey, if somebody
 | 
				
			||||||
		 * would like to specify the divisor _and_ the mode then the
 | 
							 * would like to specify the divisor _and_ the mode then the
 | 
				
			||||||
| 
						 | 
					@ -358,7 +359,7 @@ static void omap_8250_set_termios(struct uart_port *port,
 | 
				
			||||||
	 * Ask the core to calculate the divisor for us.
 | 
						 * Ask the core to calculate the divisor for us.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	baud = uart_get_baud_rate(port, termios, old,
 | 
						baud = uart_get_baud_rate(port, termios, old,
 | 
				
			||||||
				  port->uartclk / 16 / 0xffff,
 | 
									  port->uartclk / 16 / UART_DIV_MAX,
 | 
				
			||||||
				  port->uartclk / 13);
 | 
									  port->uartclk / 13);
 | 
				
			||||||
	omap_8250_get_divisor(port, baud, priv);
 | 
						omap_8250_get_divisor(port, baud, priv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Probe module for 8250/16550-type PCI serial ports.
 | 
					 *  Probe module for 8250/16550-type PCI serial ports.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
					 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2001 Russell King, All Rights Reserved.
 | 
					 *  Copyright (C) 2001 Russell King, All Rights Reserved.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#undef DEBUG
 | 
					#undef DEBUG
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					@ -3368,6 +3365,7 @@ static const struct pci_device_id blacklist[] = {
 | 
				
			||||||
	{ PCI_VDEVICE(INTEL, 0x081c), },
 | 
						{ PCI_VDEVICE(INTEL, 0x081c), },
 | 
				
			||||||
	{ PCI_VDEVICE(INTEL, 0x081d), },
 | 
						{ PCI_VDEVICE(INTEL, 0x081d), },
 | 
				
			||||||
	{ PCI_VDEVICE(INTEL, 0x1191), },
 | 
						{ PCI_VDEVICE(INTEL, 0x1191), },
 | 
				
			||||||
 | 
						{ PCI_VDEVICE(INTEL, 0x18d8), },
 | 
				
			||||||
	{ PCI_VDEVICE(INTEL, 0x19d8), },
 | 
						{ PCI_VDEVICE(INTEL, 0x19d8), },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Intel platforms with DesignWare UART */
 | 
						/* Intel platforms with DesignWare UART */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Probe for 8250/16550-type ISAPNP serial ports.
 | 
					 *  Probe for 8250/16550-type ISAPNP serial ports.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,10 +7,6 @@
 | 
				
			||||||
 *  Copyright (C) 2001 Russell King, All Rights Reserved.
 | 
					 *  Copyright (C) 2001 Russell King, All Rights Reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Ported to the Linux PnP Layer - (C) Adam Belay.
 | 
					 *  Ported to the Linux PnP Layer - (C) Adam Belay.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/pci.h>
 | 
					#include <linux/pci.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Base port operations for 8250/16550-type serial ports
 | 
					 *  Base port operations for 8250/16550-type serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
					 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
				
			||||||
 *  Split from 8250_core.c, Copyright (C) 2001 Russell King.
 | 
					 *  Split from 8250_core.c, Copyright (C) 2001 Russell King.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * A note about mapbase / membase
 | 
					 * A note about mapbase / membase
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  mapbase is the physical address of the IO port.
 | 
					 *  mapbase is the physical address of the IO port.
 | 
				
			||||||
| 
						 | 
					@ -1516,7 +1512,6 @@ static inline void __stop_tx(struct uart_8250_port *p)
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		em485->active_timer = NULL;
 | 
							em485->active_timer = NULL;
 | 
				
			||||||
		hrtimer_cancel(&em485->start_tx_timer);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		__stop_tx_rs485(p);
 | 
							__stop_tx_rs485(p);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -1580,8 +1575,6 @@ static inline void start_tx_rs485(struct uart_port *port)
 | 
				
			||||||
		serial8250_stop_rx(&up->port);
 | 
							serial8250_stop_rx(&up->port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	em485->active_timer = NULL;
 | 
						em485->active_timer = NULL;
 | 
				
			||||||
	if (hrtimer_is_queued(&em485->stop_tx_timer))
 | 
					 | 
				
			||||||
		hrtimer_cancel(&em485->stop_tx_timer);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mcr = serial8250_in_MCR(up);
 | 
						mcr = serial8250_in_MCR(up);
 | 
				
			||||||
	if (!!(up->port.rs485.flags & SER_RS485_RTS_ON_SEND) !=
 | 
						if (!!(up->port.rs485.flags & SER_RS485_RTS_ON_SEND) !=
 | 
				
			||||||
| 
						 | 
					@ -2586,8 +2579,11 @@ static void serial8250_set_divisor(struct uart_port *port, unsigned int baud,
 | 
				
			||||||
	serial_dl_write(up, quot);
 | 
						serial_dl_write(up, quot);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* XR17V35x UARTs have an extra fractional divisor register (DLD) */
 | 
						/* XR17V35x UARTs have an extra fractional divisor register (DLD) */
 | 
				
			||||||
	if (up->port.type == PORT_XR17V35X)
 | 
						if (up->port.type == PORT_XR17V35X) {
 | 
				
			||||||
 | 
							/* Preserve bits not related to baudrate; DLD[7:4]. */
 | 
				
			||||||
 | 
							quot_frac |= serial_port_in(port, 0x2) & 0xf0;
 | 
				
			||||||
		serial_port_out(port, 0x2, quot_frac);
 | 
							serial_port_out(port, 0x2, quot_frac);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static unsigned int serial8250_get_baud_rate(struct uart_port *port,
 | 
					static unsigned int serial8250_get_baud_rate(struct uart_port *port,
 | 
				
			||||||
| 
						 | 
					@ -2601,7 +2597,7 @@ static unsigned int serial8250_get_baud_rate(struct uart_port *port,
 | 
				
			||||||
	 * causing transmission errors.
 | 
						 * causing transmission errors.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	return uart_get_baud_rate(port, termios, old,
 | 
						return uart_get_baud_rate(port, termios, old,
 | 
				
			||||||
				  port->uartclk / 16 / 0xffff,
 | 
									  port->uartclk / 16 / UART_DIV_MAX,
 | 
				
			||||||
				  port->uartclk);
 | 
									  port->uartclk);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  drivers/tty/serial/8250/8250_pxa.c -- driver for PXA on-board UARTS
 | 
					 *  drivers/tty/serial/8250/8250_pxa.c -- driver for PXA on-board UARTS
 | 
				
			||||||
 *  Copyright:	(C) 2013 Sergei Ianovich <ynvich@gmail.com>
 | 
					 *  Copyright:	(C) 2013 Sergei Ianovich <ynvich@gmail.com>
 | 
				
			||||||
| 
						 | 
					@ -7,12 +8,6 @@
 | 
				
			||||||
 *  Copyright:	(C) 2003 Monta Vista Software, Inc.
 | 
					 *  Copyright:	(C) 2003 Monta Vista Software, Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/serial/8250.c by Russell King.
 | 
					 *  Based on drivers/serial/8250.c by Russell King.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/device.h>
 | 
					#include <linux/device.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,15 +1,6 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
 | 
					 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: (GPL-2.0 OR MPL-1.1)
 | 
				
			||||||
/*======================================================================
 | 
					/*======================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    A driver for PCMCIA serial devices
 | 
					    A driver for PCMCIA serial devices
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * altera_jtaguart.c -- Altera JTAG UART driver
 | 
					 * altera_jtaguart.c -- Altera JTAG UART driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,11 +7,6 @@
 | 
				
			||||||
 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com>
 | 
					 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com>
 | 
				
			||||||
 * (C) Copyright 2008, Thomas Chou <thomas@wytron.com.tw>
 | 
					 * (C) Copyright 2008, Thomas Chou <thomas@wytron.com.tw>
 | 
				
			||||||
 * (C) Copyright 2010, Tobias Klauser <tklauser@distanz.ch>
 | 
					 * (C) Copyright 2010, Tobias Klauser <tklauser@distanz.ch>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * altera_uart.c -- Altera UART driver
 | 
					 * altera_uart.c -- Altera UART driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,11 +7,6 @@
 | 
				
			||||||
 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com>
 | 
					 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com>
 | 
				
			||||||
 * (C) Copyright 2008, Thomas Chou <thomas@wytron.com.tw>
 | 
					 * (C) Copyright 2008, Thomas Chou <thomas@wytron.com.tw>
 | 
				
			||||||
 * (C) Copyright 2010, Tobias Klauser <tklauser@distanz.ch>
 | 
					 * (C) Copyright 2010, Tobias Klauser <tklauser@distanz.ch>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
| 
						 | 
					@ -288,10 +284,10 @@ static irqreturn_t altera_uart_interrupt(int irq, void *data)
 | 
				
			||||||
	return IRQ_RETVAL(isr);
 | 
						return IRQ_RETVAL(isr);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void altera_uart_timer(unsigned long data)
 | 
					static void altera_uart_timer(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct uart_port *port = (void *)data;
 | 
						struct altera_uart *pp = from_timer(pp, t, tmr);
 | 
				
			||||||
	struct altera_uart *pp = container_of(port, struct altera_uart, port);
 | 
						struct uart_port *port = &pp->port;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	altera_uart_interrupt(0, port);
 | 
						altera_uart_interrupt(0, port);
 | 
				
			||||||
	mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port));
 | 
						mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port));
 | 
				
			||||||
| 
						 | 
					@ -314,7 +310,7 @@ static int altera_uart_startup(struct uart_port *port)
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!port->irq) {
 | 
						if (!port->irq) {
 | 
				
			||||||
		setup_timer(&pp->tmr, altera_uart_timer, (unsigned long)port);
 | 
							timer_setup(&pp->tmr, altera_uart_timer, 0);
 | 
				
			||||||
		mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port));
 | 
							mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port));
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for AMBA serial ports
 | 
					 *  Driver for AMBA serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,20 +7,6 @@
 | 
				
			||||||
 *  Copyright 1999 ARM Limited
 | 
					 *  Copyright 1999 ARM Limited
 | 
				
			||||||
 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
					 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This is a generic driver for ARM AMBA-type serial ports.  They
 | 
					 * This is a generic driver for ARM AMBA-type serial ports.  They
 | 
				
			||||||
 * have a lot of 16550-like features, but are not register compatible.
 | 
					 * have a lot of 16550-like features, but are not register compatible.
 | 
				
			||||||
 * Note that although they do have CTS, DCD and DSR inputs, they do
 | 
					 * Note that although they do have CTS, DCD and DSR inputs, they do
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for AMBA serial ports
 | 
					 *  Driver for AMBA serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -7,20 +8,6 @@
 | 
				
			||||||
 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
					 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
				
			||||||
 *  Copyright (C) 2010 ST-Ericsson SA
 | 
					 *  Copyright (C) 2010 ST-Ericsson SA
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This is a generic driver for ARM AMBA-type serial ports.  They
 | 
					 * This is a generic driver for ARM AMBA-type serial ports.  They
 | 
				
			||||||
 * have a lot of 16550-like features, but are not register compatible.
 | 
					 * have a lot of 16550-like features, but are not register compatible.
 | 
				
			||||||
 * Note that although they do have CTS, DCD and DSR inputs, they do
 | 
					 * Note that although they do have CTS, DCD and DSR inputs, they do
 | 
				
			||||||
| 
						 | 
					@ -281,7 +268,6 @@ struct uart_amba_port {
 | 
				
			||||||
	unsigned int		old_status;
 | 
						unsigned int		old_status;
 | 
				
			||||||
	unsigned int		fifosize;	/* vendor-specific */
 | 
						unsigned int		fifosize;	/* vendor-specific */
 | 
				
			||||||
	unsigned int		old_cr;		/* state during shutdown */
 | 
						unsigned int		old_cr;		/* state during shutdown */
 | 
				
			||||||
	bool			autorts;
 | 
					 | 
				
			||||||
	unsigned int		fixed_baud;	/* vendor-set fixed baud rate */
 | 
						unsigned int		fixed_baud;	/* vendor-set fixed baud rate */
 | 
				
			||||||
	char			type[12];
 | 
						char			type[12];
 | 
				
			||||||
#ifdef CONFIG_DMA_ENGINE
 | 
					#ifdef CONFIG_DMA_ENGINE
 | 
				
			||||||
| 
						 | 
					@ -1078,9 +1064,9 @@ static inline void pl011_dma_rx_stop(struct uart_amba_port *uap)
 | 
				
			||||||
 * Every polling, It checks the residue in the dma buffer and transfer
 | 
					 * Every polling, It checks the residue in the dma buffer and transfer
 | 
				
			||||||
 * data to the tty. Also, last_residue is updated for the next polling.
 | 
					 * data to the tty. Also, last_residue is updated for the next polling.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void pl011_dma_rx_poll(unsigned long args)
 | 
					static void pl011_dma_rx_poll(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct uart_amba_port *uap = (struct uart_amba_port *)args;
 | 
						struct uart_amba_port *uap = from_timer(uap, t, dmarx.timer);
 | 
				
			||||||
	struct tty_port *port = &uap->port.state->port;
 | 
						struct tty_port *port = &uap->port.state->port;
 | 
				
			||||||
	struct pl011_dmarx_data *dmarx = &uap->dmarx;
 | 
						struct pl011_dmarx_data *dmarx = &uap->dmarx;
 | 
				
			||||||
	struct dma_chan *rxchan = uap->dmarx.chan;
 | 
						struct dma_chan *rxchan = uap->dmarx.chan;
 | 
				
			||||||
| 
						 | 
					@ -1192,9 +1178,7 @@ static void pl011_dma_startup(struct uart_amba_port *uap)
 | 
				
			||||||
			dev_dbg(uap->port.dev, "could not trigger initial "
 | 
								dev_dbg(uap->port.dev, "could not trigger initial "
 | 
				
			||||||
				"RX DMA job, fall back to interrupt mode\n");
 | 
									"RX DMA job, fall back to interrupt mode\n");
 | 
				
			||||||
		if (uap->dmarx.poll_rate) {
 | 
							if (uap->dmarx.poll_rate) {
 | 
				
			||||||
			init_timer(&(uap->dmarx.timer));
 | 
								timer_setup(&uap->dmarx.timer, pl011_dma_rx_poll, 0);
 | 
				
			||||||
			uap->dmarx.timer.function = pl011_dma_rx_poll;
 | 
					 | 
				
			||||||
			uap->dmarx.timer.data = (unsigned long)uap;
 | 
					 | 
				
			||||||
			mod_timer(&uap->dmarx.timer,
 | 
								mod_timer(&uap->dmarx.timer,
 | 
				
			||||||
				jiffies +
 | 
									jiffies +
 | 
				
			||||||
				msecs_to_jiffies(uap->dmarx.poll_rate));
 | 
									msecs_to_jiffies(uap->dmarx.poll_rate));
 | 
				
			||||||
| 
						 | 
					@ -1588,7 +1572,7 @@ static void pl011_set_mctrl(struct uart_port *port, unsigned int mctrl)
 | 
				
			||||||
	TIOCMBIT(TIOCM_OUT2, UART011_CR_OUT2);
 | 
						TIOCMBIT(TIOCM_OUT2, UART011_CR_OUT2);
 | 
				
			||||||
	TIOCMBIT(TIOCM_LOOP, UART011_CR_LBE);
 | 
						TIOCMBIT(TIOCM_LOOP, UART011_CR_LBE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (uap->autorts) {
 | 
						if (port->status & UPSTAT_AUTORTS) {
 | 
				
			||||||
		/* We need to disable auto-RTS if we want to turn RTS off */
 | 
							/* We need to disable auto-RTS if we want to turn RTS off */
 | 
				
			||||||
		TIOCMBIT(TIOCM_RTS, UART011_CR_RTSEN);
 | 
							TIOCMBIT(TIOCM_RTS, UART011_CR_RTSEN);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -1842,7 +1826,7 @@ static void pl011_disable_uart(struct uart_amba_port *uap)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned int cr;
 | 
						unsigned int cr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uap->autorts = false;
 | 
						uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS);
 | 
				
			||||||
	spin_lock_irq(&uap->port.lock);
 | 
						spin_lock_irq(&uap->port.lock);
 | 
				
			||||||
	cr = pl011_read(uap, REG_CR);
 | 
						cr = pl011_read(uap, REG_CR);
 | 
				
			||||||
	uap->old_cr = cr;
 | 
						uap->old_cr = cr;
 | 
				
			||||||
| 
						 | 
					@ -2028,10 +2012,10 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios,
 | 
				
			||||||
			old_cr |= UART011_CR_RTSEN;
 | 
								old_cr |= UART011_CR_RTSEN;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		old_cr |= UART011_CR_CTSEN;
 | 
							old_cr |= UART011_CR_CTSEN;
 | 
				
			||||||
		uap->autorts = true;
 | 
							port->status |= UPSTAT_AUTOCTS | UPSTAT_AUTORTS;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		old_cr &= ~(UART011_CR_CTSEN | UART011_CR_RTSEN);
 | 
							old_cr &= ~(UART011_CR_CTSEN | UART011_CR_RTSEN);
 | 
				
			||||||
		uap->autorts = false;
 | 
							port->status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (uap->vendor->oversampling) {
 | 
						if (uap->vendor->oversampling) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for GRLIB serial ports (APBUART)
 | 
					 *  Driver for GRLIB serial ports (APBUART)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Atheros AR933X SoC built-in UART driver
 | 
					 *  Atheros AR933X SoC built-in UART driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
 | 
					 *  Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
					 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can redistribute it and/or modify it
 | 
					 | 
				
			||||||
 *  under the terms of the GNU General Public License version 2 as published
 | 
					 | 
				
			||||||
 *  by the Free Software Foundation.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,9 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * ARC On-Chip(fpga) UART Driver
 | 
					 * ARC On-Chip(fpga) UART Driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2010-2012 Synopsys, Inc. (www.synopsys.com)
 | 
					 * Copyright (C) 2010-2012 Synopsys, Inc. (www.synopsys.com)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License version 2 as
 | 
					 | 
				
			||||||
 * published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * vineetg: July 10th 2012
 | 
					 * vineetg: July 10th 2012
 | 
				
			||||||
 *  -Decoupled the driver from arch/arc
 | 
					 *  -Decoupled the driver from arch/arc
 | 
				
			||||||
 *    +Using platform_get_resource() for irq/membase (thx to bfin_uart.c)
 | 
					 *    +Using platform_get_resource() for irq/membase (thx to bfin_uart.c)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for Atmel AT91 Serial ports
 | 
					 *  Driver for Atmel AT91 Serial ports
 | 
				
			||||||
 *  Copyright (C) 2003 Rick Bronson
 | 
					 *  Copyright (C) 2003 Rick Bronson
 | 
				
			||||||
| 
						 | 
					@ -6,21 +7,6 @@
 | 
				
			||||||
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
					 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  DMA support added by Chip Coldwell.
 | 
					 *  DMA support added by Chip Coldwell.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/tty.h>
 | 
					#include <linux/tty.h>
 | 
				
			||||||
#include <linux/ioport.h>
 | 
					#include <linux/ioport.h>
 | 
				
			||||||
| 
						 | 
					@ -171,6 +157,7 @@ struct atmel_uart_port {
 | 
				
			||||||
	bool			has_hw_timer;
 | 
						bool			has_hw_timer;
 | 
				
			||||||
	struct timer_list	uart_timer;
 | 
						struct timer_list	uart_timer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						bool			tx_stopped;
 | 
				
			||||||
	bool			suspended;
 | 
						bool			suspended;
 | 
				
			||||||
	unsigned int		pending;
 | 
						unsigned int		pending;
 | 
				
			||||||
	unsigned int		pending_status;
 | 
						unsigned int		pending_status;
 | 
				
			||||||
| 
						 | 
					@ -380,6 +367,10 @@ static int atmel_config_rs485(struct uart_port *port,
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static u_int atmel_tx_empty(struct uart_port *port)
 | 
					static u_int atmel_tx_empty(struct uart_port *port)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (atmel_port->tx_stopped)
 | 
				
			||||||
 | 
							return TIOCSER_TEMT;
 | 
				
			||||||
	return (atmel_uart_readl(port, ATMEL_US_CSR) & ATMEL_US_TXEMPTY) ?
 | 
						return (atmel_uart_readl(port, ATMEL_US_CSR) & ATMEL_US_TXEMPTY) ?
 | 
				
			||||||
		TIOCSER_TEMT :
 | 
							TIOCSER_TEMT :
 | 
				
			||||||
		0;
 | 
							0;
 | 
				
			||||||
| 
						 | 
					@ -485,6 +476,7 @@ static void atmel_stop_tx(struct uart_port *port)
 | 
				
			||||||
	 * is fully transmitted.
 | 
						 * is fully transmitted.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXDIS);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXDIS);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Disable interrupts */
 | 
						/* Disable interrupts */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
 | 
						atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
 | 
				
			||||||
| 
						 | 
					@ -521,6 +513,7 @@ static void atmel_start_tx(struct uart_port *port)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* re-enable the transmitter */
 | 
						/* re-enable the transmitter */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -1178,10 +1171,11 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
 | 
				
			||||||
	return -EINVAL;
 | 
						return -EINVAL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void atmel_uart_timer_callback(unsigned long data)
 | 
					static void atmel_uart_timer_callback(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct uart_port *port = (void *)data;
 | 
						struct atmel_uart_port *atmel_port = from_timer(atmel_port, t,
 | 
				
			||||||
	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 | 
												uart_timer);
 | 
				
			||||||
 | 
						struct uart_port *port = &atmel_port->uart;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!atomic_read(&atmel_port->tasklet_shutdown)) {
 | 
						if (!atomic_read(&atmel_port->tasklet_shutdown)) {
 | 
				
			||||||
		tasklet_schedule(&atmel_port->tasklet_rx);
 | 
							tasklet_schedule(&atmel_port->tasklet_rx);
 | 
				
			||||||
| 
						 | 
					@ -1667,29 +1661,6 @@ static void atmel_init_property(struct atmel_uart_port *atmel_port,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void atmel_init_rs485(struct uart_port *port,
 | 
					 | 
				
			||||||
				struct platform_device *pdev)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct device_node *np = pdev->dev.of_node;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	struct serial_rs485 *rs485conf = &port->rs485;
 | 
					 | 
				
			||||||
	u32 rs485_delay[2];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* rs485 properties */
 | 
					 | 
				
			||||||
	if (of_property_read_u32_array(np, "rs485-rts-delay",
 | 
					 | 
				
			||||||
				       rs485_delay, 2) == 0) {
 | 
					 | 
				
			||||||
		rs485conf->delay_rts_before_send = rs485_delay[0];
 | 
					 | 
				
			||||||
		rs485conf->delay_rts_after_send = rs485_delay[1];
 | 
					 | 
				
			||||||
		rs485conf->flags = 0;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (of_get_property(np, "rs485-rx-during-tx", NULL))
 | 
					 | 
				
			||||||
		rs485conf->flags |= SER_RS485_RX_DURING_TX;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (of_get_property(np, "linux,rs485-enabled-at-boot-time", NULL))
 | 
					 | 
				
			||||||
		rs485conf->flags |= SER_RS485_ENABLED;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void atmel_set_ops(struct uart_port *port)
 | 
					static void atmel_set_ops(struct uart_port *port)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 | 
						struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 | 
				
			||||||
| 
						 | 
					@ -1866,10 +1837,9 @@ static int atmel_startup(struct uart_port *port)
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
				
			||||||
	/* enable xmit & rcvr */
 | 
						/* enable xmit & rcvr */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	setup_timer(&atmel_port->uart_timer,
 | 
						timer_setup(&atmel_port->uart_timer, atmel_uart_timer_callback, 0);
 | 
				
			||||||
			atmel_uart_timer_callback,
 | 
					 | 
				
			||||||
			(unsigned long)port);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (atmel_use_pdc_rx(port)) {
 | 
						if (atmel_use_pdc_rx(port)) {
 | 
				
			||||||
		/* set UART timeout */
 | 
							/* set UART timeout */
 | 
				
			||||||
| 
						 | 
					@ -2122,6 +2092,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* disable receiver and transmitter */
 | 
						/* disable receiver and transmitter */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXDIS | ATMEL_US_RXDIS);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXDIS | ATMEL_US_RXDIS);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* mode */
 | 
						/* mode */
 | 
				
			||||||
	if (port->rs485.flags & SER_RS485_ENABLED) {
 | 
						if (port->rs485.flags & SER_RS485_ENABLED) {
 | 
				
			||||||
| 
						 | 
					@ -2207,6 +2178,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_BRGR, quot);
 | 
						atmel_uart_writel(port, ATMEL_US_BRGR, quot);
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* restore interrupts */
 | 
						/* restore interrupts */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_IER, imr);
 | 
						atmel_uart_writel(port, ATMEL_US_IER, imr);
 | 
				
			||||||
| 
						 | 
					@ -2373,7 +2345,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
 | 
				
			||||||
	atmel_init_property(atmel_port, pdev);
 | 
						atmel_init_property(atmel_port, pdev);
 | 
				
			||||||
	atmel_set_ops(port);
 | 
						atmel_set_ops(port);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	atmel_init_rs485(port, pdev);
 | 
						of_get_rs485_mode(pdev->dev.of_node, &port->rs485);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	port->iotype		= UPIO_MEM;
 | 
						port->iotype		= UPIO_MEM;
 | 
				
			||||||
	port->flags		= UPF_BOOT_AUTOCONF | UPF_IOREMAP;
 | 
						port->flags		= UPF_BOOT_AUTOCONF | UPF_IOREMAP;
 | 
				
			||||||
| 
						 | 
					@ -2450,6 +2422,7 @@ static void atmel_console_write(struct console *co, const char *s, u_int count)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Make sure that tx path is actually able to send characters */
 | 
						/* Make sure that tx path is actually able to send characters */
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uart_console_write(port, s, count, atmel_console_putchar);
 | 
						uart_console_write(port, s, count, atmel_console_putchar);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2511,6 +2484,7 @@ static int __init atmel_console_setup(struct console *co, char *options)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
	struct uart_port *port = &atmel_ports[co->index].uart;
 | 
						struct uart_port *port = &atmel_ports[co->index].uart;
 | 
				
			||||||
 | 
						struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
 | 
				
			||||||
	int baud = 115200;
 | 
						int baud = 115200;
 | 
				
			||||||
	int bits = 8;
 | 
						int bits = 8;
 | 
				
			||||||
	int parity = 'n';
 | 
						int parity = 'n';
 | 
				
			||||||
| 
						 | 
					@ -2528,6 +2502,7 @@ static int __init atmel_console_setup(struct console *co, char *options)
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_IDR, -1);
 | 
						atmel_uart_writel(port, ATMEL_US_IDR, -1);
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
 | 
				
			||||||
	atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
						atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
 | 
				
			||||||
 | 
						atmel_port->tx_stopped = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (options)
 | 
						if (options)
 | 
				
			||||||
		uart_parse_options(options, &baud, &parity, &bits, &flow);
 | 
							uart_parse_options(options, &baud, &parity, &bits, &flow);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * include/linux/atmel_serial.h
 | 
					 * include/linux/atmel_serial.h
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -6,11 +7,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * USART registers.
 | 
					 * USART registers.
 | 
				
			||||||
 * Based on AT91RM9200 datasheet revision E.
 | 
					 * Based on AT91RM9200 datasheet revision E.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef ATMEL_SERIAL_H
 | 
					#ifndef ATMEL_SERIAL_H
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,5 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * This file is subject to the terms and conditions of the GNU General Public
 | 
					 | 
				
			||||||
 * License.  See the file "COPYING" in the main directory of this archive
 | 
					 | 
				
			||||||
 * for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Derived from many drivers using generic_serial interface.
 | 
					 * Derived from many drivers using generic_serial interface.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
 | 
					 * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Blackfin On-Chip Sport Emulated UART Driver
 | 
					 * Blackfin On-Chip Sport Emulated UART Driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2006-2009 Analog Devices Inc.
 | 
					 * Copyright 2006-2009 Analog Devices Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Enter bugs at http://blackfin.uclinux.org/
 | 
					 * Enter bugs at http://blackfin.uclinux.org/
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the GPL-2 or later.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -584,7 +583,7 @@ static void sport_set_termios(struct uart_port *port,
 | 
				
			||||||
	spin_unlock_irqrestore(&up->port.lock, flags);
 | 
						spin_unlock_irqrestore(&up->port.lock, flags);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct uart_ops sport_uart_ops = {
 | 
					static const struct uart_ops sport_uart_ops = {
 | 
				
			||||||
	.tx_empty	= sport_tx_empty,
 | 
						.tx_empty	= sport_tx_empty,
 | 
				
			||||||
	.set_mctrl	= sport_set_mctrl,
 | 
						.set_mctrl	= sport_set_mctrl,
 | 
				
			||||||
	.get_mctrl	= sport_get_mctrl,
 | 
						.get_mctrl	= sport_get_mctrl,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Blackfin On-Chip Sport Emulated UART Driver
 | 
					 * Blackfin On-Chip Sport Emulated UART Driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2006-2008 Analog Devices Inc.
 | 
					 * Copyright 2006-2008 Analog Devices Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Enter bugs at http://blackfin.uclinux.org/
 | 
					 * Enter bugs at http://blackfin.uclinux.org/
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the GPL-2 or later.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Blackfin On-Chip Serial Driver
 | 
					 * Blackfin On-Chip Serial Driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2006-2011 Analog Devices Inc.
 | 
					 * Copyright 2006-2011 Analog Devices Inc.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Enter bugs at http://blackfin.uclinux.org/
 | 
					 * Enter bugs at http://blackfin.uclinux.org/
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Licensed under the GPL-2 or later.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(CONFIG_SERIAL_BFIN_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 | 
					#if defined(CONFIG_SERIAL_BFIN_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 | 
				
			||||||
| 
						 | 
					@ -456,8 +455,9 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
 | 
				
			||||||
	tty_flip_buffer_push(&uart->port.state->port);
 | 
						tty_flip_buffer_push(&uart->port.state->port);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 | 
					void bfin_serial_rx_dma_timeout(struct timer_list *t)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct bfin_serial_port *uart = from_timer(uart, t, rx_dma_timer);
 | 
				
			||||||
	int x_pos, pos;
 | 
						int x_pos, pos;
 | 
				
			||||||
	unsigned long flags;
 | 
						unsigned long flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -624,8 +624,6 @@ static int bfin_serial_startup(struct uart_port *port)
 | 
				
			||||||
	set_dma_start_addr(uart->rx_dma_channel, (unsigned long)uart->rx_dma_buf.buf);
 | 
						set_dma_start_addr(uart->rx_dma_channel, (unsigned long)uart->rx_dma_buf.buf);
 | 
				
			||||||
	enable_dma(uart->rx_dma_channel);
 | 
						enable_dma(uart->rx_dma_channel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uart->rx_dma_timer.data = (unsigned long)(uart);
 | 
					 | 
				
			||||||
	uart->rx_dma_timer.function = (void *)bfin_serial_rx_dma_timeout;
 | 
					 | 
				
			||||||
	uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES;
 | 
						uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES;
 | 
				
			||||||
	add_timer(&(uart->rx_dma_timer));
 | 
						add_timer(&(uart->rx_dma_timer));
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
| 
						 | 
					@ -1316,7 +1314,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		uart->rx_dma_channel = res->start;
 | 
							uart->rx_dma_channel = res->start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		init_timer(&(uart->rx_dma_timer));
 | 
							timer_setup(&uart->rx_dma_timer, bfin_serial_rx_dma_timeout, 0);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(SERIAL_BFIN_CTSRTS) || \
 | 
					#if defined(SERIAL_BFIN_CTSRTS) || \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for CLPS711x serial ports
 | 
					 *  Driver for CLPS711x serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,11 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  Copyright 1999 ARM Limited
 | 
					 *  Copyright 1999 ARM Limited
 | 
				
			||||||
 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
					 *  Copyright (C) 2000 Deep Blue Solutions Ltd.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 | 
					#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for CPM (SCC/SMC) serial ports
 | 
					 *  Driver for CPM (SCC/SMC) serial ports
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -5,11 +6,6 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  2006 (c) MontaVista Software, Inc.
 | 
					 *  2006 (c) MontaVista Software, Inc.
 | 
				
			||||||
 *	Vitaly Bordug <vbordug@ru.mvista.com>
 | 
					 *	Vitaly Bordug <vbordug@ru.mvista.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This file is licensed under the terms of the GNU General Public License
 | 
					 | 
				
			||||||
 * version 2. This program is licensed "as is" without any warranty of any
 | 
					 | 
				
			||||||
 * kind, whether express or implied.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#ifndef CPM_UART_H
 | 
					#ifndef CPM_UART_H
 | 
				
			||||||
#define CPM_UART_H
 | 
					#define CPM_UART_H
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for CPM (SCC/SMC) serial ports; core driver
 | 
					 *  Driver for CPM (SCC/SMC) serial ports; core driver
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -12,21 +13,6 @@
 | 
				
			||||||
 *            (C) 2004 Intracom, S.A.
 | 
					 *            (C) 2004 Intracom, S.A.
 | 
				
			||||||
 *            (C) 2005-2006 MontaVista Software, Inc.
 | 
					 *            (C) 2005-2006 MontaVista Software, Inc.
 | 
				
			||||||
 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
					 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for CPM (SCC/SMC) serial ports; CPM1 definitions
 | 
					 *  Driver for CPM (SCC/SMC) serial ports; CPM1 definitions
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -8,21 +9,6 @@
 | 
				
			||||||
 *            (C) 2004 Intracom, S.A.
 | 
					 *            (C) 2004 Intracom, S.A.
 | 
				
			||||||
 *            (C) 2006 MontaVista Software, Inc.
 | 
					 *            (C) 2006 MontaVista Software, Inc.
 | 
				
			||||||
 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
					 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for CPM (SCC/SMC) serial ports; CPM2 definitions
 | 
					 *  Driver for CPM (SCC/SMC) serial ports; CPM2 definitions
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					@ -8,21 +9,6 @@
 | 
				
			||||||
 *            (C) 2004 Intracom, S.A.
 | 
					 *            (C) 2004 Intracom, S.A.
 | 
				
			||||||
 *            (C) 2006 MontaVista Software, Inc.
 | 
					 *            (C) 2006 MontaVista Software, Inc.
 | 
				
			||||||
 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
					 *		Vitaly Bordug <vbordug@ru.mvista.com>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 * GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 * along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,10 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0+
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Driver for Conexant Digicolor serial ports (USART)
 | 
					 *  Driver for Conexant Digicolor serial ports (USART)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Author: Baruch Siach <baruch@tkos.co.il>
 | 
					 * Author: Baruch Siach <baruch@tkos.co.il>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright (C) 2014 Paradox Innovation Ltd.
 | 
					 * Copyright (C) 2014 Paradox Innovation Ltd.
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 * it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 * the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 * (at your option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/module.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,4 @@
 | 
				
			||||||
 | 
					// SPDX-License-Identifier: GPL-2.0
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * dz.c: Serial port driver for DECstations equipped
 | 
					 * dz.c: Serial port driver for DECstations equipped
 | 
				
			||||||
 *       with the DZ chipset.
 | 
					 *       with the DZ chipset.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
		Reference in a new issue