[POWERPC] Only call ppc_md.setup_arch() if it is provided

This allows platforms which don't have anything to do at setup_arch time
(like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Grant Likely 2007-10-11 04:48:18 +10:00 коммит произвёл Paul Mackerras
Родитель dc9b43d0f7
Коммит 38db7e740a
3 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con; conswitchp = &dummy_con;
#endif #endif
ppc_md.setup_arch(); if (ppc_md.setup_arch)
ppc_md.setup_arch();
if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab); if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
paging_init(); paging_init();

Просмотреть файл

@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p)
conswitchp = &dummy_con; conswitchp = &dummy_con;
#endif #endif
ppc_md.setup_arch(); if (ppc_md.setup_arch)
ppc_md.setup_arch();
paging_init(); paging_init();
ppc64_boot_msg(0x15, "Setup Done"); ppc64_boot_msg(0x15, "Setup Done");

Просмотреть файл

@ -99,7 +99,7 @@ struct machdep_calls {
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
int (*probe)(void); int (*probe)(void);
void (*setup_arch)(void); void (*setup_arch)(void); /* Optional, may be NULL */
void (*init_early)(void); void (*init_early)(void);
/* Optional, may be NULL. */ /* Optional, may be NULL. */
void (*show_cpuinfo)(struct seq_file *m); void (*show_cpuinfo)(struct seq_file *m);