Camera在linux2635内核下的移植.docVIP

  • 0
  • 0
  • 约6.45千字
  • 约 8页
  • 2019-10-27 发布于湖北
  • 举报
Camera驱动在Linux内核的移植 移植环境: 【移植环境】 1、?主机:Ubuntu 10.10发行版 2、?目标机:FS_S5PC100平台 3、?交叉编译工具:arm-none-linux-gnueabi-4.5.1 4、 摄像头模块:OV9650 5、Linux文件系统:rootfs. cramfs. 6、内核:linux-2.6.35-farsigt 内核配置 1.修改vi drivers/i2c/busses/Kconfig (参考实验二十六 I2C驱动编写及测试) 修改 config I2C_S3C2410 tristate S3C2410 I2C Driver depends on ARCH_S3C2410 || ARCH_S3C64XX help Say Y here to include support for I2C controller in the Samsung S3C2410 based System-on-Chip devices. 为: config I2C_S3C2410 tristate S3C2410 I2C Driver depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PC100 help Say Y here to include support for I2C controller in the Samsung S3C2410 based System-on-Chip devices. 2.内核配置并重新编译内核 $ make menuconfig Device Drivers --- * I2C support --- * I2C device interface I2C Hardware Bus support --- * S3C2410 I2C Driver 3.修改vi arch/arm/mach-s5pc100/mach-smdkc100.c 查看原理图可以知道我们的摄像头是接在I2C-1上所以修改i2c_devs1添加ov9650的内容,主要是ov9650的地址,这个在芯片手册上可以查到是0x30 修改: static struct i2c_board_info i2c_devs1[] __initdata = { }; 为: static struct i2c_board_info i2c_devs1[] __initdata = { { I2C_BOARD_INFO(ov9650, 0x30), }, }; 添加s5pc100 摄像头控制器平台设备相关内容,这些内容我们可以通过查看S5PC100的芯片手册查到 static struct resource s3c_camif_resource[] = { [0] = { .start = 0xEE200000, .end = 0xEE200000 + SZ_1M - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = IRQ_FIMC0, .end = IRQ_FIMC0, .flags = IORESOURCE_IRQ, } }; static u64 s3c_device_camif_dmamask = 0xffffffffUL; struct platform_device s3c_device_camif = { .name = s5pc100-camif, .id = 0, .num_resources = ARRAY_SIZE(s3c_camif_resource), .resource = s3c_camif_resource, .dev = { .dma_mask = s3c_device_camif_dmamask, .coherent_dma_mask = 0xffffffffUL } }; EXPORT_SYMBOL(s3c_device_camif); 注册摄像头控制平台设备: 在smdkc100_devices中添加s3c_device_camif static struct platform_device *smdkc100_devices[] __initdata = { s3c_device_camif, //添加内容 }; 4. 添加驱动(video) Make menuconfig Device Drivers --- * Multimedia support --- * Vide

文档评论(0)

1亿VIP精品文档

相关文档