Porting device driver from T4240RDB to LS2160ARDB

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

Porting device driver from T4240RDB to LS2160ARDB

ソリューションへジャンプ
1,800件の閲覧回数
bernardo
Contributor II

I'm porting a device driver from a T4240 platform to an LS2160 platform. I'm compiling it using the(Yocto 3.1.1 - Dunfell) fsl-toolchain environment set by: /opt/fsl-qoriq/aarch64/3.1.1/environment-setup-aarch64-fsl-linux 

The first issue I came across is that the source code includes <asm/pci-bridge.h> header file and such file is located in /build_lx2160ardb/tmp/work-shared/lx2160ardb/kernel-source/arch/powerpc/include/asm/pci-bridge.h 

Are header files under /arch/powerpc directory still valid for LS2160 platforms? If not, which header file would provide definitions such as: pci_bus_to_host()?

The .ko module built with the header above produces errors when I load it.

Any advice?

Thanks.

 

0 件の賞賛
返信
1 解決策
1,773件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

pci_find_host_bridge() isn't exported for loadable modules.

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,790件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Header files under /arch/powerpc directory are invalid for LX2160A platforms.

The function pci_bus_to_host is also invalid for LX2160A platforms, you could use similar function "pci_find_host_bridge" defined in include/linux/pci.h for ARM64 platforms.

0 件の賞賛
返信
1,779件の閲覧回数
bernardo
Contributor II

Thank you for the response. It was very helpful.

I went ahead and modified the code to include <linux/pci.h> and call "pci_find_host_bridge" instead but I'm getting a linker error: 

ERROR: "pci_find_host_bridge" [fsl_c29x_sec.ko] undefined!

Is that function reserved for built-in kernel modules or can it be used for loadable ones too?

Thanks.

0 件の賞賛
返信
1,774件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

pci_find_host_bridge() isn't exported for loadable modules.

 

0 件の賞賛
返信