my platform base on imx8mm, and found the uar4 controller driver will be crash when read the uar4 register. my uart4 dts setting as follow:
uart4: serial@30a60000 {
compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
reg = <0x30a60000 0x10000>;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_UART4_ROOT>,
<&clk IMX8MM_CLK_UART4_ROOT>;
clock-names = "ipg", "per";
dmas = <&sdma1 28 4 0>, <&sdma1 29 4 0>;
dma-names = "rx", "tx";
status = "disabled";
};
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
status = "okay";
};
the uart4 controller driver code file is : linux-imx/drivers/tty/serial/imx.c, the root cause code is :
sport->ucr1 = readl(sport->port.membase + UCR1);
sport->ucr2 = readl(sport->port.membase + UCR2);
sport->ucr3 = readl(sport->port.membase + UCR3);
sport->ucr4 = readl(sport->port.membase + UCR4);
sport->ufcr = readl(sport->port.membase + UFCR);
if I disable the uart4 driver, and use the devmem cmd to read this register directly(such as "devmem 0x30a60000"), same crash issue will be observed, and the crash log as follow.
[ 57.656313] audit: type=1701 audit(1599913043.500:3): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1069 comm="devmem" exe="/usr/bin/busybox" sig=7 res=1
Bus error (core dumped)
Tt seems that it was hardware issue, please help to check. the imx.c can be found in attach file.