Пример #1
0
/* Resets clock rates and reboots the system. Only called from system.h */
void omap_prcm_arch_reset(char mode)
{
	s16 prcm_offs;
	omap2_clk_prepare_for_reboot();

	if (cpu_is_omap24xx())
		prcm_offs = WKUP_MOD;
	else if (cpu_is_omap34xx()) {
		u32 l;

		prcm_offs = OMAP3430_GR_MOD;
		l = ('B' << 24) | ('M' << 16) | mode;
		/* Reserve the first word in scratchpad for communicating
		 * with the boot ROM. A pointer to a data structure
		 * describing the boot process can be stored there,
		 * cf. OMAP34xx TRM, Initialization / Software Booting
		 * Configuration. */
		omap_writel(l, OMAP343X_SCRATCHPAD + 4);
	} else if (cpu_is_omap44xx())
		prcm_offs = OMAP4430_PRM_DEVICE_MOD;
	else {
		WARN_ON(1);
		return;
	}

	if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
		  omap3_warmreset();
	}
	if (cpu_is_omap44xx())
		prm_set_mod_reg_bits(OMAP4430_RST_GLOBAL_WARM_SW_MASK,
					prcm_offs, OMAP4_RM_RSTCTRL);
}
Пример #2
0
/* Resets clock rates and reboots the system. Only called from system.h */
void omap_prcm_arch_reset(char mode)
{
	s16 prcm_offs;
	omap2_clk_prepare_for_reboot();

	set_and_lock_opps_max(true);

	if (cpu_is_omap24xx())
		prcm_offs = WKUP_MOD;
	else if (cpu_is_omap34xx()) {
		u32 l;

		prcm_offs = OMAP3430_GR_MOD;
		l = ('B' << 24) | ('M' << 16) | mode;
		/* Reserve the first word in scratchpad for communicating
		 * with the boot ROM. A pointer to a data structure
		 * describing the boot process can be stored there,
		 * cf. OMAP34xx TRM, Initialization / Software Booting
		 * Configuration. */
		omap_writel(l, OMAP343X_SCRATCHPAD + 4);
	} else
		WARN_ON(1);

#if defined(CONFIG_MACH_SHOLES) || defined(CONFIG_MACH_MAPPHONE)
	prm_set_mod_reg_bits(OMAP_RST_GS, prcm_offs, RM_RSTCTRL);
#else
	prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, RM_RSTCTRL);
#endif
}
Пример #3
0
/* Resets clock rates and reboots the system. Only called from system.h */
void omap_prcm_arch_reset(char mode, const char *cmd)
{
	s16 prcm_offs;

	omap2_clk_prepare_for_reboot();

	if (cpu_is_omap24xx()) {
		prcm_offs = WKUP_MOD;
		prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, RM_RSTCTRL);
	} else if (cpu_is_omap34xx()) {
		u32 l;

		/* Copy cmd into scratchpad memmory if any */
		if(cmd != 0)
		{
			u16  counter = 0;
		  
			while((counter < (OMAP343X_SCRATCHPAD_BCB_SIZE-1)) && (cmd[counter]!='\0')) {
				omap_writeb(cmd[counter], OMAP343X_SCRATCHPAD_BCB + counter);
				counter++;
			}

			omap_writeb('\0', OMAP343X_SCRATCHPAD_BCB + counter);
			
		} 

		prcm_offs = OMAP3430_GR_MOD;
		l = ('B' << 24) | ('M' << 16) | mode;
		/* Reserve the first word in scratchpad for communicating
		 * with the boot ROM. A pointer to a data structure
		 * describing the boot process can be stored there,
		 * cf. OMAP34xx TRM, Initialization / Software Booting
		 * Configuration. */
		omap_writel(l, OMAP343X_SCRATCHPAD + 4);

		omap3_configure_core_dpll_warmreset();

	} else
		WARN_ON(1);
}
Пример #4
0
/* Resets clock rates and reboots the system. Only called from system.h */
void omap_prcm_arch_reset(char mode)
{
	omap2_clk_prepare_for_reboot();
	RM_RSTCTRL_WKUP |= 2;
}