Hi, L4hackers,
I am implementing I2C drivers from native linux to L4Linux. I am using Freescale iMX6Q SD board. Kernel version 3.14
in ./drivers/i2c/busses/i2c-imx.c, function i2c_imx_probe(),
devm_clk_get() is called. And fails at here. I understand that clock are initialized from function "__init imx6q_clocks_init()". I managed to compile and call the imx6q_clocks_init() function from L4Linux, but encountered many problem.
The question is, Is it necessary to initialize clocks in L4Linux and how?
Thanks in advance?
-Yunchuan
Hi Yunchuan,
Am 08.08.2014 um 10:49 schrieb Yunchuan Geng:
Hi, L4hackers,
I am implementing I2C drivers from native linux to L4Linux. I am using Freescale iMX6Q SD board. Kernel version 3.14
in ./drivers/i2c/busses/i2c-imx.c, function i2c_imx_probe(),
devm_clk_get() is called. And fails at here. I understand that clock are initialized from function "__init imx6q_clocks_init()". I managed to compile and call the imx6q_clocks_init() function from L4Linux, but encountered many problem.
The question is, Is it necessary to initialize clocks in L4Linux and how?
I had the same problem with clocking of the network driver in fec_main.c. My approach is to do the clock setup outside of l4linux, preferably let the bootloader (U-Boot) do this for me. So when the driver is probed all clock setup can be skipped in the driver.
Martin
Hi Martin,
Thanks for the response.
First I do not know how to do it from U-Boot. But I found it might better to do it in mach_setup.c where l4x_arm_devices_init() is called.
However, I checked the implementation of native linux, it use Device Tree Blob to feed initialize process with data. It would be great if I could load dtb into L4Linux too. Otherwise, a lot of modification job are needed.
I noticed in this tread, you have asked a question about dtb, and Adam give a answer. https://www.mail-archive.com/l4-hackers%40os.inf.tu-dresden.de/msg06539.html Did you get success?
-Yunchuan
On 08/08/2014 01:20 PM, Martin Schröder wrote:
Hi Yunchuan,
Am 08.08.2014 um 10:49 schrieb Yunchuan Geng:
Hi, L4hackers,
I am implementing I2C drivers from native linux to L4Linux. I am using Freescale iMX6Q SD board. Kernel version 3.14
in ./drivers/i2c/busses/i2c-imx.c, function i2c_imx_probe(),
devm_clk_get() is called. And fails at here. I understand that clock are initialized from function "__init imx6q_clocks_init()". I managed to compile and call the imx6q_clocks_init() function from L4Linux, but encountered many problem.
The question is, Is it necessary to initialize clocks in L4Linux and how?
I had the same problem with clocking of the network driver in fec_main.c. My approach is to do the clock setup outside of l4linux, preferably let the bootloader (U-Boot) do this for me. So when the driver is probed all clock setup can be skipped in the driver.
Martin
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Hi Yunchuan,
Am 08.08.2014 um 12:33 schrieb Yunchuan Geng:
Hi Martin,
Thanks for the response.
First I do not know how to do it from U-Boot.
in U-Boot you can write to registers by the mw command. A sequence of them in the bootcmd can do the clock setup. Or you add i2c support to U-Boot and it will do the initialisation for you. This works at least for ethernet on my board.
But I found it might better to do it in mach_setup.c where l4x_arm_devices_init() is called.
Of course you can do it from within l4linux but you need to expose the registers of the Clock Generator Block to l4linux. The main drawback of this solution is that this l4linux task can now modify the clocking of every other HW device even if it is caged in another l4-task.
However, I checked the implementation of native linux, it use Device Tree Blob to feed initialize process with data. It would be great if I could load dtb into L4Linux too. Otherwise, a lot of modification job are needed.
I noticed in this tread, you have asked a question about dtb, and Adam give a answer. https://www.mail-archive.com/l4-hackers%40os.inf.tu-dresden.de/msg06539.html
Did you get success?
Not yet. I noticed that feature was introduced first in the latest snapshot so I am still busy upgrading my workspace.
Martin
l4-hackers@os.inf.tu-dresden.de