aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-09-23 00:10:59 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-23 00:10:59 -0400
commit9f497581fda5fd804e9ebd7d8f6d80c3a0e9f883 (patch)
tree3a766e7140be8fa99a75e9384ccee64d66b82993 /arch/ppc64
parente903c5b536895fdf69970df62c5bf49ad17e6533 (diff)
ppc64 iSeries: Move iSeries ppc_md functions into a machdep_calls struct
Move the iSeries machine specific calls into a machdep_calls struct like other platforms, rather than setting members of ppc_md explicitly. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 3ffefbbc6623..b5dcb08547bd 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -76,6 +76,8 @@ extern void ppcdbg_initialize(void);
76static void build_iSeries_Memory_Map(void); 76static void build_iSeries_Memory_Map(void);
77static void setup_iSeries_cache_sizes(void); 77static void setup_iSeries_cache_sizes(void);
78static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr); 78static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
79static int iseries_shared_idle(void);
80static int iseries_dedicated_idle(void);
79#ifdef CONFIG_PCI 81#ifdef CONFIG_PCI
80extern void iSeries_pci_final_fixup(void); 82extern void iSeries_pci_final_fixup(void);
81#else 83#else
@@ -695,6 +697,14 @@ static void __init iSeries_setup_arch(void)
695{ 697{
696 unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; 698 unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index;
697 699
700 if (get_paca()->lppaca.shared_proc) {
701 ppc_md.idle_loop = iseries_shared_idle;
702 printk(KERN_INFO "Using shared processor idle loop\n");
703 } else {
704 ppc_md.idle_loop = iseries_dedicated_idle;
705 printk(KERN_INFO "Using dedicated idle loop\n");
706 }
707
698 /* Add an eye catcher and the systemcfg layout version number */ 708 /* Add an eye catcher and the systemcfg layout version number */
699 strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64"); 709 strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
700 systemcfg->version.major = SYSTEMCFG_MAJOR; 710 systemcfg->version.major = SYSTEMCFG_MAJOR;
@@ -942,36 +952,25 @@ static int iseries_dedicated_idle(void)
942void __init iSeries_init_IRQ(void) { } 952void __init iSeries_init_IRQ(void) { }
943#endif 953#endif
944 954
955struct machdep_calls __initdata iseries_md = {
956 .setup_arch = iSeries_setup_arch,
957 .get_cpuinfo = iSeries_get_cpuinfo,
958 .init_IRQ = iSeries_init_IRQ,
959 .get_irq = iSeries_get_irq,
960 .init_early = iSeries_init_early,
961 .pcibios_fixup = iSeries_pci_final_fixup,
962 .restart = iSeries_restart,
963 .power_off = iSeries_power_off,
964 .halt = iSeries_halt,
965 .get_boot_time = iSeries_get_boot_time,
966 .set_rtc_time = iSeries_set_rtc_time,
967 .get_rtc_time = iSeries_get_rtc_time,
968 .calibrate_decr = iSeries_calibrate_decr,
969 .progress = iSeries_progress,
970 /* XXX Implement enable_pmcs for iSeries */
971};
972
945void __init iSeries_early_setup(void) 973void __init iSeries_early_setup(void)
946{ 974{
947 iSeries_fixup_klimit(); 975 iSeries_fixup_klimit();
948
949 ppc_md.setup_arch = iSeries_setup_arch;
950 ppc_md.get_cpuinfo = iSeries_get_cpuinfo;
951 ppc_md.init_IRQ = iSeries_init_IRQ;
952 ppc_md.get_irq = iSeries_get_irq;
953 ppc_md.init_early = iSeries_init_early,
954
955 ppc_md.pcibios_fixup = iSeries_pci_final_fixup;
956
957 ppc_md.restart = iSeries_restart;
958 ppc_md.power_off = iSeries_power_off;
959 ppc_md.halt = iSeries_halt;
960
961 ppc_md.get_boot_time = iSeries_get_boot_time;
962 ppc_md.set_rtc_time = iSeries_set_rtc_time;
963 ppc_md.get_rtc_time = iSeries_get_rtc_time;
964 ppc_md.calibrate_decr = iSeries_calibrate_decr;
965 ppc_md.progress = iSeries_progress;
966
967 /* XXX Implement enable_pmcs for iSeries */
968
969 if (get_paca()->lppaca.shared_proc) {
970 ppc_md.idle_loop = iseries_shared_idle;
971 printk(KERN_INFO "Using shared processor idle loop\n");
972 } else {
973 ppc_md.idle_loop = iseries_dedicated_idle;
974 printk(KERN_INFO "Using dedicated idle loop\n");
975 }
976} 976}
977