forked from mirrors/linux
		
	tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44
Define a new early console name for Qualcomm Datacenter Technologies
QDF2400 SOCs affected by erratum 44, instead of piggy-backing on "pl011".
Previously, to enable traditional (non-SPCR) earlycon, the documentation
said to specify "earlycon=pl011,<address>,qdf2400_e44", but the code was
broken and this didn't actually work.
So instead, the method for specifying the E44 work-around with traditional
earlycon is "earlycon=qdf2400_e44,<address>".  Both methods of earlycon
are now enabled with the same function.
Fixes: e53e597fd4 ("tty: pl011: fix earlycon work-around for QDF2400 erratum 44")
Signed-off-by: Timur Tabi <timur@codeaurora.org>
Cc: stable <stable@vger.kernel.org> # 4.11
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
			
			
This commit is contained in:
		
							parent
							
								
									15a0654851
								
							
						
					
					
						commit
						5a0722b898
					
				
					 1 changed files with 23 additions and 8 deletions
				
			
		|  | @ -2475,19 +2475,34 @@ static int __init pl011_early_console_setup(struct earlycon_device *device, | ||||||
| 	if (!device->port.membase) | 	if (!device->port.membase) | ||||||
| 		return -ENODEV; | 		return -ENODEV; | ||||||
| 
 | 
 | ||||||
| 	/* On QDF2400 SOCs affected by Erratum 44, the "qdf2400_e44" must
 | 	device->con->write = pl011_early_write; | ||||||
| 	 * also be specified, e.g. "earlycon=pl011,<address>,qdf2400_e44". |  | ||||||
| 	 */ |  | ||||||
| 	if (!strcmp(device->options, "qdf2400_e44")) |  | ||||||
| 		device->con->write = qdf2400_e44_early_write; |  | ||||||
| 	else |  | ||||||
| 		device->con->write = pl011_early_write; |  | ||||||
| 
 | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| OF_EARLYCON_DECLARE(pl011, "arm,pl011", pl011_early_console_setup); | OF_EARLYCON_DECLARE(pl011, "arm,pl011", pl011_early_console_setup); | ||||||
| OF_EARLYCON_DECLARE(pl011, "arm,sbsa-uart", pl011_early_console_setup); | OF_EARLYCON_DECLARE(pl011, "arm,sbsa-uart", pl011_early_console_setup); | ||||||
| EARLYCON_DECLARE(qdf2400_e44, pl011_early_console_setup); | 
 | ||||||
|  | /*
 | ||||||
|  |  * On Qualcomm Datacenter Technologies QDF2400 SOCs affected by | ||||||
|  |  * Erratum 44, traditional earlycon can be enabled by specifying | ||||||
|  |  * "earlycon=qdf2400_e44,<address>".  Any options are ignored. | ||||||
|  |  * | ||||||
|  |  * Alternatively, you can just specify "earlycon", and the early console | ||||||
|  |  * will be enabled with the information from the SPCR table.  In this | ||||||
|  |  * case, the SPCR code will detect the need for the E44 work-around, | ||||||
|  |  * and set the console name to "qdf2400_e44". | ||||||
|  |  */ | ||||||
|  | static int __init | ||||||
|  | qdf2400_e44_early_console_setup(struct earlycon_device *device, | ||||||
|  | 				const char *opt) | ||||||
|  | { | ||||||
|  | 	if (!device->port.membase) | ||||||
|  | 		return -ENODEV; | ||||||
|  | 
 | ||||||
|  | 	device->con->write = qdf2400_e44_early_write; | ||||||
|  | 	return 0; | ||||||
|  | } | ||||||
|  | EARLYCON_DECLARE(qdf2400_e44, qdf2400_e44_early_console_setup); | ||||||
| 
 | 
 | ||||||
| #else | #else | ||||||
| #define AMBA_CONSOLE	NULL | #define AMBA_CONSOLE	NULL | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Timur Tabi
						Timur Tabi