I.MX6Q FEC driver Compile into KO modules

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I.MX6Q FEC driver Compile into KO modules

933件の閲覧回数
jerry2004
Contributor I
Currently, the FEC driver on the imx6 platform is compiled with the entire system, and the kernel version is 3.0。All functions are OK
However, due to other special reasons, after the system is running, it is necessary to perform a RESET action on the PHY chip, which requires the driver to match again. Therefore, I wonder if it is possible to compile the FEC driver into a module form without restarting the system

Firstly, it is not possible to compile the FEC driver into the M option in the kernel configuration

jerry2004_0-1695892522166.png

Forcibly modifying the makefile can generate fec.ko。But during insmod and rmmod, it may crash due to clcok matching issues

jerry2004_1-1695892758247.png

What is the way to make fec.ko load and unload normally

 

 

0 件の賞賛
返信
3 返答(返信)

914件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @jerry2004,

I hope you are doing well.

Please make sure to check the module support is enabled.
CONFIG_MODULES=y
Otherwise, one won't be able to load the modules.

Please check the drivers that are sued for FEC are included in the device tree one is loading.
It is also recommended to check the FEC driver one is using and compiling is compatible with the kernel version that is being used, Please check that as well.

It is also recommended to use the latest kernel version, So if possible please upgrade the kernel to have updated drivers as well as fw.

Thanks & Regards,
Sanket parekh

0 件の賞賛
返信

891件の閲覧回数
jerry2004
Contributor I

Hello @Sanket_Parekh 

    Yes ,the module support is enabled.,CONFIG_MODULES=y.Because other driver modules can be loaded as modules。What I want to know is that FEC drivers themselves cannot be loaded as modules?

The kernel version of our product is relatively old, and this version has not yet enabled the device tree architecture. The version number is 3.0.101

We have formed a stable product and will not consider upgrading the kernel version. I just want to confirm whether the FEC driver can be compiled into a ko module on the current 3.0.101 version. Thank you

0 件の賞賛
返信

874件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @jerry2004,

I hope you are doing well.

What I want to know is that FEC drivers themselves cannot be loaded as modules?
->I have mentioned the changes one has to make in order to make drivers as a module or built-in to the kernel.

Please check the defconfig as mentioned below in your source code and make the below changes.
https://github.com/nxp-imx/linux-imx/blob/imx_3.0.101_caf/arch/arm/configs/imx6_defconfig

CONFIG_FEC=y
CONFIG_FEC_NAPI=y


(if one wants to build it as a module then set it as m)

Please also check the FEC driver compilation entry in the make file as given below.
https://github.com/nxp-imx/linux-imx/blob/imx_3.0.101_caf/drivers/net/Makefile

obj-$(CONFIG_FEC) += fec.o

Please make sure to check the Kconfig file and the config FEC node in the below link.
https://github.com/nxp-imx/linux-imx/blob/imx_3.0.101_caf/drivers/net/Kconfig

config FEC -> Select Y here if you want to use the built-in 10/100 Fast ethernet controller on some Motorola ColdFire and Freescale i.MX processors.

I hope this helps!

Thanks & Regards,
Sanket Parekh

0 件の賞賛
返信