Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'tty-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial driver updates from Greg KH:
"Here is a small set of tty and serial driver updates for 6.13-rc1.
Nothing major at all this time, only some small changes:

- few device tree binding updates

- 8250_exar serial driver updates

- imx serial driver updates

- sprd_serial driver updates

- other tiny serial driver updates, full details in the shortlog

All of these have been in linux-next for a while with one reported
issue, but that commit has now been reverted"

* tag 'tty-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (37 commits)
Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
serial: amba-pl011: fix build regression
dt-bindings: serial: Add a new compatible string for ums9632
serial: sprd: Add support for sc9632
tty/serial/altera_uart: unwrap error log string
tty/serial/altera_jtaguart: unwrap error log string
serial: amba-pl011: Fix RX stall when DMA is used
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
serial: 8250_fintek: Add support for F81216E
serial: sh-sci: Clean sci_ports[0] after at earlycon exit
tty: atmel_serial: Fix typo retreives to retrieves
tty: atmel_serial: Use devm_platform_ioremap_resource()
serial: 8250: omap: Move pm_runtime_get_sync
tty: serial: samsung: Add Exynos8895 compatible
dt-bindings: serial: samsung: Add samsung,exynos8895-uart compatible
serial: 8250_dw: Add Sophgo SG2044 quirk
dt-bindings: serial: snps-dw-apb-uart: Add Sophgo SG2044 uarts
dt-bindings: serial: snps,dw-apb-uart: merge duplicate compatible entry.
altera_jtaguart: Use dev_err() to report error attaching IRQ
altera_uart: Use dev_err() to report error attaching IRQ handler
...

+385 -245
+9 -10
Documentation/devicetree/bindings/serial/rs485.yaml
··· 18 18 description: prop-encoded-array <a b> 19 19 $ref: /schemas/types.yaml#/definitions/uint32-array 20 20 items: 21 - items: 22 - - description: Delay between rts signal and beginning of data sent in 23 - milliseconds. It corresponds to the delay before sending data. 24 - default: 0 25 - maximum: 100 26 - - description: Delay between end of data sent and rts signal in milliseconds. 27 - It corresponds to the delay after sending data and actual release 28 - of the line. 29 - default: 0 30 - maximum: 100 21 + - description: Delay between rts signal and beginning of data sent in 22 + milliseconds. It corresponds to the delay before sending data. 23 + default: 0 24 + maximum: 100 25 + - description: Delay between end of data sent and rts signal in milliseconds. 26 + It corresponds to the delay after sending data and actual release 27 + of the line. 28 + default: 0 29 + maximum: 100 31 30 32 31 rs485-rts-active-high: 33 32 description: drive RTS high when sending (this is the default).
+12 -2
Documentation/devicetree/bindings/serial/samsung_uart.yaml
··· 27 27 - samsung,exynos4210-uart 28 28 - samsung,exynos5433-uart 29 29 - samsung,exynos850-uart 30 + - samsung,exynos8895-uart 30 31 - items: 31 32 - enum: 32 33 - samsung,exynos7-uart ··· 161 160 contains: 162 161 enum: 163 162 - google,gs101-uart 163 + - samsung,exynos8895-uart 164 164 then: 165 165 required: 166 166 - samsung,uart-fifosize 167 167 properties: 168 - reg-io-width: false 169 - 170 168 clocks: 171 169 maxItems: 2 172 170 173 171 clock-names: 174 172 maxItems: 2 173 + 174 + - if: 175 + properties: 176 + compatible: 177 + contains: 178 + enum: 179 + - google,gs101-uart 180 + then: 181 + properties: 182 + reg-io-width: false 175 183 176 184 unevaluatedProperties: false 177 185
+5 -8
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
··· 37 37 - const: renesas,rzn1-uart 38 38 - items: 39 39 - enum: 40 + - brcm,bcm11351-dw-apb-uart 41 + - brcm,bcm21664-dw-apb-uart 40 42 - rockchip,px30-uart 41 43 - rockchip,rk1808-uart 42 44 - rockchip,rk3036-uart ··· 50 48 - rockchip,rk3328-uart 51 49 - rockchip,rk3368-uart 52 50 - rockchip,rk3399-uart 51 + - rockchip,rk3528-uart 53 52 - rockchip,rk3568-uart 53 + - rockchip,rk3576-uart 54 54 - rockchip,rk3588-uart 55 55 - rockchip,rv1108-uart 56 56 - rockchip,rv1126-uart 57 - - const: snps,dw-apb-uart 58 - - items: 59 - - enum: 60 - - brcm,bcm11351-dw-apb-uart 61 - - brcm,bcm21664-dw-apb-uart 62 - - const: snps,dw-apb-uart 63 - - items: 64 - - enum: 57 + - sophgo,sg2044-uart 65 58 - starfive,jh7100-hsuart 66 59 - starfive,jh7100-uart 67 60 - starfive,jh7110-uart
+1
Documentation/devicetree/bindings/serial/sprd-uart.yaml
··· 17 17 oneOf: 18 18 - items: 19 19 - enum: 20 + - sprd,sc9632-uart 20 21 - sprd,sc9860-uart 21 22 - sprd,sc9863a-uart 22 23 - sprd,ums512-uart
+1
drivers/mailbox/omap-mailbox.c
··· 15 15 #include <linux/slab.h> 16 16 #include <linux/kfifo.h> 17 17 #include <linux/err.h> 18 + #include <linux/io.h> 18 19 #include <linux/module.h> 19 20 #include <linux/of.h> 20 21 #include <linux/platform_device.h>
+13 -2
drivers/misc/eeprom/eeprom_93cx6.c
··· 8 8 * Supported chipsets: 93c46 & 93c66. 9 9 */ 10 10 11 + #include <linux/bits.h> 11 12 #include <linux/kernel.h> 12 13 #include <linux/module.h> 13 14 #include <linux/delay.h> ··· 103 102 /* 104 103 * Check if this bit needs to be set. 105 104 */ 106 - eeprom->reg_data_in = !!(data & (1 << (i - 1))); 105 + eeprom->reg_data_in = !!(data & BIT(i - 1)); 107 106 108 107 /* 109 108 * Write the bit to the eeprom register. ··· 153 152 * Read if the bit has been set. 154 153 */ 155 154 if (eeprom->reg_data_out) 156 - buf |= (1 << (i - 1)); 155 + buf |= BIT(i - 1); 157 156 158 157 eeprom_93cx6_pulse_low(eeprom); 159 158 } ··· 186 185 command = (PCI_EEPROM_READ_OPCODE << eeprom->width) | word; 187 186 eeprom_93cx6_write_bits(eeprom, command, 188 187 PCI_EEPROM_WIDTH_OPCODE + eeprom->width); 188 + 189 + if (has_quirk_extra_read_cycle(eeprom)) { 190 + eeprom_93cx6_pulse_high(eeprom); 191 + eeprom_93cx6_pulse_low(eeprom); 192 + } 189 193 190 194 /* 191 195 * Read the requested 16 bits. ··· 257 251 command = (PCI_EEPROM_READ_OPCODE << (eeprom->width + 1)) | byte; 258 252 eeprom_93cx6_write_bits(eeprom, command, 259 253 PCI_EEPROM_WIDTH_OPCODE + eeprom->width + 1); 254 + 255 + if (has_quirk_extra_read_cycle(eeprom)) { 256 + eeprom_93cx6_pulse_high(eeprom); 257 + eeprom_93cx6_pulse_low(eeprom); 258 + } 260 259 261 260 /* 262 261 * Read the requested 8 bits.
+1 -1
drivers/tty/serial/8250/8250_aspeed_vuart.c
··· 569 569 .of_match_table = aspeed_vuart_table, 570 570 }, 571 571 .probe = aspeed_vuart_probe, 572 - .remove_new = aspeed_vuart_remove, 572 + .remove = aspeed_vuart_remove, 573 573 }; 574 574 575 575 module_platform_driver(aspeed_vuart_driver);
+1 -1
drivers/tty/serial/8250/8250_bcm2835aux.c
··· 267 267 .pm = pm_ptr(&bcm2835aux_dev_pm_ops), 268 268 }, 269 269 .probe = bcm2835aux_serial_probe, 270 - .remove_new = bcm2835aux_serial_remove, 270 + .remove = bcm2835aux_serial_remove, 271 271 }; 272 272 module_platform_driver(bcm2835aux_serial_driver); 273 273
+2 -2
drivers/tty/serial/8250/8250_bcm7271.c
··· 812 812 /* 813 813 * if Receive Data Interrupt is enabled and 814 814 * we're uing hardware flow control, deassert 815 - * RTS and wait for any chars in the pipline to 815 + * RTS and wait for any chars in the pipeline to 816 816 * arrive and then check for DR again. 817 817 */ 818 818 if ((ier & UART_IER_RDI) && (up->mcr & UART_MCR_AFE)) { ··· 1204 1204 .of_match_table = brcmuart_dt_ids, 1205 1205 }, 1206 1206 .probe = brcmuart_probe, 1207 - .remove_new = brcmuart_remove, 1207 + .remove = brcmuart_remove, 1208 1208 }; 1209 1209 1210 1210 static int __init brcmuart_init(void)
+4 -3
drivers/tty/serial/8250/8250_dw.c
··· 750 750 .quirks = DW_UART_QUIRK_CPR_VALUE | DW_UART_QUIRK_IS_DMA_FC, 751 751 }; 752 752 753 - static const struct dw8250_platform_data dw8250_starfive_jh7100_data = { 753 + static const struct dw8250_platform_data dw8250_skip_set_rate_data = { 754 754 .usr_reg = DW_UART_USR, 755 755 .quirks = DW_UART_QUIRK_SKIP_SET_RATE, 756 756 }; ··· 760 760 { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, 761 761 { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, 762 762 { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, 763 - { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data }, 763 + { .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data }, 764 + { .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data }, 764 765 { /* Sentinel */ } 765 766 }; 766 767 MODULE_DEVICE_TABLE(of, dw8250_of_match); ··· 797 796 .acpi_match_table = dw8250_acpi_match, 798 797 }, 799 798 .probe = dw8250_probe, 800 - .remove_new = dw8250_remove, 799 + .remove = dw8250_remove, 801 800 }; 802 801 803 802 module_platform_driver(dw8250_platform_driver);
+1 -1
drivers/tty/serial/8250/8250_em.c
··· 219 219 .of_match_table = serial8250_em_dt_ids, 220 220 }, 221 221 .probe = serial8250_em_probe, 222 - .remove_new = serial8250_em_remove, 222 + .remove = serial8250_em_remove, 223 223 }; 224 224 225 225 module_platform_driver(serial8250_em_platform_driver);
+43 -99
drivers/tty/serial/8250/8250_exar.c
··· 11 11 #include <linux/delay.h> 12 12 #include <linux/device.h> 13 13 #include <linux/dmi.h> 14 + #include <linux/eeprom_93cx6.h> 14 15 #include <linux/interrupt.h> 15 16 #include <linux/io.h> 16 17 #include <linux/math.h> ··· 136 135 #define UART_EXAR_REGB_EECS BIT(5) 137 136 #define UART_EXAR_REGB_EEDI BIT(6) 138 137 #define UART_EXAR_REGB_EEDO BIT(7) 139 - #define UART_EXAR_REGB_EE_ADDR_SIZE 6 140 - #define UART_EXAR_REGB_EE_DATA_SIZE 16 141 138 142 139 #define UART_EXAR_XR17C15X_PORT_OFFSET 0x200 143 140 #define UART_EXAR_XR17V25X_PORT_OFFSET 0x200 ··· 178 179 179 180 /* CTI EEPROM offsets */ 180 181 #define CTI_EE_OFF_XR17C15X_OSC_FREQ 0x04 /* 2 words */ 181 - #define CTI_EE_OFF_XR17V25X_OSC_FREQ 0x08 /* 2 words */ 182 182 #define CTI_EE_OFF_XR17C15X_PART_NUM 0x0A /* 4 words */ 183 - #define CTI_EE_OFF_XR17V25X_PART_NUM 0x0E /* 4 words */ 184 183 #define CTI_EE_OFF_XR17C15X_SERIAL_NUM 0x0E /* 1 word */ 184 + 185 + #define CTI_EE_OFF_XR17V25X_OSC_FREQ 0x08 /* 2 words */ 186 + #define CTI_EE_OFF_XR17V25X_PART_NUM 0x0E /* 4 words */ 185 187 #define CTI_EE_OFF_XR17V25X_SERIAL_NUM 0x12 /* 1 word */ 188 + 186 189 #define CTI_EE_OFF_XR17V35X_SERIAL_NUM 0x11 /* 2 word */ 187 190 #define CTI_EE_OFF_XR17V35X_BRD_FLAGS 0x13 /* 1 word */ 188 191 #define CTI_EE_OFF_XR17V35X_PORT_FLAGS 0x14 /* 1 word */ 189 192 190 193 #define CTI_EE_MASK_PORT_FLAGS_TYPE GENMASK(7, 0) 191 - #define CTI_EE_MASK_OSC_FREQ_LOWER GENMASK(15, 0) 192 - #define CTI_EE_MASK_OSC_FREQ_UPPER GENMASK(31, 16) 194 + #define CTI_EE_MASK_OSC_FREQ GENMASK(31, 0) 193 195 194 196 #define CTI_FPGA_RS485_IO_REG 0x2008 195 197 #define CTI_FPGA_CFG_INT_EN_REG 0x48 ··· 252 252 unsigned int nr; 253 253 unsigned int osc_freq; 254 254 struct exar8250_board *board; 255 + struct eeprom_93cx6 eeprom; 255 256 void __iomem *virt; 256 257 int line[]; 257 258 }; ··· 268 267 return readb(priv->virt + reg); 269 268 } 270 269 271 - static inline void exar_ee_select(struct exar8250 *priv) 270 + static void exar_eeprom_93cx6_reg_read(struct eeprom_93cx6 *eeprom) 272 271 { 273 - // Set chip select pin high to enable EEPROM reads/writes 274 - exar_write_reg(priv, UART_EXAR_REGB, UART_EXAR_REGB_EECS); 275 - // Min ~500ns delay needed between CS assert and EEPROM access 276 - udelay(1); 272 + struct exar8250 *priv = eeprom->data; 273 + u8 regb = exar_read_reg(priv, UART_EXAR_REGB); 274 + 275 + /* EECK and EECS always read 0 from REGB so only set EEDO */ 276 + eeprom->reg_data_out = regb & UART_EXAR_REGB_EEDO; 277 277 } 278 278 279 - static inline void exar_ee_deselect(struct exar8250 *priv) 279 + static void exar_eeprom_93cx6_reg_write(struct eeprom_93cx6 *eeprom) 280 280 { 281 - exar_write_reg(priv, UART_EXAR_REGB, 0x00); 281 + struct exar8250 *priv = eeprom->data; 282 + u8 regb = 0; 283 + 284 + if (eeprom->reg_data_in) 285 + regb |= UART_EXAR_REGB_EEDI; 286 + if (eeprom->reg_data_clock) 287 + regb |= UART_EXAR_REGB_EECK; 288 + if (eeprom->reg_chip_select) 289 + regb |= UART_EXAR_REGB_EECS; 290 + 291 + exar_write_reg(priv, UART_EXAR_REGB, regb); 282 292 } 283 293 284 - static inline void exar_ee_write_bit(struct exar8250 *priv, u8 bit) 294 + static void exar_eeprom_init(struct exar8250 *priv) 285 295 { 286 - u8 value = UART_EXAR_REGB_EECS; 287 - 288 - if (bit) 289 - value |= UART_EXAR_REGB_EEDI; 290 - 291 - // Clock out the bit on the EEPROM interface 292 - exar_write_reg(priv, UART_EXAR_REGB, value); 293 - // 2us delay = ~500khz clock speed 294 - udelay(2); 295 - 296 - value |= UART_EXAR_REGB_EECK; 297 - 298 - exar_write_reg(priv, UART_EXAR_REGB, value); 299 - udelay(2); 300 - } 301 - 302 - static inline u8 exar_ee_read_bit(struct exar8250 *priv) 303 - { 304 - u8 regb; 305 - u8 value = UART_EXAR_REGB_EECS; 306 - 307 - // Clock in the bit on the EEPROM interface 308 - exar_write_reg(priv, UART_EXAR_REGB, value); 309 - // 2us delay = ~500khz clock speed 310 - udelay(2); 311 - 312 - value |= UART_EXAR_REGB_EECK; 313 - 314 - exar_write_reg(priv, UART_EXAR_REGB, value); 315 - udelay(2); 316 - 317 - regb = exar_read_reg(priv, UART_EXAR_REGB); 318 - 319 - return (regb & UART_EXAR_REGB_EEDO ? 1 : 0); 320 - } 321 - 322 - /** 323 - * exar_ee_read() - Read a word from the EEPROM 324 - * @priv: Device's private structure 325 - * @ee_addr: Offset of EEPROM to read word from 326 - * 327 - * Read a single 16bit word from an Exar UART's EEPROM. 328 - * The type of the EEPROM is AT93C46D. 329 - * 330 - * Return: EEPROM word 331 - */ 332 - static u16 exar_ee_read(struct exar8250 *priv, u8 ee_addr) 333 - { 334 - int i; 335 - u16 data = 0; 336 - 337 - exar_ee_select(priv); 338 - 339 - // Send read command (opcode 110) 340 - exar_ee_write_bit(priv, 1); 341 - exar_ee_write_bit(priv, 1); 342 - exar_ee_write_bit(priv, 0); 343 - 344 - // Send address to read from 345 - for (i = UART_EXAR_REGB_EE_ADDR_SIZE - 1; i >= 0; i--) 346 - exar_ee_write_bit(priv, ee_addr & BIT(i)); 347 - 348 - // Read data 1 bit at a time starting with a dummy bit 349 - for (i = UART_EXAR_REGB_EE_DATA_SIZE; i >= 0; i--) { 350 - if (exar_ee_read_bit(priv)) 351 - data |= BIT(i); 352 - } 353 - 354 - exar_ee_deselect(priv); 355 - 356 - return data; 296 + priv->eeprom.data = priv; 297 + priv->eeprom.register_read = exar_eeprom_93cx6_reg_read; 298 + priv->eeprom.register_write = exar_eeprom_93cx6_reg_write; 299 + priv->eeprom.width = PCI_EEPROM_WIDTH_93C46; 300 + priv->eeprom.quirks |= PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE; 357 301 } 358 302 359 303 /** ··· 306 360 * @priv: Device's private structure 307 361 * @mpio_num: MPIO number/offset to configure 308 362 * 309 - * Configure a single MPIO as an output and disable tristate. It is reccomended 363 + * Configure a single MPIO as an output and disable tristate. It is recommended 310 364 * to set the level with exar_mpio_set_high()/exar_mpio_set_low() prior to 311 365 * calling this function to ensure default MPIO pin state. 312 366 * ··· 462 516 serial_port_out(port, UART_XR_EFR, UART_EFR_ECB); 463 517 464 518 /* 465 - * Make sure all interrups are masked until initialization is 519 + * Make sure all interrupts are masked until initialization is 466 520 * complete and the FIFOs are cleared 467 521 * 468 522 * Synchronize UART_IER access against the console. ··· 642 696 */ 643 697 static int cti_read_osc_freq(struct exar8250 *priv, u8 eeprom_offset) 644 698 { 645 - u16 lower_word; 646 - u16 upper_word; 699 + __le16 ee_words[2]; 700 + u32 osc_freq; 647 701 648 - lower_word = exar_ee_read(priv, eeprom_offset); 649 - // Check if EEPROM word was blank 650 - if (lower_word == 0xFFFF) 702 + eeprom_93cx6_multiread(&priv->eeprom, eeprom_offset, ee_words, ARRAY_SIZE(ee_words)); 703 + 704 + osc_freq = le16_to_cpu(ee_words[0]) | (le16_to_cpu(ee_words[1]) << 16); 705 + if (osc_freq == CTI_EE_MASK_OSC_FREQ) 651 706 return -EIO; 652 707 653 - upper_word = exar_ee_read(priv, (eeprom_offset + 1)); 654 - if (upper_word == 0xFFFF) 655 - return -EIO; 656 - 657 - return FIELD_PREP(CTI_EE_MASK_OSC_FREQ_LOWER, lower_word) | 658 - FIELD_PREP(CTI_EE_MASK_OSC_FREQ_UPPER, upper_word); 708 + return osc_freq; 659 709 } 660 710 661 711 /** ··· 775 833 u8 offset; 776 834 777 835 offset = CTI_EE_OFF_XR17V35X_PORT_FLAGS + port_num; 778 - port_flags = exar_ee_read(priv, offset); 836 + eeprom_93cx6_read(&priv->eeprom, offset, &port_flags); 779 837 780 838 port_type = FIELD_GET(CTI_EE_MASK_PORT_FLAGS_TYPE, port_flags); 781 839 if (CTI_PORT_TYPE_VALID(port_type)) ··· 1492 1550 IRQF_SHARED, "exar_uart", priv); 1493 1551 if (rc) 1494 1552 return rc; 1553 + 1554 + exar_eeprom_init(priv); 1495 1555 1496 1556 for (i = 0; i < nr_ports && i < maxnr; i++) { 1497 1557 rc = board->setup(priv, pcidev, &uart, i);
+14 -2
drivers/tty/serial/8250/8250_fintek.c
··· 21 21 #define CHIP_ID_F81866 0x1010 22 22 #define CHIP_ID_F81966 0x0215 23 23 #define CHIP_ID_F81216AD 0x1602 24 + #define CHIP_ID_F81216E 0x1617 24 25 #define CHIP_ID_F81216H 0x0501 25 26 #define CHIP_ID_F81216 0x0802 26 27 #define VENDOR_ID1 0x23 ··· 126 125 if (!request_muxed_region(base_port, 2, "8250_fintek")) 127 126 return -EBUSY; 128 127 129 - /* Force to deactive all SuperIO in this base_port */ 128 + /* Force to deactivate all SuperIO in this base_port */ 130 129 outb(EXIT_KEY, base_port + ADDR_PORT); 131 130 132 131 outb(key, base_port + ADDR_PORT); ··· 159 158 case CHIP_ID_F81866: 160 159 case CHIP_ID_F81966: 161 160 case CHIP_ID_F81216AD: 161 + case CHIP_ID_F81216E: 162 162 case CHIP_ID_F81216H: 163 163 case CHIP_ID_F81216: 164 164 break; ··· 183 181 return 0; 184 182 185 183 case CHIP_ID_F81216AD: 184 + case CHIP_ID_F81216E: 186 185 case CHIP_ID_F81216H: 187 186 case CHIP_ID_F81216: 188 187 *min = F81216_LDN_LOW; ··· 253 250 break; 254 251 255 252 case CHIP_ID_F81216AD: 253 + case CHIP_ID_F81216E: 256 254 case CHIP_ID_F81216H: 257 255 case CHIP_ID_F81216: 258 256 sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_SHARE, ··· 267 263 static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata) 268 264 { 269 265 switch (pdata->pid) { 270 - case CHIP_ID_F81216H: /* 128Bytes FIFO */ 266 + case CHIP_ID_F81216E: /* 128Bytes FIFO */ 267 + case CHIP_ID_F81216H: 271 268 case CHIP_ID_F81966: 272 269 case CHIP_ID_F81866: 273 270 sio_write_mask_reg(pdata, FIFO_CTRL, ··· 302 297 goto exit; 303 298 304 299 switch (pdata->pid) { 300 + case CHIP_ID_F81216E: 305 301 case CHIP_ID_F81216H: 306 302 reg = RS485; 307 303 break; ··· 352 346 struct fintek_8250 *pdata = uart->port.private_data; 353 347 354 348 switch (pdata->pid) { 349 + case CHIP_ID_F81216E: 355 350 case CHIP_ID_F81216H: 356 351 case CHIP_ID_F81966: 357 352 case CHIP_ID_F81866: ··· 443 436 uart->port.rs485_supported = fintek_8250_rs485_supported_port0; 444 437 else 445 438 uart->port.rs485_supported = fintek_8250_rs485_supported; 439 + break; 440 + 441 + case CHIP_ID_F81216E: /* F81216E does not support RS485 delays */ 442 + uart->port.rs485_config = fintek_8250_rs485_config; 443 + uart->port.rs485_supported = fintek_8250_rs485_supported; 446 444 break; 447 445 448 446 default: /* No RS485 Auto direction functional */
+1 -1
drivers/tty/serial/8250/8250_fsl.c
··· 179 179 .acpi_match_table = ACPI_PTR(fsl_8250_acpi_id), 180 180 }, 181 181 .probe = fsl8250_acpi_probe, 182 - .remove_new = fsl8250_acpi_remove, 182 + .remove = fsl8250_acpi_remove, 183 183 }; 184 184 185 185 module_platform_driver(fsl8250_platform_driver);
+1 -1
drivers/tty/serial/8250/8250_ingenic.c
··· 361 361 .of_match_table = of_match, 362 362 }, 363 363 .probe = ingenic_uart_probe, 364 - .remove_new = ingenic_uart_remove, 364 + .remove = ingenic_uart_remove, 365 365 }; 366 366 367 367 module_platform_driver(ingenic_uart_platform_driver);
+1 -1
drivers/tty/serial/8250/8250_ioc3.c
··· 84 84 85 85 static struct platform_driver serial8250_ioc3_driver = { 86 86 .probe = serial8250_ioc3_probe, 87 - .remove_new = serial8250_ioc3_remove, 87 + .remove = serial8250_ioc3_remove, 88 88 .driver = { 89 89 .name = "ioc3-serial8250", 90 90 }
+1 -1
drivers/tty/serial/8250/8250_lpc18xx.c
··· 195 195 196 196 static struct platform_driver lpc18xx_serial_driver = { 197 197 .probe = lpc18xx_serial_probe, 198 - .remove_new = lpc18xx_serial_remove, 198 + .remove = lpc18xx_serial_remove, 199 199 .driver = { 200 200 .name = "lpc18xx-uart", 201 201 .of_match_table = lpc18xx_serial_match,
+3 -3
drivers/tty/serial/8250/8250_mtk.c
··· 346 346 /* 347 347 * Mediatek UARTs use an extra highspeed register (MTK_UART_HIGHS) 348 348 * 349 - * We need to recalcualte the quot register, as the claculation depends 350 - * on the vaule in the highspeed register. 349 + * We need to recalculate the quot register, as the calculation depends 350 + * on the value in the highspeed register. 351 351 * 352 352 * Some baudrates are not supported by the chip, so we use the next 353 353 * lower rate supported and update termios c_flag. ··· 654 654 .of_match_table = mtk8250_of_match, 655 655 }, 656 656 .probe = mtk8250_probe, 657 - .remove_new = mtk8250_remove, 657 + .remove = mtk8250_remove, 658 658 }; 659 659 module_platform_driver(mtk8250_platform_driver); 660 660
+1 -1
drivers/tty/serial/8250/8250_of.c
··· 352 352 .pm = &of_serial_pm_ops, 353 353 }, 354 354 .probe = of_platform_serial_probe, 355 - .remove_new = of_platform_serial_remove, 355 + .remove = of_platform_serial_remove, 356 356 }; 357 357 358 358 module_platform_driver(of_platform_serial_driver);
+5 -5
drivers/tty/serial/8250/8250_omap.c
··· 776 776 struct uart_8250_port *up = up_to_u8250p(port); 777 777 struct omap8250_priv *priv = port->private_data; 778 778 779 + pm_runtime_get_sync(port->dev); 780 + 779 781 flush_work(&priv->qos_work); 780 782 if (up->dma) 781 783 omap_8250_rx_dma_flush(up); 782 - 783 - pm_runtime_get_sync(port->dev); 784 784 785 785 serial_out(up, UART_OMAP_WER, 0); 786 786 if (priv->habit & UART_HAS_EFR2) ··· 1304 1304 1305 1305 /* 1306 1306 * This is mostly serial8250_handle_irq(). We have a slightly different DMA 1307 - * hoook for RX/TX and need different logic for them in the ISR. Therefore we 1307 + * hook for RX/TX and need different logic for them in the ISR. Therefore we 1308 1308 * use the default routine in the non-DMA case and this one for with DMA. 1309 1309 */ 1310 1310 static int omap_8250_dma_handle_irq(struct uart_port *port) ··· 1338 1338 serial8250_tx_chars(up); 1339 1339 } else { 1340 1340 /* 1341 - * try again due to an earlier failer which 1341 + * try again due to an earlier failure which 1342 1342 * might have been resolved by now. 1343 1343 */ 1344 1344 if (omap_8250_tx_dma(up)) ··· 1867 1867 .of_match_table = omap8250_dt_ids, 1868 1868 }, 1869 1869 .probe = omap8250_probe, 1870 - .remove_new = omap8250_remove, 1870 + .remove = omap8250_remove, 1871 1871 }; 1872 1872 module_platform_driver(omap8250_platform_driver); 1873 1873
+1 -1
drivers/tty/serial/8250/8250_platform.c
··· 285 285 286 286 static struct platform_driver serial8250_isa_driver = { 287 287 .probe = serial8250_probe, 288 - .remove_new = serial8250_remove, 288 + .remove = serial8250_remove, 289 289 .suspend = serial8250_suspend, 290 290 .resume = serial8250_resume, 291 291 .driver = {
+1 -1
drivers/tty/serial/8250/8250_pxa.c
··· 154 154 155 155 static struct platform_driver serial_pxa_driver = { 156 156 .probe = serial_pxa_probe, 157 - .remove_new = serial_pxa_remove, 157 + .remove = serial_pxa_remove, 158 158 159 159 .driver = { 160 160 .name = "pxa2xx-uart",
+1 -1
drivers/tty/serial/8250/8250_tegra.c
··· 182 182 .acpi_match_table = ACPI_PTR(tegra_uart_acpi_match), 183 183 }, 184 184 .probe = tegra_uart_probe, 185 - .remove_new = tegra_uart_remove, 185 + .remove = tegra_uart_remove, 186 186 }; 187 187 188 188 module_platform_driver(tegra_uart_driver);
+1 -1
drivers/tty/serial/8250/8250_uniphier.c
··· 282 282 283 283 static struct platform_driver uniphier_uart_platform_driver = { 284 284 .probe = uniphier_uart_probe, 285 - .remove_new = uniphier_uart_remove, 285 + .remove = uniphier_uart_remove, 286 286 .driver = { 287 287 .name = "uniphier-uart", 288 288 .of_match_table = uniphier_uart_match,
+1
drivers/tty/serial/8250/Kconfig
··· 150 150 tristate "8250/16550 Exar/Commtech PCI/PCIe device support" 151 151 depends on SERIAL_8250 && PCI 152 152 select SERIAL_8250_PCILIB 153 + select EEPROM_93CX6 153 154 default SERIAL_8250 154 155 help 155 156 This builds support for XR17C1xx, XR17V3xx and some Commtech
+3 -3
drivers/tty/serial/altera_jtaguart.c
··· 175 175 ret = request_irq(port->irq, altera_jtaguart_interrupt, 0, 176 176 DRV_NAME, port); 177 177 if (ret) { 178 - pr_err(DRV_NAME ": unable to attach Altera JTAG UART %d " 179 - "interrupt vector=%d\n", port->line, port->irq); 178 + dev_err(port->dev, "unable to attach Altera JTAG UART %d interrupt vector=%d\n", 179 + port->line, port->irq); 180 180 return ret; 181 181 } 182 182 ··· 449 449 450 450 static struct platform_driver altera_jtaguart_platform_driver = { 451 451 .probe = altera_jtaguart_probe, 452 - .remove_new = altera_jtaguart_remove, 452 + .remove = altera_jtaguart_remove, 453 453 .driver = { 454 454 .name = DRV_NAME, 455 455 .of_match_table = of_match_ptr(altera_jtaguart_match),
+3 -3
drivers/tty/serial/altera_uart.c
··· 307 307 ret = request_irq(port->irq, altera_uart_interrupt, 0, 308 308 dev_name(port->dev), port); 309 309 if (ret) { 310 - pr_err(DRV_NAME ": unable to attach Altera UART %d " 311 - "interrupt vector=%d\n", port->line, port->irq); 310 + dev_err(port->dev, "unable to attach Altera UART %d interrupt vector=%d\n", 311 + port->line, port->irq); 312 312 return ret; 313 313 } 314 314 } ··· 617 617 618 618 static struct platform_driver altera_uart_platform_driver = { 619 619 .probe = altera_uart_probe, 620 - .remove_new = altera_uart_remove, 620 + .remove = altera_uart_remove, 621 621 .driver = { 622 622 .name = DRV_NAME, 623 623 .of_match_table = of_match_ptr(altera_uart_match),
+8 -1
drivers/tty/serial/amba-pl011.c
··· 1819 1819 1820 1820 pl011_write(uap->im, uap, REG_IMSC); 1821 1821 1822 + #ifdef CONFIG_DMA_ENGINE 1823 + if (uap->using_rx_dma) { 1824 + uap->dmacr |= UART011_RXDMAE; 1825 + pl011_write(uap->dmacr, uap, REG_DMACR); 1826 + } 1827 + #endif 1828 + 1822 1829 uart_port_unlock_irqrestore(&uap->port, flags); 1823 1830 } 1824 1831 ··· 2944 2937 2945 2938 static struct platform_driver arm_sbsa_uart_platform_driver = { 2946 2939 .probe = sbsa_uart_probe, 2947 - .remove_new = sbsa_uart_remove, 2940 + .remove = sbsa_uart_remove, 2948 2941 .driver = { 2949 2942 .name = "sbsa-uart", 2950 2943 .pm = &pl011_dev_pm_ops,
+1 -1
drivers/tty/serial/ar933x_uart.c
··· 832 832 833 833 static struct platform_driver ar933x_uart_platform_driver = { 834 834 .probe = ar933x_uart_probe, 835 - .remove_new = ar933x_uart_remove, 835 + .remove = ar933x_uart_remove, 836 836 .driver = { 837 837 .name = DRIVER_NAME, 838 838 .of_match_table = of_match_ptr(ar933x_uart_of_ids),
+5 -11
drivers/tty/serial/atmel_serial.c
··· 1166 1166 port->icount.rx += count; 1167 1167 } 1168 1168 1169 - /* USART retreives ownership of RX DMA buffer */ 1169 + /* USART retrieves ownership of RX DMA buffer */ 1170 1170 dma_sync_single_for_device(port->dev, atmel_port->rx_phys, 1171 1171 ATMEL_SERIAL_RX_SIZE, DMA_FROM_DEVICE); 1172 1172 ··· 2419 2419 static int atmel_request_port(struct uart_port *port) 2420 2420 { 2421 2421 struct platform_device *mpdev = to_platform_device(port->dev->parent); 2422 - int size = resource_size(mpdev->resource); 2423 - 2424 - if (!request_mem_region(port->mapbase, size, "atmel_serial")) 2425 - return -EBUSY; 2426 2422 2427 2423 if (port->flags & UPF_IOREMAP) { 2428 - port->membase = ioremap(port->mapbase, size); 2429 - if (port->membase == NULL) { 2430 - release_mem_region(port->mapbase, size); 2431 - return -ENOMEM; 2432 - } 2424 + port->membase = devm_platform_ioremap_resource(mpdev, 0); 2425 + if (IS_ERR(port->membase)) 2426 + return PTR_ERR(port->membase); 2433 2427 } 2434 2428 2435 2429 return 0; ··· 3011 3017 3012 3018 static struct platform_driver atmel_serial_driver = { 3013 3019 .probe = atmel_serial_probe, 3014 - .remove_new = atmel_serial_remove, 3020 + .remove = atmel_serial_remove, 3015 3021 .driver = { 3016 3022 .name = "atmel_usart_serial", 3017 3023 .of_match_table = of_match_ptr(atmel_serial_dt_ids),
+1 -1
drivers/tty/serial/bcm63xx_uart.c
··· 884 884 */ 885 885 static struct platform_driver bcm_uart_platform_driver = { 886 886 .probe = bcm_uart_probe, 887 - .remove_new = bcm_uart_remove, 887 + .remove = bcm_uart_remove, 888 888 .driver = { 889 889 .name = "bcm63xx_uart", 890 890 .of_match_table = bcm63xx_of_match,
+1 -1
drivers/tty/serial/clps711x.c
··· 529 529 .of_match_table = of_match_ptr(clps711x_uart_dt_ids), 530 530 }, 531 531 .probe = uart_clps711x_probe, 532 - .remove_new = uart_clps711x_remove, 532 + .remove = uart_clps711x_remove, 533 533 }; 534 534 535 535 static int __init uart_clps711x_init(void)
+1 -1
drivers/tty/serial/cpm_uart.c
··· 1573 1573 .of_match_table = cpm_uart_match, 1574 1574 }, 1575 1575 .probe = cpm_uart_probe, 1576 - .remove_new = cpm_uart_remove, 1576 + .remove = cpm_uart_remove, 1577 1577 }; 1578 1578 1579 1579 static int __init cpm_uart_init(void)
+1 -1
drivers/tty/serial/digicolor-usart.c
··· 522 522 .of_match_table = of_match_ptr(digicolor_uart_dt_ids), 523 523 }, 524 524 .probe = digicolor_uart_probe, 525 - .remove_new = digicolor_uart_remove, 525 + .remove = digicolor_uart_remove, 526 526 }; 527 527 528 528 static int __init digicolor_uart_init(void)
+1 -1
drivers/tty/serial/esp32_acm.c
··· 423 423 424 424 static struct platform_driver esp32s3_acm_driver = { 425 425 .probe = esp32s3_acm_probe, 426 - .remove_new = esp32s3_acm_remove, 426 + .remove = esp32s3_acm_remove, 427 427 .driver = { 428 428 .name = DRIVER_NAME, 429 429 .of_match_table = esp32s3_acm_dt_ids,
+1 -1
drivers/tty/serial/esp32_uart.c
··· 743 743 744 744 static struct platform_driver esp32_uart_driver = { 745 745 .probe = esp32_uart_probe, 746 - .remove_new = esp32_uart_remove, 746 + .remove = esp32_uart_remove, 747 747 .driver = { 748 748 .name = DRIVER_NAME, 749 749 .of_match_table = esp32_uart_dt_ids,
+1 -1
drivers/tty/serial/fsl_linflexuart.c
··· 882 882 883 883 static struct platform_driver linflex_driver = { 884 884 .probe = linflex_probe, 885 - .remove_new = linflex_remove, 885 + .remove = linflex_remove, 886 886 .driver = { 887 887 .name = DRIVER_NAME, 888 888 .of_match_table = linflex_dt_ids,
+17 -6
drivers/tty/serial/fsl_lpuart.c
··· 184 184 #define UARTCTRL_SBK 0x00010000 185 185 #define UARTCTRL_MA1IE 0x00008000 186 186 #define UARTCTRL_MA2IE 0x00004000 187 + #define UARTCTRL_M7 0x00000800 187 188 #define UARTCTRL_IDLECFG GENMASK(10, 8) 188 189 #define UARTCTRL_LOOPS 0x00000080 189 190 #define UARTCTRL_DOZEEN 0x00000040 ··· 2223 2222 modem = lpuart32_read(&sport->port, UARTMODIR); 2224 2223 sport->is_cs7 = false; 2225 2224 /* 2226 - * only support CS8 and CS7, and for CS7 must enable PE. 2225 + * only support CS8 and CS7 2227 2226 * supported mode: 2227 + * - (7,n,1) (imx only) 2228 2228 * - (7,e/o,1) 2229 2229 * - (8,n,1) 2230 2230 * - (8,m/s,1) ··· 2240 2238 2241 2239 if ((termios->c_cflag & CSIZE) == CS8 || 2242 2240 (termios->c_cflag & CSIZE) == CS7) 2243 - ctrl = old_ctrl & ~UARTCTRL_M; 2241 + ctrl = old_ctrl & ~(UARTCTRL_M | UARTCTRL_M7); 2244 2242 2245 2243 if (termios->c_cflag & CMSPAR) { 2246 2244 if ((termios->c_cflag & CSIZE) != CS8) { ··· 2267 2265 else 2268 2266 bd &= ~UARTBAUD_SBNS; 2269 2267 2270 - /* parity must be enabled when CS7 to match 8-bits format */ 2271 - if ((termios->c_cflag & CSIZE) == CS7) 2272 - termios->c_cflag |= PARENB; 2268 + /* 2269 + * imx support 7-bits format, no limitation on parity when CS7 2270 + * for layerscape, parity must be enabled when CS7 to match 8-bits format 2271 + */ 2272 + if ((termios->c_cflag & CSIZE) == CS7 && !(termios->c_cflag & PARENB)) { 2273 + if (is_imx7ulp_lpuart(sport) || 2274 + is_imx8ulp_lpuart(sport) || 2275 + is_imx8qxp_lpuart(sport)) 2276 + ctrl |= UARTCTRL_M7; 2277 + else 2278 + termios->c_cflag |= PARENB; 2279 + } 2273 2280 2274 2281 if ((termios->c_cflag & PARENB)) { 2275 2282 if (termios->c_cflag & CMSPAR) { ··· 3217 3206 3218 3207 static struct platform_driver lpuart_driver = { 3219 3208 .probe = lpuart_probe, 3220 - .remove_new = lpuart_remove, 3209 + .remove = lpuart_remove, 3221 3210 .driver = { 3222 3211 .name = "fsl-lpuart", 3223 3212 .of_match_table = lpuart_dt_ids,
+117 -20
drivers/tty/serial/imx.c
··· 230 230 unsigned int saved_reg[10]; 231 231 bool context_saved; 232 232 233 + bool last_putchar_was_newline; 234 + 233 235 enum imx_tx_state tx_state; 234 236 struct hrtimer trigger_start_tx; 235 237 struct hrtimer trigger_stop_tx; ··· 372 370 sport->idle_counter = 0; 373 371 } 374 372 373 + /* called with port.lock taken and irqs off */ 375 374 static void imx_uart_disable_loopback_rs485(struct imx_port *sport) 376 375 { 377 376 unsigned int uts; ··· 473 470 } 474 471 } 475 472 473 + /* called with port.lock taken and irqs off */ 476 474 static void imx_uart_stop_rx_with_loopback_ctrl(struct uart_port *port, bool loopback) 477 475 { 478 476 struct imx_port *sport = to_imx_port(port); ··· 822 818 * issuing soft reset to the UART (just stop/start of RX does not help). Note 823 819 * that what we do here is sending isolated start bit about 2.4 times shorter 824 820 * than it is to be on UART configured baud rate. 821 + * 822 + * Called with port.lock taken and irqs off. 825 823 */ 826 824 static void imx_uart_check_flood(struct imx_port *sport, u32 usr2) 827 825 { ··· 859 853 } 860 854 } 861 855 856 + /* called with port.lock taken and irqs off */ 862 857 static irqreturn_t __imx_uart_rxint(int irq, void *dev_id) 863 858 { 864 859 struct imx_port *sport = dev_id; ··· 938 931 /* 939 932 * We have a modem side uart, so the meanings of RTS and CTS are inverted. 940 933 */ 934 + /* called with port.lock taken and irqs off */ 941 935 static unsigned int imx_uart_get_hwmctrl(struct imx_port *sport) 942 936 { 943 937 unsigned int tmp = TIOCM_DSR; ··· 961 953 962 954 /* 963 955 * Handle any change of modem status signal since we were last called. 956 + * 957 + * Called with port.lock taken and irqs off. 964 958 */ 965 959 static void imx_uart_mctrl_check(struct imx_port *sport) 966 960 { ··· 1302 1292 return 0; 1303 1293 } 1304 1294 1295 + /* called with port.lock taken and irqs off */ 1305 1296 static void imx_uart_clear_rx_errors(struct imx_port *sport) 1306 1297 { 1307 1298 struct tty_port *port = &sport->port.state->port; ··· 1433 1422 return ret; 1434 1423 } 1435 1424 1425 + /* called with port.lock taken and irqs off */ 1436 1426 static void imx_uart_enable_dma(struct imx_port *sport) 1437 1427 { 1438 1428 u32 ucr1; ··· 2081 2069 barrier(); 2082 2070 2083 2071 imx_uart_writel(sport, ch, URTX0); 2072 + 2073 + sport->last_putchar_was_newline = (ch == '\n'); 2084 2074 } 2085 2075 2086 - /* 2087 - * Interrupts are disabled on entering 2088 - */ 2089 - static void 2090 - imx_uart_console_write(struct console *co, const char *s, unsigned int count) 2076 + static void imx_uart_console_device_lock(struct console *co, unsigned long *flags) 2077 + { 2078 + struct uart_port *up = &imx_uart_ports[co->index]->port; 2079 + 2080 + return __uart_port_lock_irqsave(up, flags); 2081 + } 2082 + 2083 + static void imx_uart_console_device_unlock(struct console *co, unsigned long flags) 2084 + { 2085 + struct uart_port *up = &imx_uart_ports[co->index]->port; 2086 + 2087 + return __uart_port_unlock_irqrestore(up, flags); 2088 + } 2089 + 2090 + static void imx_uart_console_write_atomic(struct console *co, 2091 + struct nbcon_write_context *wctxt) 2091 2092 { 2092 2093 struct imx_port *sport = imx_uart_ports[co->index]; 2094 + struct uart_port *port = &sport->port; 2093 2095 struct imx_port_ucrs old_ucr; 2094 - unsigned long flags; 2095 2096 unsigned int ucr1, usr2; 2096 - int locked = 1; 2097 2097 2098 - if (sport->port.sysrq) 2099 - locked = 0; 2100 - else if (oops_in_progress) 2101 - locked = uart_port_trylock_irqsave(&sport->port, &flags); 2102 - else 2103 - uart_port_lock_irqsave(&sport->port, &flags); 2098 + if (!nbcon_enter_unsafe(wctxt)) 2099 + return; 2104 2100 2105 2101 /* 2106 2102 * First, save UCR1/2/3 and then disable interrupts ··· 2122 2102 ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN); 2123 2103 2124 2104 imx_uart_writel(sport, ucr1, UCR1); 2125 - 2126 2105 imx_uart_writel(sport, old_ucr.ucr2 | UCR2_TXEN, UCR2); 2127 2106 2128 - uart_console_write(&sport->port, s, count, imx_uart_console_putchar); 2107 + if (!sport->last_putchar_was_newline) 2108 + uart_console_write(port, "\n", 1, imx_uart_console_putchar); 2109 + uart_console_write(port, wctxt->outbuf, wctxt->len, 2110 + imx_uart_console_putchar); 2129 2111 2130 2112 /* 2131 2113 * Finally, wait for transmitter to become empty ··· 2137 2115 0, USEC_PER_SEC, false, sport, USR2); 2138 2116 imx_uart_ucrs_restore(sport, &old_ucr); 2139 2117 2140 - if (locked) 2141 - uart_port_unlock_irqrestore(&sport->port, flags); 2118 + nbcon_exit_unsafe(wctxt); 2119 + } 2120 + 2121 + static void imx_uart_console_write_thread(struct console *co, 2122 + struct nbcon_write_context *wctxt) 2123 + { 2124 + struct imx_port *sport = imx_uart_ports[co->index]; 2125 + struct uart_port *port = &sport->port; 2126 + struct imx_port_ucrs old_ucr; 2127 + unsigned int ucr1, usr2; 2128 + 2129 + if (!nbcon_enter_unsafe(wctxt)) 2130 + return; 2131 + 2132 + /* 2133 + * First, save UCR1/2/3 and then disable interrupts 2134 + */ 2135 + imx_uart_ucrs_save(sport, &old_ucr); 2136 + ucr1 = old_ucr.ucr1; 2137 + 2138 + if (imx_uart_is_imx1(sport)) 2139 + ucr1 |= IMX1_UCR1_UARTCLKEN; 2140 + ucr1 |= UCR1_UARTEN; 2141 + ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN); 2142 + 2143 + imx_uart_writel(sport, ucr1, UCR1); 2144 + imx_uart_writel(sport, old_ucr.ucr2 | UCR2_TXEN, UCR2); 2145 + 2146 + if (nbcon_exit_unsafe(wctxt)) { 2147 + int len = READ_ONCE(wctxt->len); 2148 + int i; 2149 + 2150 + /* 2151 + * Write out the message. Toggle unsafe for each byte in order 2152 + * to give another (higher priority) context the opportunity 2153 + * for a friendly takeover. If such a takeover occurs, this 2154 + * context must reacquire ownership in order to perform final 2155 + * actions (such as re-enabling the interrupts). 2156 + * 2157 + * IMPORTANT: wctxt->outbuf and wctxt->len are no longer valid 2158 + * after a reacquire so writing the message must be 2159 + * aborted. 2160 + */ 2161 + for (i = 0; i < len; i++) { 2162 + if (!nbcon_enter_unsafe(wctxt)) 2163 + break; 2164 + 2165 + uart_console_write(port, wctxt->outbuf + i, 1, 2166 + imx_uart_console_putchar); 2167 + 2168 + if (!nbcon_exit_unsafe(wctxt)) 2169 + break; 2170 + } 2171 + } 2172 + 2173 + while (!nbcon_enter_unsafe(wctxt)) 2174 + nbcon_reacquire_nobuf(wctxt); 2175 + 2176 + /* 2177 + * Finally, wait for transmitter to become empty 2178 + * and restore UCR1/2/3 2179 + */ 2180 + read_poll_timeout(imx_uart_readl, usr2, usr2 & USR2_TXDC, 2181 + 0, USEC_PER_SEC, false, sport, USR2); 2182 + imx_uart_ucrs_restore(sport, &old_ucr); 2183 + 2184 + nbcon_exit_unsafe(wctxt); 2142 2185 } 2143 2186 2144 2187 /* ··· 2295 2208 if (retval) 2296 2209 goto error_console; 2297 2210 2211 + sport->last_putchar_was_newline = true; 2212 + 2298 2213 if (options) 2299 2214 uart_parse_options(options, &baud, &parity, &bits, &flow); 2300 2215 else ··· 2333 2244 static struct uart_driver imx_uart_uart_driver; 2334 2245 static struct console imx_uart_console = { 2335 2246 .name = DEV_NAME, 2336 - .write = imx_uart_console_write, 2247 + .write_atomic = imx_uart_console_write_atomic, 2248 + .write_thread = imx_uart_console_write_thread, 2249 + .device_lock = imx_uart_console_device_lock, 2250 + .device_unlock = imx_uart_console_device_unlock, 2251 + .flags = CON_PRINTBUFFER | CON_NBCON, 2337 2252 .device = uart_console_device, 2338 2253 .setup = imx_uart_console_setup, 2339 2254 .exit = imx_uart_console_exit, 2340 - .flags = CON_PRINTBUFFER, 2341 2255 .index = -1, 2342 2256 .data = &imx_uart_uart_driver, 2343 2257 }; ··· 2687 2595 uart_port_unlock_irqrestore(&sport->port, flags); 2688 2596 } 2689 2597 2598 + /* called with irq off */ 2690 2599 static void imx_uart_enable_wakeup(struct imx_port *sport, bool on) 2691 2600 { 2692 2601 u32 ucr3; 2602 + 2603 + uart_port_lock(&sport->port); 2693 2604 2694 2605 ucr3 = imx_uart_readl(sport, UCR3); 2695 2606 if (on) { ··· 2713 2618 } 2714 2619 imx_uart_writel(sport, ucr1, UCR1); 2715 2620 } 2621 + 2622 + uart_port_unlock(&sport->port); 2716 2623 } 2717 2624 2718 2625 static int imx_uart_suspend_noirq(struct device *dev) ··· 2814 2717 2815 2718 static struct platform_driver imx_uart_platform_driver = { 2816 2719 .probe = imx_uart_probe, 2817 - .remove_new = imx_uart_remove, 2720 + .remove = imx_uart_remove, 2818 2721 2819 2722 .driver = { 2820 2723 .name = "imx-uart",
+1 -1
drivers/tty/serial/lantiq.c
··· 915 915 916 916 static struct platform_driver lqasc_driver = { 917 917 .probe = lqasc_probe, 918 - .remove_new = lqasc_remove, 918 + .remove = lqasc_remove, 919 919 .driver = { 920 920 .name = DRVNAME, 921 921 .of_match_table = ltq_asc_match,
+1 -1
drivers/tty/serial/liteuart.c
··· 353 353 354 354 static struct platform_driver liteuart_platform_driver = { 355 355 .probe = liteuart_probe, 356 - .remove_new = liteuart_remove, 356 + .remove = liteuart_remove, 357 357 .driver = { 358 358 .name = KBUILD_MODNAME, 359 359 .of_match_table = liteuart_of_match,
+1 -1
drivers/tty/serial/lpc32xx_hs.c
··· 695 695 696 696 static struct platform_driver serial_hs_lpc32xx_driver = { 697 697 .probe = serial_hs_lpc32xx_probe, 698 - .remove_new = serial_hs_lpc32xx_remove, 698 + .remove = serial_hs_lpc32xx_remove, 699 699 .suspend = serial_hs_lpc32xx_suspend, 700 700 .resume = serial_hs_lpc32xx_resume, 701 701 .driver = {
+1 -1
drivers/tty/serial/ma35d1_serial.c
··· 794 794 795 795 static struct platform_driver ma35d1serial_driver = { 796 796 .probe = ma35d1serial_probe, 797 - .remove_new = ma35d1serial_remove, 797 + .remove = ma35d1serial_remove, 798 798 .suspend = ma35d1serial_suspend, 799 799 .resume = ma35d1serial_resume, 800 800 .driver = {
+1 -1
drivers/tty/serial/mcf.c
··· 616 616 617 617 static struct platform_driver mcf_platform_driver = { 618 618 .probe = mcf_probe, 619 - .remove_new = mcf_remove, 619 + .remove = mcf_remove, 620 620 .driver = { 621 621 .name = "mcfuart", 622 622 },
+1 -1
drivers/tty/serial/meson_uart.c
··· 842 842 843 843 static struct platform_driver meson_uart_platform_driver = { 844 844 .probe = meson_uart_probe, 845 - .remove_new = meson_uart_remove, 845 + .remove = meson_uart_remove, 846 846 .driver = { 847 847 .name = "meson_uart", 848 848 .of_match_table = meson_uart_dt_match,
+1 -1
drivers/tty/serial/milbeaut_usio.c
··· 570 570 571 571 static struct platform_driver mlb_usio_driver = { 572 572 .probe = mlb_usio_probe, 573 - .remove_new = mlb_usio_remove, 573 + .remove = mlb_usio_remove, 574 574 .driver = { 575 575 .name = USIO_NAME, 576 576 .of_match_table = mlb_usio_dt_ids,
+1 -1
drivers/tty/serial/mpc52xx_uart.c
··· 1843 1843 1844 1844 static struct platform_driver mpc52xx_uart_of_driver = { 1845 1845 .probe = mpc52xx_uart_of_probe, 1846 - .remove_new = mpc52xx_uart_of_remove, 1846 + .remove = mpc52xx_uart_of_remove, 1847 1847 #ifdef CONFIG_PM 1848 1848 .suspend = mpc52xx_uart_of_suspend, 1849 1849 .resume = mpc52xx_uart_of_resume,
+1 -1
drivers/tty/serial/msm_serial.c
··· 1894 1894 }; 1895 1895 1896 1896 static struct platform_driver msm_platform_driver = { 1897 - .remove_new = msm_serial_remove, 1897 + .remove = msm_serial_remove, 1898 1898 .probe = msm_serial_probe, 1899 1899 .driver = { 1900 1900 .name = "msm_serial",
+1 -1
drivers/tty/serial/mxs-auart.c
··· 1704 1704 1705 1705 static struct platform_driver mxs_auart_driver = { 1706 1706 .probe = mxs_auart_probe, 1707 - .remove_new = mxs_auart_remove, 1707 + .remove = mxs_auart_remove, 1708 1708 .driver = { 1709 1709 .name = "mxs-auart", 1710 1710 .of_match_table = mxs_auart_dt_ids,
+1 -1
drivers/tty/serial/omap-serial.c
··· 1802 1802 1803 1803 static struct platform_driver serial_omap_driver = { 1804 1804 .probe = serial_omap_probe, 1805 - .remove_new = serial_omap_remove, 1805 + .remove = serial_omap_remove, 1806 1806 .driver = { 1807 1807 .name = OMAP_SERIAL_DRIVER_NAME, 1808 1808 .pm = &serial_omap_dev_pm_ops,
+1 -1
drivers/tty/serial/owl-uart.c
··· 730 730 731 731 static struct platform_driver owl_uart_platform_driver = { 732 732 .probe = owl_uart_probe, 733 - .remove_new = owl_uart_remove, 733 + .remove = owl_uart_remove, 734 734 .driver = { 735 735 .name = "owl-uart", 736 736 .of_match_table = owl_uart_dt_matches,
+1 -1
drivers/tty/serial/pic32_uart.c
··· 956 956 957 957 static struct platform_driver pic32_uart_platform_driver = { 958 958 .probe = pic32_uart_probe, 959 - .remove_new = pic32_uart_remove, 959 + .remove = pic32_uart_remove, 960 960 .driver = { 961 961 .name = PIC32_DEV_NAME, 962 962 .of_match_table = of_match_ptr(pic32_serial_dt_ids),
+1 -1
drivers/tty/serial/pmac_zilog.c
··· 1776 1776 1777 1777 static struct platform_driver pmz_driver = { 1778 1778 .probe = pmz_attach, 1779 - .remove_new = pmz_detach, 1779 + .remove = pmz_detach, 1780 1780 .driver = { 1781 1781 .name = "scc", 1782 1782 },
+1 -1
drivers/tty/serial/qcom_geni_serial.c
··· 1839 1839 MODULE_DEVICE_TABLE(of, qcom_geni_serial_match_table); 1840 1840 1841 1841 static struct platform_driver qcom_geni_serial_platform_driver = { 1842 - .remove_new = qcom_geni_serial_remove, 1842 + .remove = qcom_geni_serial_remove, 1843 1843 .probe = qcom_geni_serial_probe, 1844 1844 .driver = { 1845 1845 .name = "qcom_geni_serial",
+1 -1
drivers/tty/serial/rda-uart.c
··· 777 777 778 778 static struct platform_driver rda_uart_platform_driver = { 779 779 .probe = rda_uart_probe, 780 - .remove_new = rda_uart_remove, 780 + .remove = rda_uart_remove, 781 781 .driver = { 782 782 .name = "rda-uart", 783 783 .of_match_table = rda_uart_dt_matches,
+1 -1
drivers/tty/serial/sa1100.c
··· 880 880 881 881 static struct platform_driver sa11x0_serial_driver = { 882 882 .probe = sa1100_serial_probe, 883 - .remove_new = sa1100_serial_remove, 883 + .remove = sa1100_serial_remove, 884 884 .suspend = sa1100_serial_suspend, 885 885 .resume = sa1100_serial_resume, 886 886 .driver = {
+14 -1
drivers/tty/serial/samsung_tty.c
··· 2498 2498 .fifosize = { 256, 64, 64, 64 }, 2499 2499 }; 2500 2500 2501 + static const struct s3c24xx_serial_drv_data exynos8895_serial_drv_data = { 2502 + EXYNOS_COMMON_SERIAL_DRV_DATA, 2503 + /* samsung,uart-fifosize must be specified in the device tree. */ 2504 + .fifosize = { 0 }, 2505 + }; 2506 + 2501 2507 static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = { 2502 2508 .info = { 2503 2509 .name = "Google GS101 UART", ··· 2534 2528 #define EXYNOS4210_SERIAL_DRV_DATA (&exynos4210_serial_drv_data) 2535 2529 #define EXYNOS5433_SERIAL_DRV_DATA (&exynos5433_serial_drv_data) 2536 2530 #define EXYNOS850_SERIAL_DRV_DATA (&exynos850_serial_drv_data) 2531 + #define EXYNOS8895_SERIAL_DRV_DATA (&exynos8895_serial_drv_data) 2537 2532 #define GS101_SERIAL_DRV_DATA (&gs101_serial_drv_data) 2538 2533 2539 2534 #else 2540 2535 #define EXYNOS4210_SERIAL_DRV_DATA NULL 2541 2536 #define EXYNOS5433_SERIAL_DRV_DATA NULL 2542 2537 #define EXYNOS850_SERIAL_DRV_DATA NULL 2538 + #define EXYNOS8895_SERIAL_DRV_DATA NULL 2543 2539 #define GS101_SERIAL_DRV_DATA NULL 2544 2540 #endif 2545 2541 ··· 2631 2623 }, { 2632 2624 .name = "gs101-uart", 2633 2625 .driver_data = (kernel_ulong_t)GS101_SERIAL_DRV_DATA, 2626 + }, { 2627 + .name = "exynos8895-uart", 2628 + .driver_data = (kernel_ulong_t)EXYNOS8895_SERIAL_DRV_DATA, 2634 2629 }, 2635 2630 { }, 2636 2631 }; ··· 2657 2646 .data = ARTPEC8_SERIAL_DRV_DATA }, 2658 2647 { .compatible = "google,gs101-uart", 2659 2648 .data = GS101_SERIAL_DRV_DATA }, 2649 + { .compatible = "samsung,exynos8895-uart", 2650 + .data = EXYNOS8895_SERIAL_DRV_DATA }, 2660 2651 {}, 2661 2652 }; 2662 2653 MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match); ··· 2666 2653 2667 2654 static struct platform_driver samsung_serial_driver = { 2668 2655 .probe = s3c24xx_serial_probe, 2669 - .remove_new = s3c24xx_serial_remove, 2656 + .remove = s3c24xx_serial_remove, 2670 2657 .id_table = s3c24xx_serial_driver_ids, 2671 2658 .driver = { 2672 2659 .name = "samsung-uart",
+1 -1
drivers/tty/serial/sc16is7xx.c
··· 1473 1473 } 1474 1474 1475 1475 static const struct serial_rs485 sc16is7xx_rs485_supported = { 1476 - .flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND, 1476 + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND, 1477 1477 .delay_rts_before_send = 1, 1478 1478 .delay_rts_after_send = 1, /* Not supported but keep returning -EINVAL */ 1479 1479 };
+1 -1
drivers/tty/serial/sccnxp.c
··· 1052 1052 .name = SCCNXP_NAME, 1053 1053 }, 1054 1054 .probe = sccnxp_probe, 1055 - .remove_new = sccnxp_remove, 1055 + .remove = sccnxp_remove, 1056 1056 .id_table = sccnxp_id_table, 1057 1057 }; 1058 1058 module_platform_driver(sccnxp_uart_driver);
+1 -1
drivers/tty/serial/serial-tegra.c
··· 1648 1648 1649 1649 static struct platform_driver tegra_uart_platform_driver = { 1650 1650 .probe = tegra_uart_probe, 1651 - .remove_new = tegra_uart_remove, 1651 + .remove = tegra_uart_remove, 1652 1652 .driver = { 1653 1653 .name = "serial-tegra", 1654 1654 .of_match_table = tegra_uart_of_match,
+1 -1
drivers/tty/serial/serial_txx9.c
··· 1097 1097 1098 1098 static struct platform_driver serial_txx9_plat_driver = { 1099 1099 .probe = serial_txx9_probe, 1100 - .remove_new = serial_txx9_remove, 1100 + .remove = serial_txx9_remove, 1101 1101 #ifdef CONFIG_PM 1102 1102 .suspend = serial_txx9_suspend, 1103 1103 .resume = serial_txx9_resume,
+1 -1
drivers/tty/serial/sh-sci.c
··· 3505 3505 3506 3506 static struct platform_driver sci_driver = { 3507 3507 .probe = sci_probe, 3508 - .remove_new = sci_remove, 3508 + .remove = sci_remove, 3509 3509 .driver = { 3510 3510 .name = "sh-sci", 3511 3511 .pm = &sci_dev_pm_ops,
+1 -1
drivers/tty/serial/sifive.c
··· 1040 1040 1041 1041 static struct platform_driver sifive_serial_platform_driver = { 1042 1042 .probe = sifive_serial_probe, 1043 - .remove_new = sifive_serial_remove, 1043 + .remove = sifive_serial_remove, 1044 1044 .driver = { 1045 1045 .name = SIFIVE_SERIAL_NAME, 1046 1046 .pm = pm_sleep_ptr(&sifive_uart_pm_ops),
+37 -6
drivers/tty/serial/sprd_serial.c
··· 53 53 #define SPRD_IEN_TX_EMPTY BIT(1) 54 54 #define SPRD_IEN_BREAK_DETECT BIT(7) 55 55 #define SPRD_IEN_TIMEOUT BIT(13) 56 + #define SPRD_IEN_DATA_TIMEOUT BIT(17) 56 57 57 58 /* interrupt clear register */ 58 59 #define SPRD_ICLR 0x0014 59 60 #define SPRD_ICLR_TIMEOUT BIT(13) 61 + #define SPRD_ICLR_DATA_TIMEOUT BIT(17) 60 62 61 63 /* line control register */ 62 64 #define SPRD_LCR 0x0018 ··· 104 102 #define SPRD_IMSR_TX_FIFO_EMPTY BIT(1) 105 103 #define SPRD_IMSR_BREAK_DETECT BIT(7) 106 104 #define SPRD_IMSR_TIMEOUT BIT(13) 105 + #define SPRD_IMSR_DATA_TIMEOUT BIT(17) 107 106 #define SPRD_DEFAULT_SOURCE_CLK 26000000 108 107 109 108 #define SPRD_RX_DMA_STEP 1 ··· 121 118 bool enable; 122 119 }; 123 120 121 + struct sprd_uart_data { 122 + unsigned int timeout_ien; 123 + unsigned int timeout_iclr; 124 + unsigned int timeout_imsr; 125 + }; 126 + 124 127 struct sprd_uart_port { 125 128 struct uart_port port; 126 129 char name[16]; ··· 135 126 struct sprd_uart_dma rx_dma; 136 127 dma_addr_t pos; 137 128 unsigned char *rx_buf_tail; 129 + const struct sprd_uart_data *pdata; 138 130 }; 139 131 140 132 static struct sprd_uart_port *sprd_port[UART_NR_MAX]; ··· 143 133 144 134 static int sprd_start_dma_rx(struct uart_port *port); 145 135 static int sprd_tx_dma_config(struct uart_port *port); 136 + 137 + static const struct sprd_uart_data sc9836_data = { 138 + .timeout_ien = SPRD_IEN_TIMEOUT, 139 + .timeout_iclr = SPRD_ICLR_TIMEOUT, 140 + .timeout_imsr = SPRD_IMSR_TIMEOUT, 141 + }; 142 + 143 + static const struct sprd_uart_data sc9632_data = { 144 + .timeout_ien = SPRD_IEN_DATA_TIMEOUT, 145 + .timeout_iclr = SPRD_ICLR_DATA_TIMEOUT, 146 + .timeout_imsr = SPRD_IMSR_DATA_TIMEOUT, 147 + }; 146 148 147 149 static inline unsigned int serial_in(struct uart_port *port, 148 150 unsigned int offset) ··· 659 637 { 660 638 struct uart_port *port = dev_id; 661 639 unsigned int ims; 640 + struct sprd_uart_port *sp = 641 + container_of(port, struct sprd_uart_port, port); 662 642 663 643 uart_port_lock(port); 664 644 ··· 671 647 return IRQ_NONE; 672 648 } 673 649 674 - if (ims & SPRD_IMSR_TIMEOUT) 675 - serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT); 650 + if (ims & sp->pdata->timeout_imsr) 651 + serial_out(port, SPRD_ICLR, sp->pdata->timeout_iclr); 676 652 677 653 if (ims & SPRD_IMSR_BREAK_DETECT) 678 654 serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT); 679 655 680 656 if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT | 681 - SPRD_IMSR_TIMEOUT)) 657 + sp->pdata->timeout_imsr)) 682 658 sprd_rx(port); 683 659 684 660 if (ims & SPRD_IMSR_TX_FIFO_EMPTY) ··· 753 729 /* enable interrupt */ 754 730 uart_port_lock_irqsave(port, &flags); 755 731 ien = serial_in(port, SPRD_IEN); 756 - ien |= SPRD_IEN_BREAK_DETECT | SPRD_IEN_TIMEOUT; 732 + ien |= SPRD_IEN_BREAK_DETECT | sp->pdata->timeout_ien; 757 733 if (!sp->rx_dma.enable) 758 734 ien |= SPRD_IEN_RX_FULL; 759 735 serial_out(port, SPRD_IEN, ien); ··· 1208 1184 1209 1185 up->mapbase = res->start; 1210 1186 1187 + sport->pdata = of_device_get_match_data(&pdev->dev); 1188 + if (!sport->pdata) { 1189 + dev_err(&pdev->dev, "get match data failed!\n"); 1190 + return -EINVAL; 1191 + } 1192 + 1211 1193 irq = platform_get_irq(pdev, 0); 1212 1194 if (irq < 0) 1213 1195 return irq; ··· 1278 1248 static SIMPLE_DEV_PM_OPS(sprd_pm_ops, sprd_suspend, sprd_resume); 1279 1249 1280 1250 static const struct of_device_id serial_ids[] = { 1281 - {.compatible = "sprd,sc9836-uart",}, 1251 + {.compatible = "sprd,sc9836-uart", .data = &sc9836_data}, 1252 + {.compatible = "sprd,sc9632-uart", .data = &sc9632_data}, 1282 1253 {} 1283 1254 }; 1284 1255 MODULE_DEVICE_TABLE(of, serial_ids); 1285 1256 1286 1257 static struct platform_driver sprd_platform_driver = { 1287 1258 .probe = sprd_probe, 1288 - .remove_new = sprd_remove, 1259 + .remove = sprd_remove, 1289 1260 .driver = { 1290 1261 .name = "sprd_serial", 1291 1262 .of_match_table = serial_ids,
+1 -1
drivers/tty/serial/st-asc.c
··· 934 934 935 935 static struct platform_driver asc_serial_driver = { 936 936 .probe = asc_serial_probe, 937 - .remove_new = asc_serial_remove, 937 + .remove = asc_serial_remove, 938 938 .driver = { 939 939 .name = DRIVER_NAME, 940 940 .pm = pm_sleep_ptr(&asc_serial_pm_ops),
+1 -1
drivers/tty/serial/stm32-usart.c
··· 2188 2188 2189 2189 static struct platform_driver stm32_serial_driver = { 2190 2190 .probe = stm32_usart_serial_probe, 2191 - .remove_new = stm32_usart_serial_remove, 2191 + .remove = stm32_usart_serial_remove, 2192 2192 .driver = { 2193 2193 .name = DRIVER_NAME, 2194 2194 .pm = &stm32_serial_pm_ops,
+1 -1
drivers/tty/serial/sunhv.c
··· 633 633 .of_match_table = hv_match, 634 634 }, 635 635 .probe = hv_probe, 636 - .remove_new = hv_remove, 636 + .remove = hv_remove, 637 637 }; 638 638 639 639 static int __init sunhv_init(void)
+1 -1
drivers/tty/serial/sunplus-uart.c
··· 697 697 698 698 static struct platform_driver sunplus_uart_platform_driver = { 699 699 .probe = sunplus_uart_probe, 700 - .remove_new = sunplus_uart_remove, 700 + .remove = sunplus_uart_remove, 701 701 .driver = { 702 702 .name = "sunplus_uart", 703 703 .of_match_table = sp_uart_of_match,
+1 -1
drivers/tty/serial/sunsab.c
··· 1100 1100 .of_match_table = sab_match, 1101 1101 }, 1102 1102 .probe = sab_probe, 1103 - .remove_new = sab_remove, 1103 + .remove = sab_remove, 1104 1104 }; 1105 1105 1106 1106 static int __init sunsab_init(void)
+1 -1
drivers/tty/serial/sunsu.c
··· 1549 1549 .of_match_table = su_match, 1550 1550 }, 1551 1551 .probe = su_probe, 1552 - .remove_new = su_remove, 1552 + .remove = su_remove, 1553 1553 }; 1554 1554 1555 1555 static int __init sunsu_init(void)
+1 -1
drivers/tty/serial/sunzilog.c
··· 1538 1538 .of_match_table = zs_match, 1539 1539 }, 1540 1540 .probe = zs_probe, 1541 - .remove_new = zs_remove, 1541 + .remove = zs_remove, 1542 1542 }; 1543 1543 1544 1544 static int __init sunzilog_init(void)
+1 -1
drivers/tty/serial/tegra-tcu.c
··· 293 293 .of_match_table = tegra_tcu_match, 294 294 }, 295 295 .probe = tegra_tcu_probe, 296 - .remove_new = tegra_tcu_remove, 296 + .remove = tegra_tcu_remove, 297 297 }; 298 298 module_platform_driver(tegra_tcu_driver); 299 299
+1 -1
drivers/tty/serial/timbuart.c
··· 485 485 .name = "timb-uart", 486 486 }, 487 487 .probe = timbuart_probe, 488 - .remove_new = timbuart_remove, 488 + .remove = timbuart_remove, 489 489 }; 490 490 491 491 module_platform_driver(timbuart_platform_driver);
+1 -1
drivers/tty/serial/uartlite.c
··· 915 915 916 916 static struct platform_driver ulite_platform_driver = { 917 917 .probe = ulite_probe, 918 - .remove_new = ulite_remove, 918 + .remove = ulite_remove, 919 919 .driver = { 920 920 .name = "uartlite", 921 921 .of_match_table = of_match_ptr(ulite_of_match),
+1 -1
drivers/tty/serial/ucc_uart.c
··· 1484 1484 .of_match_table = ucc_uart_match, 1485 1485 }, 1486 1486 .probe = ucc_uart_probe, 1487 - .remove_new = ucc_uart_remove, 1487 + .remove = ucc_uart_remove, 1488 1488 }; 1489 1489 1490 1490 static int __init ucc_uart_init(void)
+1 -1
drivers/tty/serial/xilinx_uartps.c
··· 1903 1903 1904 1904 static struct platform_driver cdns_uart_platform_driver = { 1905 1905 .probe = cdns_uart_probe, 1906 - .remove_new = cdns_uart_remove, 1906 + .remove = cdns_uart_remove, 1907 1907 .driver = { 1908 1908 .name = CDNS_UART_NAME, 1909 1909 .of_match_table = cdns_uart_of_match,
+1 -1
drivers/tty/tty_io.c
··· 3631 3631 .data = &tty_ldisc_autoload, 3632 3632 .maxlen = sizeof(tty_ldisc_autoload), 3633 3633 .mode = 0644, 3634 - .proc_handler = proc_dointvec, 3634 + .proc_handler = proc_dointvec_minmax, 3635 3635 .extra1 = SYSCTL_ZERO, 3636 3636 .extra2 = SYSCTL_ONE, 3637 3637 },
+11
include/linux/eeprom_93cx6.h
··· 11 11 Supported chipsets: 93c46, 93c56 and 93c66. 12 12 */ 13 13 14 + #include <linux/bits.h> 15 + 14 16 /* 15 17 * EEPROM operation defines. 16 18 */ ··· 36 34 * @register_write(struct eeprom_93cx6 *eeprom): handler to 37 35 * write to the eeprom register by using all reg_* fields. 38 36 * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines 37 + * @quirks: eeprom or controller quirks 39 38 * @drive_data: Set if we're driving the data line. 40 39 * @reg_data_in: register field to indicate data input 41 40 * @reg_data_out: register field to indicate data output ··· 53 50 void (*register_write)(struct eeprom_93cx6 *eeprom); 54 51 55 52 int width; 53 + unsigned int quirks; 54 + /* Some EEPROMs require an extra clock cycle before reading */ 55 + #define PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE BIT(0) 56 56 57 57 char drive_data; 58 58 char reg_data_in; ··· 77 71 78 72 extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom, 79 73 u8 addr, u16 data); 74 + 75 + static inline bool has_quirk_extra_read_cycle(struct eeprom_93cx6 *eeprom) 76 + { 77 + return eeprom->quirks & PCI_EEPROM_QUIRK_EXTRA_READ_CYCLE; 78 + }
-1
include/linux/kfifo.h
··· 37 37 */ 38 38 39 39 #include <linux/array_size.h> 40 - #include <linux/dma-mapping.h> 41 40 #include <linux/spinlock.h> 42 41 #include <linux/stddef.h> 43 42 #include <linux/types.h>
-1
include/linux/platform_data/sa11x0-serial.h
··· 10 10 #define SA11X0_SERIAL_H 11 11 12 12 struct uart_port; 13 - struct uart_info; 14 13 15 14 /* 16 15 * This is a temporary structure for registering these
+1
samples/kfifo/dma-example.c
··· 9 9 #include <linux/kfifo.h> 10 10 #include <linux/module.h> 11 11 #include <linux/scatterlist.h> 12 + #include <linux/dma-mapping.h> 12 13 13 14 /* 14 15 * This module shows how to handle fifo dma operations.