/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * PROM library initialisation code. * * Copyright (C) 1999,2000,2004,2005,2012 MIPS Technologies, Inc. * All rights reserved. * Authors: Carsten Langgaard <carstenl@mips.com> * Maciej W. Rozycki <macro@mips.com> * Steven J. Hill <sjhill@mips.com>
*/ #include <linux/init.h> #include <linux/string.h> #include <linux/kernel.h> #include <linux/pci_regs.h> #include <linux/serial_core.h>
void __init prom_init(void)
{ /* * early setup of _pcictrl_bonito so that we can determine * the system controller on a CORE_EMUL board
*/
_pcictrl_bonito = (unsignedlong)ioremap(BONITO_REG_BASE, BONITO_REG_SIZE);
mips_revision_sconid = MIPS_REVISION_SCONID; if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) { switch (mips_revision_corid) { case MIPS_REVISION_CORID_QED_RM5261: case MIPS_REVISION_CORID_CORE_LV: case MIPS_REVISION_CORID_CORE_FPGA: case MIPS_REVISION_CORID_CORE_FPGAR2:
mips_revision_sconid = MIPS_REVISION_SCON_GT64120; break; case MIPS_REVISION_CORID_CORE_EMUL_BON: case MIPS_REVISION_CORID_BONITO64: case MIPS_REVISION_CORID_CORE_20K:
mips_revision_sconid = MIPS_REVISION_SCON_BONITO; break; case MIPS_REVISION_CORID_CORE_MSC: case MIPS_REVISION_CORID_CORE_FPGA2: case MIPS_REVISION_CORID_CORE_24K: /* * SOCit/ROCit support is essentially identical * but make an attempt to distinguish them
*/
mips_revision_sconid = MIPS_REVISION_SCON_SOCIT; break; case MIPS_REVISION_CORID_CORE_FPGA3: case MIPS_REVISION_CORID_CORE_FPGA4: case MIPS_REVISION_CORID_CORE_FPGA5: case MIPS_REVISION_CORID_CORE_EMUL_MSC: default: /* See above */
mips_revision_sconid = MIPS_REVISION_SCON_ROCIT; break;
}
}
case MIPS_REVISION_SCON_GT64120: /* * Setup the North bridge to do Master byte-lane swapping * when running in bigendian.
*/
_pcictrl_gt64120 = (unsignedlong)ioremap(MIPS_GT_BASE, 0x2000);
/* * Setup the Malta max (2GB) memory for PCI DMA in host bridge * in transparent addressing mode.
*/
mask = PHYS_OFFSET | PCI_BASE_ADDRESS_MEM_PREFETCH;
MSC_WRITE(MSC01_PCI_BAR0, mask);
MSC_WRITE(MSC01_PCI_HEAD4, mask);
case MIPS_REVISION_SCON_SOCITSC: case MIPS_REVISION_SCON_SOCITSCP:
_pcictrl_msc = (unsignedlong)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000); goto mips_pci_controller;
default: /* Unknown system controller */ while (1); /* We die here... */
}
board_nmi_handler_setup = mips_nmi_setup;
board_ejtag_handler_setup = mips_ejtag_setup;
fw_init_cmdline();
fw_meminit(); #ifdef CONFIG_SERIAL_8250_CONSOLE
console_config(); #endif /* Early detection of CMP support */
mips_cpc_probe();
if (!register_cps_smp_ops()) return; if (!register_vsmp_smp_ops()) return;
register_up_smp_ops();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.