Hello,
While designing an iMX6ULL based device we've encountered an issue with reading/writing after ioremap.
DT and .config are attached.
The problems takes on two forms:
The system hangs happen when accessing:
We use this snippet to reproduce the issue:
/* DEBUG START */
{
void __iomem *test_addr;
printk(KERN_CRIT "%s:%d\n", __func__, __LINE__);
test_addr = ioremap(0x020b8000, 0x4000);
if (IS_ERR(test_addr)) {
printk(KERN_CRIT "%s:%d ioremap failed\n", __func__, __LINE__);
} else {
printk(KERN_CRIT "%s:%d ioremap OK\n", __func__, __LINE__);
}
// System hangs here:
printk(KERN_CRIT "%s:%d\nKPP: 0x%04x\n", __func__, __LINE__,
readw(test_addr + 0)
);
iounmap(test_addr);
}
/* DEBUG END */
Do you have any advice?
Thanks!
Solved! Go to Solution.
We found that imx6ull.dtsi in the kpp node doesn't have a proper clocks definition:
kpp: kpp@020b8000 {
compatible = "fsl,imx6ul-kpp", "fsl,imx21-kpp";
reg = <0x020b8000 0x4000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_DUMMY>;
status = "disabled";
};
instead, the "clocks" property should be:
clocks = <&clks IMX6UL_CLK_KPP>;
The same goes for EIM.
We found that imx6ull.dtsi in the kpp node doesn't have a proper clocks definition:
kpp: kpp@020b8000 {
compatible = "fsl,imx6ul-kpp", "fsl,imx21-kpp";
reg = <0x020b8000 0x4000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_DUMMY>;
status = "disabled";
};
instead, the "clocks" property should be:
clocks = <&clks IMX6UL_CLK_KPP>;
The same goes for EIM.
Hi Aleksandr
one can try with official nxp linux releases described on
for issues with linux-fslc (community version bsp) one can post on meta-fsl-arm mailing list
https://lists.yoctoproject.org/listinfo/meta-freescale
Difference between them is described on
FSL Community BSP Release Notes 2.3 documentation
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------