1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/tty/serial/8250
Robert Hancock d06b1cf282 serial: 8250: of: Fix mapped region size when using reg-offset property
8250_of supports a reg-offset property which is intended to handle
cases where the device registers start at an offset inside the region
of memory allocated to the device. The Xilinx 16550 UART, for which this
support was initially added, requires this. However, the code did not
adjust the overall size of the mapped region accordingly, causing the
driver to request an area of memory past the end of the device's
allocation. For example, if the UART was allocated an address of
0xb0130000, size of 0x10000 and reg-offset of 0x1000 in the device
tree, the region of memory reserved was b0131000-b0140fff, which caused
the driver for the region starting at b0140000 to fail to probe.

Fix this by subtracting reg-offset from the mapped region size.

Fixes: b912b5e2cf ([POWERPC] Xilinx: of_serial support for Xilinx uart 16550.)
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20220112194214.881844-1-robert.hancock@calian.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-26 14:50:52 +01:00
..
8250.h serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_alpha.c serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_aspeed_vuart.c serial: 8250: fix handle_irq locking 2021-07-21 12:53:26 +02:00
8250_bcm2835aux.c serial: 8250: Simplify with dev_err_probe() 2020-09-04 17:14:29 +02:00
8250_bcm7271.c serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure 2022-01-06 15:53:49 +01:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_core.c serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
8250_dma.c serial: 8250: factor out serial8250_{set,clear}_THRI() helpers 2019-06-18 09:36:55 +02:00
8250_dw.c serial: 8250_dw: Add StarFive JH7100 quirk 2021-11-25 18:33:45 +01:00
8250_dwlib.c serial: 8250_lpss: Extract dw8250_do_set_termios() for common use 2021-10-10 15:22:34 +02:00
8250_dwlib.h serial: 8250_lpss: Extract dw8250_do_set_termios() for common use 2021-10-10 15:22:34 +02:00
8250_early.c tty: serial: 8250: 8250_port: Move prototypes to shared location 2020-11-13 15:28:12 +01:00
8250_em.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
8250_exar.c serial: 8250_exar: Add ->unregister_gpio() callback 2021-07-21 12:48:47 +02:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fintek.c serial: 8250_fintek: Fix garbled text for console 2021-12-15 21:51:07 +01:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c serial: 8250_fsl: Move fsl8250_data to ACPI section 2021-09-22 16:59:13 +02:00
8250_gsc.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
8250_hp300.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c serial: 8250_ingenic: Use of_device_get_match_data 2021-08-26 14:51:10 +02:00
8250_ioc3.c Fix up remaining devm_ioremap_nocache() in SGI IOC3 8250 UART driver 2020-02-08 14:19:39 -08:00
8250_lpc18xx.c tty: Remove dev_err() usage after platform_get_irq() 2019-09-04 12:43:49 +02:00
8250_lpss.c serial: 8250_lpss: Enable PSE UART Auto Flow Control 2021-10-10 15:22:35 +02:00
8250_men_mcb.c 8250-men-mcb: fix signed/unsigned confusion 2020-06-27 16:12:45 +02:00
8250_mid.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_mtk.c serial: 8250_mtk: fix uart corruption issue when rx power off 2021-07-29 17:06:37 +02:00
8250_of.c serial: 8250: of: Fix mapped region size when using reg-offset property 2022-01-26 14:50:52 +01:00
8250_omap.c serial: 8250: 8250_omap: Fix RX_LVL register offset 2021-09-14 10:06:37 +02:00
8250_pci.c tty: Add support for Brainboxes UC cards. 2022-01-26 14:49:29 +01:00
8250_pericom.c serial: 8250_pericom: Use serial_dl_write() instead of open coded 2021-12-20 16:55:22 +01:00
8250_pnp.c serial: 8250: remove duplicated BRI0A49 and BDP3336 entries 2021-09-22 16:59:13 +02:00
8250_port.c Revert "tty: serial: Use fifo in 8250 console driver" 2022-01-26 14:33:58 +01:00
8250_pxa.c serial: 8250_pxa: Switch to use platform_get_irq() 2020-06-27 16:12:56 +02:00
8250_tegra.c 8250_tegra: clean up tegra_uart_handle_break 2021-01-07 16:17:31 +01:00
8250_uniphier.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig serial: 8250_pci: Split out Pericom driver 2021-12-20 16:55:22 +01:00
Makefile serial: 8250: Move Alpha-specific quirk out of the core 2021-12-30 13:23:44 +01:00
serial_cs.c serial_cs: Add Option International GSM-Ready 56K/ISDN modem 2021-06-16 09:20:29 +02:00