\arch\arm\mach-at91\board-sam9m10g45ek.c中:
1、static struct mtd_partition __initdata ek_nand_partition[] = {
{
.name = "Partition 1",
.offset = 0,
//.size = SZ_64M,
.size = SZ_16M, // 根据硬件更改
},
{
.name = "Partition 2",
.offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL,
},
};
2、
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
{
.name = "LG",
.refresh = 60,
.xres = 480, .yres = 272,
.pixclock = KHZ2PICOS(12000),
// .left_margin = 1, .right_margin = 1,
// .upper_margin = 40, .lower_margin = 1,
// .hsync_len = 45, .vsync_len = 1,
// MODIFY BY CHENFEI
.left_margin = 2, .right_margin = 2,
.upper_margin = 2, .lower_margin = 2,
.hsync_len = 41, .vsync_len = 10,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
},
};
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 = {
.open = at91_gpio_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
}; //非标准C,是GNU的扩展语法.
static int __init at91_gpio_debugfs_init(void)
{
(void) debugfs_create_file("at91_gpio", S_IFREG | S_IRUGO, NULL, NULL, &at91_gpio_operations);
return 0;
}
static int __init at91_gpio_debugfs_init(void)
{
(void) debugfs_create_file("at91_gpio", S_IFREG | S_IRUGO, NULL, NULL, &at91_gpio_operations);
return 0;
}