Linux 2.6.34内核代码更改
Linux 2.6.34内核代码更改
\arch\arm\mach-at91\board-sam9m10g45ek.c中:
1、static struct mtd_partition __initdata ek_nand_partition[] = {
};
2、
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
};
3、串口更改处:
arch/arm/amch-at91/board-sam9m10g45ek.c
static void __init ek_map_io(void)函数中
at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS| ATMEL_UART_RTS); //设置串口1为ttyS2,启动硬件流控制 CTS、RTS,在用PC串口调试助手时要注意打开CTS和RTS这样才能接受到数据,如果和51单片机之类没有CTS和RTS的可以直接通信
at91_set_serial_console(0); // 设置 ttyS0 为控制台借口,即DBUG接口
4、当要使用到GPIO来做驱动(动态)时,驱动中包含
#include <mach/board.h>
#include <mach/gpio.h>
内核GPIO 驱动文件位置:
\linux-2.6.30\linux-2.6.30\arch\arm\mach-at91\gpio.c:
static const struct file_operations at91_gpio_operations = {
}; //非标准C,是GNU的扩展语法.
static int __init at91_gpio_debugfs_init(void)
{
}
static int __init at91_gpio_debugfs_init(void)
{
}
评论暂时关闭