Commit 1519fc7c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tty/serial fixes from Greg KH:
 "Here are some small tty and serial driver fixes for 6.17-rc6 that
  resolve some reported problems. Included in here are:

   - 8250 driver dt bindings fixes

   - broadcom serial driver binding fixes

   - hvc_console bugfix

   - xilinx serial driver bugfix

   - sc16is7xx serial driver bugfix

  All of these have been in linux-next for the past week with no
  reported issues"

* tag 'tty-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: xilinx_uartps: read reg size from DTS
  tty: hvc_console: Call hvc_kick in hvc_write unconditionally
  dt-bindings: serial: 8250: allow "main" and "uart" as clock names
  dt-bindings: serial: 8250: move a constraint
  dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
  serial: sc16is7xx: fix bug in flow control levels init
parents d6b42787 b5e3277c
Loading
Loading
Loading
Loading
+31 −25
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ allOf:
      oneOf:
        - required: [ clock-frequency ]
        - required: [ clocks ]

  - if:
      properties:
        compatible:
@@ -60,12 +59,39 @@ allOf:
          items:
            - const: uartclk
            - const: reg
    else:
  - if:
      properties:
        compatible:
          contains:
            const: spacemit,k1-uart
    then:
      properties:
        clock-names:
          items:
            - const: core
            - const: bus
  - if:
      properties:
        compatible:
          contains:
            enum:
              - spacemit,k1-uart
              - nxp,lpc1850-uart
    then:
      required:
        - clocks
        - clock-names
      properties:
        clocks:
          minItems: 2
        clock-names:
          minItems: 2
    else:
      properties:
        clocks:
          maxItems: 1
        clock-names:
          maxItems: 1

properties:
  compatible:
@@ -162,6 +188,9 @@ properties:
    minItems: 1
    maxItems: 2
    oneOf:
      - enum:
          - main
          - uart
      - items:
          - const: core
          - const: bus
@@ -264,29 +293,6 @@ required:
  - reg
  - interrupts

if:
  properties:
    compatible:
      contains:
        enum:
          - spacemit,k1-uart
          - nxp,lpc1850-uart
then:
  required:
    - clocks
    - clock-names
  properties:
    clocks:
      minItems: 2
    clock-names:
      minItems: 2
else:
  properties:
    clocks:
      maxItems: 1
    clock-names:
      maxItems: 1

unevaluatedProperties: false

examples:
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ properties:
          - const: dma_intr2

  clocks:
    minItems: 1
    maxItems: 1

  clock-names:
    const: sw_baud
+3 −3
Original line number Diff line number Diff line
@@ -543,9 +543,9 @@ static ssize_t hvc_write(struct tty_struct *tty, const u8 *buf, size_t count)
	}

	/*
	 * Racy, but harmless, kick thread if there is still pending data.
	 * Kick thread to flush if there's still pending data
	 * or to wakeup the write queue.
	 */
	if (hp->n_outbuf)
	hvc_kick();

	return written;
+2 −12
Original line number Diff line number Diff line
@@ -1177,17 +1177,6 @@ static int sc16is7xx_startup(struct uart_port *port)
	sc16is7xx_port_write(port, SC16IS7XX_FCR_REG,
			     SC16IS7XX_FCR_FIFO_BIT);

	/* Enable EFR */
	sc16is7xx_port_write(port, SC16IS7XX_LCR_REG,
			     SC16IS7XX_LCR_CONF_MODE_B);

	regcache_cache_bypass(one->regmap, true);

	/* Enable write access to enhanced features and internal clock div */
	sc16is7xx_port_update(port, SC16IS7XX_EFR_REG,
			      SC16IS7XX_EFR_ENABLE_BIT,
			      SC16IS7XX_EFR_ENABLE_BIT);

	/* Enable TCR/TLR */
	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
			      SC16IS7XX_MCR_TCRTLR_BIT,
@@ -1199,7 +1188,8 @@ static int sc16is7xx_startup(struct uart_port *port)
			     SC16IS7XX_TCR_RX_RESUME(24) |
			     SC16IS7XX_TCR_RX_HALT(48));

	regcache_cache_bypass(one->regmap, false);
	/* Disable TCR/TLR access */
	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG, SC16IS7XX_MCR_TCRTLR_BIT, 0);

	/* Now, initialize the UART */
	sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, SC16IS7XX_LCR_WORD_LEN_8);
+5 −5
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#define CDNS_UART_MINOR		0	/* works best with devtmpfs */
#define CDNS_UART_NR_PORTS	16
#define CDNS_UART_FIFO_SIZE	64	/* FIFO size */
#define CDNS_UART_REGISTER_SPACE	0x1000
#define TX_TIMEOUT		500000

/* Rx Trigger level */
@@ -1098,15 +1097,15 @@ static int cdns_uart_verify_port(struct uart_port *port,
 */
static int cdns_uart_request_port(struct uart_port *port)
{
	if (!request_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE,
	if (!request_mem_region(port->mapbase, port->mapsize,
					 CDNS_UART_NAME)) {
		return -ENOMEM;
	}

	port->membase = ioremap(port->mapbase, CDNS_UART_REGISTER_SPACE);
	port->membase = ioremap(port->mapbase, port->mapsize);
	if (!port->membase) {
		dev_err(port->dev, "Unable to map registers\n");
		release_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE);
		release_mem_region(port->mapbase, port->mapsize);
		return -ENOMEM;
	}
	return 0;
@@ -1121,7 +1120,7 @@ static int cdns_uart_request_port(struct uart_port *port)
 */
static void cdns_uart_release_port(struct uart_port *port)
{
	release_mem_region(port->mapbase, CDNS_UART_REGISTER_SPACE);
	release_mem_region(port->mapbase, port->mapsize);
	iounmap(port->membase);
	port->membase = NULL;
}
@@ -1780,6 +1779,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
	 * and triggers invocation of the config_port() entry point.
	 */
	port->mapbase = res->start;
	port->mapsize = resource_size(res);
	port->irq = irq;
	port->dev = &pdev->dev;
	port->uartclk = clk_get_rate(cdns_uart_data->uartclk);