文章分类 - Linux驱动
摘要:最近这一两个月研究AM3730的GPMC与 FPGA的通信,我负责的主要是涉及到GPMC这一块,由于之前就没有Linux基础,刚开始的时候进展很慢,还时不时的面临来自外界的压力,所以那会很 痛苦。前一个月用来熟悉Linux和摸清一个方向,摸清GPMC在内核的目录之后,开始真正的GPMC之旅。GPMC用百度搜索,百度百科会告诉你是什么组策略管理控制台,所以关于硬件GPMC(TI所特有的总线)的中文资料很少,我觉得很有必要把自己做的东西分享一下,本人刚接触Linux驱动,水平有限不对的地方望指教。整个GPMC做完之后会发现其实它很简单,只是在刚开始做的时候会对它的控制机制不太清楚,花费不少时间去读
阅读全文
摘要:driver.c:#include #include #include #include #include #include #define DRIVER_NAME "my_dev"static int my_probe(struct device *dev){ printk("driver found device !!\n"); return 0;}static int my_remove(struct device *dev){ printk("driver found device unpluged !!\n"); retur
阅读全文
摘要:int platform_driver_register(struct platform_driver *drv){ drv->driver.bus = &platform_bus_type;/*关联总线*/ /*关联driver的设备方法*/ if (drv->probe) drv->driver.probe = platform_drv_probe; if (drv->remove) drv->driver.remove = platform_drv_remove; if (drv->shutdown) drv->dr...
阅读全文