标题:
Davinci DM6446 Linux 内核分析——board-evm.c(2)
[打印本页]
作者:
yuyang911220
时间:
2015-10-21 09:39
标题:
Davinci DM6446 Linux 内核分析——board-evm.c(2)
static struct resource nand_resources[] = {
[0] = {
.start = DM644X_ASYNC_EMIF_CNTRL_BASE,
.end = DM644X_ASYNC_EMIF_CNTRL_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16K - 1,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device nand_device = {
.name = "nand_davinci",
.id = 0,
.dev = {
.platform_data = &nand_data,
},
.num_resources = ARRAY_SIZE(nand_resources),
.resource = nand_resources,
};
#endif
#if defined (CONFIG_MTD_DAVINCI_NOR) ||defined(CONFIG_MTD_DAVINCI_NOR_MODULE)
static struct mtd_partition davinci_evm_nor_partitions[] = {
{
.name = "bootloader",
.offset = 0,
.size = SZ_128K,
.mask_flags = 0
},
{
.name = "params",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
.mask_flags = MTD_WRITEABLE,
},
{
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_4M,
.mask_flags = 0
},
{
.name = "cramfs",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
.mask_flags = 0
},
{
.name = "jffs2", // jffs2文件分区
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0
}
};
static struct flash_platform_data davinci_evm_flash_data = {
.map_name = "cfi_probe",
.width = 2,
.parts = davinci_evm_nor_partitions,
.nr_parts = ARRAY_SIZE(davinci_evm_nor_partitions),
};
static struct resource davinci_evm_flash_resource = {
.start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
.end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1,
.flags = IORESOURCE_MEM,
};
static struct platform_device davinci_evm_flash_device = {
.name = "nor_davinci",
.id = 0,
.dev = {
.platform_data = &davinci_evm_flash_data,
},
.num_resources = 1,
.resource = &davinci_evm_flash_resource,
};
#endif
#if defined(CONFIG_MMC_DAVINCI) ||defined(CONFIG_MMC_DAVINCI_MODULE)
static struct resource mmc0_resources[] = {
[0] = { // 寄存器
.start = DAVINCI_MMC_SD_BASE,
.end = DAVINCI_MMC_SD_BASE + SZ_1K - 1,
.flags = IORESOURCE_MEM,
},
[1] = { // 中断号
.start = IRQ_MMCINT,
.end = IRQ_MMCINT,
.flags = IORESOURCE_IRQ,
},
[2] = { // dma 接收寄存器
.start = DAVINCI_DMA_MMCRXEVT,
.end = DAVINCI_DMA_MMCRXEVT,
.flags = IORESOURCE_DMA,
},
[3] = { // dma 发送寄存器
.start = DAVINCI_DMA_MMCTXEVT,
.end = DAVINCI_DMA_MMCTXEVT,
.flags = IORESOURCE_DMA,
},
};
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0