Skip to content

Commit

Permalink
ARM: ep93xx: use machine specific hook for late init
Browse files Browse the repository at this point in the history
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
  • Loading branch information
Shawn Guo committed May 5, 2012
1 parent 3aa3e84 commit c914283
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/adssphere.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = adssphere_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
5 changes: 5 additions & 0 deletions arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,3 +904,8 @@ void ep93xx_restart(char mode, const char *cmd)
while (1)
;
}

void __init ep93xx_init_late(void)
{
crunch_init();
}
4 changes: 1 addition & 3 deletions arch/arm/mach-ep93xx/crunch.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ static struct notifier_block crunch_notifier_block = {
.notifier_call = crunch_do,
};

static int __init crunch_init(void)
int __init crunch_init(void)
{
thread_register_notifier(&crunch_notifier_block);
elf_hwcap |= HWCAP_CRUNCH;

return 0;
}

late_initcall(crunch_init);
8 changes: 8 additions & 0 deletions arch/arm/mach-ep93xx/edb93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -268,6 +269,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -281,6 +283,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -294,6 +297,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -307,6 +311,7 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -320,6 +325,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -333,6 +339,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -346,6 +353,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = edb93xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/gesbc9312.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = gesbc9312_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
7 changes: 7 additions & 0 deletions arch/arm/mach-ep93xx/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,12 @@ void ep93xx_init_devices(void);
extern struct sys_timer ep93xx_timer;

void ep93xx_restart(char, const char *);
void ep93xx_init_late(void);

#ifdef CONFIG_CRUNCH
int crunch_init(void);
#else
static inline int crunch_init(void) { return 0; }
#endif

#endif
4 changes: 4 additions & 0 deletions arch/arm/mach-ep93xx/micro9.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = micro9_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -98,6 +99,7 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = micro9_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -111,6 +113,7 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = micro9_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
Expand All @@ -124,6 +127,7 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = micro9_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
#endif
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/simone.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = simone_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/snappercl15.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = snappercl15_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/ts72xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,6 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = ts72xx_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-ep93xx/vision_ep9307.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,5 +367,6 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
.handle_irq = vic_handle_irq,
.timer = &ep93xx_timer,
.init_machine = vision_init_machine,
.init_late = ep93xx_init_late,
.restart = ep93xx_restart,
MACHINE_END

0 comments on commit c914283

Please sign in to comment.