新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > s3c6410_init()被調(diào)用的流程

s3c6410_init()被調(diào)用的流程

作者: 時間:2016-11-10 來源:網(wǎng)絡(luò) 收藏
1.s3c6410_init()被調(diào)用的流程:
cpu賦值流程:
1).定義cpu, __mach_desc_MACH_TYPE_SMDK6410
static struct cpu_table *cpu;

#define MACHINE_START(_type,_name)
static const struct machine_desc __mach_desc_##_type
__used
__attribute__((__section__(".arch.info.init"))) = {
.nr = MACH_TYPE_##_type,
.name = _name,

#define MACHINE_END
};

static const struct machine_desc __mach_desc_SMDK6410
.nr = MACH_TYPE_SMDK6410
.name = "SMDK6410"

2).
machine_arch_type==MACH_TYPE_SMDK6410==1626

MACHINE_START(SMDK6410, "SMDK6410")
......................,
.init_irq = s3c_init_irq,
.map_io = smdk6410_map_io,
.fixup = smdk6410_fixup,
.timer = &s3c_timer,
.init_machine = smdk6410_machine_init,
MACHINE_END

start_kernel()==>setup_arch()===>
1.mdesc=setup_machine(machine_arch_type)==>lookup_machine_types(MACH_TYPE_SMDK6410) == __mach_desc_SMDK6410
2.paging_init(mdesc) ==>devicemaps_init(mdesc) ==> mdesc->map_io()==>__mach_desc_SMDK6410->map_io()
==>smdk6410_map_io() ==> s3c24xx_init_io() ==> cpu = s3c_lookup_cpu(idcode);

調(diào)用流程:
arch_initcall(s3c_arch_init)==>s3c_arch_init()==>(cpu->init)()==>s3c6410_init()


關(guān)鍵詞: s3c6410init()被調(diào)

評論


技術(shù)專區(qū)

關(guān)閉