.timer = &xxx_timer,
MACHINE_END
start_kernel里setup_arch:
mdesc = setup_machine(machine_arch_type);
init_arch_irq = mdesc->init_irq;
system_timer = mdesc->timer;
init_machine = mdesc->init_machine;
mdesc 即是我们定义的machine type,这个结构体里我们定义的借口调用顺序如下:
mdesc->fixup(); //setup_arch调用
mdesc->map_io(); //setup_arch-》paging_init-》devicemaps_init
init_arch_irq; //start_kernel-》init_IRQ
system_timer->init(); //start_kernel-》time_init
init_machine; //arch_initcall