static int __init pnv_probe(void) { unsigned long root = of_get_flat_dt_root(); if (!of_flat_dt_is_compatible(root, "ibm,powernv")) return 0; hpte_init_native(); if (firmware_has_feature(FW_FEATURE_OPAL)) pnv_setup_machdep_opal(); #ifdef CONFIG_PPC_POWERNV_RTAS else if (rtas.base) pnv_setup_machdep_rtas(); #endif /* CONFIG_PPC_POWERNV_RTAS */ pr_debug("PowerNV detected !\n"); return 1; }
/* * Early initialization. Relocation is on but do not reference unbolted pages */ static void __init pSeries_init_early(void) { void *comport; int iommu_off = 0; unsigned int default_speed; u64 physport; DBG(" -> pSeries_init_early()\n"); fw_feature_init(); if (systemcfg->platform & PLATFORM_LPAR) hpte_init_lpar(); else { hpte_init_native(); iommu_off = (of_chosen && get_property(of_chosen, "linux,iommu-off", NULL)); } generic_find_legacy_serial_ports(&physport, &default_speed); if (systemcfg->platform & PLATFORM_LPAR) find_udbg_vterm(); else if (physport) { /* Map the uart for udbg. */ comport = (void *)ioremap(physport, 16); udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; ppc_md.udbg_getc = udbg_getc; ppc_md.udbg_getc_poll = udbg_getc_poll; DBG("Hello World !\n"); } iommu_init_early_pSeries(); pSeries_discover_pic(); DBG(" <- pSeries_init_early()\n"); }