Ejemplo n.º 1
0
int __init clk_init(void)
{
	int ret;

	ret = arch_clk_init();
	if (unlikely(ret)) {
		pr_err("%s: CPU clock registration failed.\n", __func__);
		return ret;
	}

	if (sh_mv.mv_clk_init) {
		ret = sh_mv.mv_clk_init();
		if (unlikely(ret)) {
			pr_err("%s: machvec clock initialization failed.\n",
			       __func__);
			return ret;
		}
	}

	
	recalculate_root_clocks();

	
	clk_enable_init_clocks();

	return ret;
}
Ejemplo n.º 2
0
int __init clk_init(void)
{
	int ret;

	ret = arch_clk_init();
	if (unlikely(ret)) {
		pr_err("%s: CPU clock registration failed.\n", __func__);
		return ret;
	}

	if (sh_mv.mv_clk_init) {
		ret = sh_mv.mv_clk_init();
		if (unlikely(ret)) {
			pr_err("%s: machvec clock initialization failed.\n",
			       __func__);
			return ret;
		}
	}

	/* Kick the child clocks.. */
	recalculate_root_clocks();

	/* Enable the necessary init clocks */
	clk_enable_init_clocks();

	return ret;
}
Ejemplo n.º 3
0
void ExecInit(void)
{
	SysBase *SysBase = INTERN_CreateSysBase(&config);
	if (SysBase == NULL)
	{
		monitor_write("[PANIC] No SysBase created\n");
		for(;;);
	}
	DPrintF("\n%s ______________________________________\n", config.arch_name);

	SysBase->ExecTask.Node.ln_Name = "ExecTask";
	SysBase->thisTask = &SysBase->ExecTask;			// Fake a Task for AllocVec

	// Create two clean Task, one IDLE Task and one Worker Task with Prio 100
	CreateInitTask(SysBase, &SysBase->ExecTask, "ExecTask"	, lib_ExecTask	, SysBase, _EXEC_TASK_STACK_, 100);
	CreateInitTask(SysBase, &SysBase->IdleTask, "idle"		, lib_Idle		, SysBase, _IDLE_TASK_STACK_, -124); 
	
	arch_irq_init(); 			// Remap IRQ
	arch_irq_create(SysBase); 	// Create IRQ/Exc Handlers/Servers
	arch_clk_init(SysBase);		// create Clock

	if (RomTagScanner(config.base, (UINT32 *)(config.base + config.kernel_size)) == FALSE)
	{
		monitor_write("[PANIC] RomTagScanner FAILED!\n");
		for(;;);
	}
	InitResidentCode(RTF_SINGLETASK);
	DPrintF("[INIT] Activating Multitasking -> Leaving SingleTask\n");
	SysBase->thisTask = NULL;	// Remove Fake Task for proper Schedule
	Permit();					// Sysbase was initialised with a 0 in TDNestCnt, we set it here to -1 to enable Taskswitching
	DPrintF("[INIT] Schedule -> leaving Kernel Init\n");
	Schedule();

	DPrintF("[INIT] PONR (point of no return\n");
	asm volatile("int $0x1");
	for(;;);
}