首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

Davinci DM6446 Linux 内核分析——board-evm.c(2)

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,
},
};
继承事业,薪火相传
返回列表