Exemple #1
0
static void __init
pcore_setup_arch(void)
{
	/* init to some ~sane value until calibrate_delay() runs */
	loops_per_jiffy = 50000000/HZ;

	/* Lookup PCI host bridges */
	board_type = pcore_find_bridges();

#ifdef CONFIG_BLK_DEV_INITRD
	if (initrd_start)
		ROOT_DEV = Root_RAM0;
        else
#endif
#ifdef CONFIG_ROOT_NFS
		ROOT_DEV = Root_NFS;
#else
		ROOT_DEV = Root_SDA2;
#endif

 	printk(KERN_INFO "Force PowerCore ");
	if (board_type == PCORE_TYPE_6750)
		printk("6750\n");
	else
		printk("680\n");
	printk(KERN_INFO "Port by MontaVista Software, Inc. ([email protected])\n");
	_set_L2CR(L2CR_L2E | _get_L2CR());

}
Exemple #2
0
void __init
core99_init_l2(void)
{
	int cpu = smp_processor_id();

	if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR))
		return;

	if (cpu == 0){
		core99_l2_cache = _get_L2CR();
		printk("CPU0: L2CR is %lx\n", core99_l2_cache);
	} else {
		printk("CPU%d: L2CR was %lx\n", cpu, _get_L2CR());
		_set_L2CR(0);
		_set_L2CR(core99_l2_cache);
		printk("CPU%d: L2CR set to %lx\n", cpu, core99_l2_cache);
	}
}
Exemple #3
0
/**************************************************************************
 * FUNCTION: chestnut_setup_arch
 *
 * DESCRIPTION: ppc_md machine configuration callback
 *
 ****/
static void __init
chestnut_setup_arch(void)
{
    if (ppc_md.progress)
        ppc_md.progress("chestnut_setup_arch: enter", 0);

    /* init to some ~sane value until calibrate_delay() runs */
    loops_per_jiffy = 50000000 / HZ;

    /* if the time base value is greater than bus freq/4 (the TB and
    	* decrementer tick rate) + signed integer rollover value, we
    	* can spend a fair amount of time waiting for the rollover to
    	* happen.  To get around this, initialize the time base register
    	* to a "safe" value.
    	*/
    set_tb(0, 0);

#ifdef CONFIG_BLK_DEV_INITRD
    if (initrd_start)
        ROOT_DEV = Root_RAM0;
    else
#endif
#ifdef CONFIG_ROOT_NFS
        ROOT_DEV = Root_NFS;
#else
        ROOT_DEV = Root_SDA2;
#endif

    /*
    	* Set up the L2CR register.
    	*/
    _set_L2CR(_get_L2CR() | L2CR_L2E);

    chestnut_setup_bridge();
    chestnut_setup_peripherals();

#ifdef CONFIG_DUMMY_CONSOLE
    conswitchp = &dummy_con;
#endif

#if defined(CONFIG_SERIAL_8250)
    chestnut_early_serial_map();
#endif

    /* Identify the system */
    printk(KERN_INFO "System Identification: IBM 750FX/GX Eval Board\n");
    printk(KERN_INFO "IBM 750FX/GX port (C) 2004 MontaVista Software, Inc."
           " ([email protected])\n");

    if (ppc_md.progress)
        ppc_md.progress("chestnut_setup_arch: exit", 0);
}
/*
 * Called very early, device-tree isn't unflattened
 */
static int __init prpmc2800_probe(void)
{
	unsigned long root = of_get_flat_dt_root();
	unsigned long len = PLATFORM_NAME_MAX;
	void *m;

	if (!of_flat_dt_is_compatible(root, "motorola,PrPMC2800"))
		return 0;

	/* Update ppc_md.name with name from dt */
	m = of_get_flat_dt_prop(root, "model", &len);
	if (m)
		strncpy(prpmc2800_platform_name, m,
			min((int)len, PLATFORM_NAME_MAX - 1));

	_set_L2CR(_get_L2CR() | L2CR_L2E);
	return 1;
}