cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
making_progress
Visitor
Visitor
331 Views
Registered: ‎05-13-2020

Petalinux2018.3 Encx24j600 driver Error

Hi all,

I am a newbie to Petalinux. recently I am trying to get PMOD NIC100 to work with Petalinux2018.3 on a Xilinx FPGA Microblaze processor(which is basically Microchip Enc424j600  Ethernet chip). 

First I just built the Petalinux, and verifies it works on the FPGA.

Then I use the same build, enable the encx24j600 driver inside Petalinux, by doing petalinux-config -c kernel.

Then I do petalinux-build, it gives me some syntax error, here are some examples :

  /home/xxxxxxxx/PFC_WORK/xxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:469:15: error: variable 'regcfg' has initializer but incomplete type
| static struct regmap_config regcfg = {
| ^~~~~~~~~~~~~
| /home/xxxxxxxxx/PFC_WORK/Ixxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:470:3: error: 'struct regmap_config' has no member named 'name'
| .name = "reg",
| ^~~~
| /home/xxxxxxxx/PFC_WORK/Ixxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:470:10: warning: excess elements in struct initializer
| .name = "reg",
| ^~~~~

/home/xxxxxxx/PFC_WORK/xxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:513:16: error: implicit declaration of function 'devm_regmap_init'; did you mean 'dev_mc_init'? [-Werror=implicit-function-declaration]
| ctx->regmap = devm_regmap_init(dev, &regmap_encx24j600, ctx, &regcfg);
| ^~~~~~~~~~~~~~~~
| dev_mc_init
| /home/xxxxxxxxx/PFC_WORK/xxxxxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:513:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
| ctx->regmap = devm_regmap_init(dev, &regmap_encx24j600, ctx, &regcfg);
| ^
| /home/xxxxxxxxxxxxxx/PFC_WORK/Ixxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:514:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
| ctx->phymap = devm_regmap_init(dev, &phymap_encx24j600, ctx, &phycfg);
| ^
| /home/xxxxxxxxxxxx/PFC_WORK/xxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c: At top level:
| /home/xxxxxxxxxxxx/PFC_WORK/xxxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work-shared/plnx-microblazeel/kernel-source/drivers/net/ethernet/microchip/encx24j600-regmap.c:469:29: error: storage size of 'regcfg' isn't known
| static struct regmap_config regcfg = {

| ERROR: oe_runmake failed
| WARNING: /home/xxxxxxxxxx/PFC_WORK/xxxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work/plnx_microblazeel-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/temp/run.do_compile.29229:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/xxxxxxxxxxxxxxxxx/PFC_WORK/xxxxxxxxxx/vivado_linux_jian/petalinux_eth2/build/tmp/work/plnx_microblazeel-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.3+gitAUTOINC+eeab73d120-r0/temp/log.do_compile.29229)
ERROR: Task (/home/xxxxxxxxxx/PFC_WORK/xxxxxxxxxxx/PetaLinux_Install/2018.3/components/yocto/source/microblaze_full/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2785 tasks of which 2784 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/xxxxxxxxxxx/PFC_WORK/xxxxxxxxxx/PetaLinux_Install/2018.3/components/yocto/source/microblaze_full/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2018.3.bb:do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

I am tried everything I can do to fix the syntax error, no matter what, it won't all go away. What I found is, in one of the header file, called regmap.h, there is #ifdef Config_regmap, which has all the functions in this statement. However the Config_regmap is not defined anywhere. 

I have been stuck on this for several days, please help. 

0 Kudos
0 Replies