If use dma pool when iram does not exist, the iram_pool will be NULL.
The previous version of lib/genalloc.c will check the pointer status
first. In 5.4, it will not check NULL pointer.
Therefore, add NULL check here.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Upstream rejected ARCH_FSL_IMX8QM so just depend on ARCH_MXC or
COMPILE_TEST.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Because CONFIG_ARCH_MXC_ARM64 is not used since 4.19, add devtype in
imx_mlb_hwdata to distinguish between imx6 and imx8 platform when init
the ipg and hclk clocks.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Due to IP integration difference, there are 2 ahb irqs
for imx6 and only 1 ahb irq for imx8. This patch makes
mlb driver compatible with irq difference.
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
mlb 6 pin mode is not supported in current release,
so remove clk for mlb 6 pin mode.
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
alloc mlb data buffer from dma pool when iram doesn't exist
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
As a result that the wrong operation is used for the mlb status
in mlb_isr(), some results are independent of their operations.
for example:
rx_cis = (cdt_val[2] & ~MASK) >> SHIFT, where, MASK = 0xf0000000
and SHIFT = 28. So, the result is always 0 regardless of the values
of its operands.
This patch fixes the operation for mlb status in mlb_isr().
(reported by coverity check)
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
After coverity code check, it tips:
unsigned_compare: This less-than-zero comparison of an unsigned value is
never true.
Interrupt variable must be signed type.
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
As per commit 6aa7de0591 ("locking/atomics: COCCINELLE/treewide: Convert
trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()"), replace
ACCESS_ONCE with READ_ONCE to fix the compilation errors.
drivers/mxc/mlb/mxc_mlb.c: In function ‘mlb_rx_isr’:
drivers/mxc/mlb/mxc_mlb.c:1664:9: error: implicit declaration of function ‘ACCESS_ONCE’; did you mean ‘READ_ONCE’? [-Werror=implicit-function-declaration]
tail = ACCESS_ONCE(rx_rbuf->tail);
^~~~~~~~~~~
READ_ONCE
CC drivers/of/of_mdio.o
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
Add mlb support on imx_4.1.y. The files are copied from imx_3.14.y.
Signed-off-by: Gao Pan <b54642@freescale.com>
(Vipul: Fixed merge conflicts)
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit 24e36b318a29d85c0c4491076416343ade1f344e)