AnsweredAssumed Answered

undefined reference to `imx_add_mipi_dsi' `imx6q_mipi_dsi_data'

Question asked by jiang shao on Nov 21, 2016
Latest reply on Nov 24, 2016 by jiang shao

最近因为对应mipi接口的lcd,在/kernel_imx/arch/arm/mach-mx6/board-mx6q_sabresd.c中打开
imx6q_add_mipi_dsi(&mipi_dsi_pdata);的注释

// change by shao, 2016-11-16
// imx6q_add_mipi_dsi(&mipi_dsi_pdata);
imx6q_add_mipi_dsi(&mipi_dsi_pdata);

 

内核配置中,CONFIG_FB_MXC_MIPI_DSI=y

 

编译出现了错误:
arch/arm/mach-mx6/built-in.o: In function `mx6_sabresd_board_init':
/media/myandroid/work/20161018newB/kernel_imx/arch/arm/mach-mx6/board-mx6q_sabresd.c:2272: undefined reference to `imx_add_mipi_dsi'
/media/myandroid/work/20161018newB/kernel_imx/arch/arm/mach-mx6/board-mx6q_sabresd.c:2474: undefined reference to `imx6q_mipi_dsi_data'
make: *** [.tmp_vmlinux1] 错误 1

 

而确认board-mx6q_sabresd.c包含的头文件devices-imx6q.h中,明明有如下定义:
extern const struct imx_mipi_dsi_data imx6q_mipi_dsi_data __initconst;
#define imx6q_add_mipi_dsi(pdata) \
imx_add_mipi_dsi(&imx6q_mipi_dsi_data, pdata)

 

且devices-imx6q.h包含的头文件/kernel_imx/arch/arm/plat-mxc/include/mach/devices-common.h
中,也有如下定义:
#include <mach/mipi_dsi.h>
struct imx_mipi_dsi_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_mipi_dsi(
const struct imx_mipi_dsi_data *data,
const struct mipi_dsi_platform_data *pdata);

 

make distclean也都试过了,错误依旧,

 

有哪位知道为什么吗?

Outcomes