Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae909ea4 authored by Greg Ungerer's avatar Greg Ungerer
Browse files

m68knommu: factor more common ColdFire cpu reset code



Most of the more modern ColdFire cores use the same code to reset the CPU
(but it is different to most of the earlier cores). Currently that is
duplicated in each of the sub-arch files. Pull out this common code and
out a single copy of it with the other common reset code.

Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
parent 645e5333
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -74,17 +74,8 @@ static void __init m520x_fec_init(void)

/***************************************************************************/

static void m520x_cpu_reset(void)
{
	local_irq_disable();
	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
	mach_reset = m520x_cpu_reset;
	mach_sched_init = hw_timer_init;
	m520x_uarts_init();
	m520x_fec_init();
+0 −9
Original line number Diff line number Diff line
@@ -54,17 +54,8 @@ static void __init m523x_fec_init(void)

/***************************************************************************/

static void m523x_cpu_reset(void)
{
	local_irq_disable();
	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
	mach_reset = m523x_cpu_reset;
	mach_sched_init = hw_timer_init;
	m523x_fec_init();
#ifdef CONFIG_SPI_COLDFIRE_QSPI
+0 −9
Original line number Diff line number Diff line
@@ -87,17 +87,8 @@ static void __init m527x_fec_init(void)

/***************************************************************************/

static void m527x_cpu_reset(void)
{
	local_irq_disable();
	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
	mach_reset = m527x_cpu_reset;
	mach_sched_init = hw_timer_init;
	m527x_uarts_init();
	m527x_fec_init();
+0 −9
Original line number Diff line number Diff line
@@ -60,14 +60,6 @@ static void __init m528x_fec_init(void)

/***************************************************************************/

static void m528x_cpu_reset(void)
{
	local_irq_disable();
	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

#ifdef CONFIG_WILDFIRE
void wildfire_halt(void)
{
@@ -103,7 +95,6 @@ void __init config_BSP(char *commandp, int size)
#ifdef CONFIG_WILDFIREMOD
	mach_halt = wildfiremod_halt;
#endif
	mach_reset = m528x_cpu_reset;
	mach_sched_init = hw_timer_init;
	m528x_uarts_init();
	m528x_fec_init();
+0 −9
Original line number Diff line number Diff line
@@ -61,14 +61,6 @@ static void __init m532x_fec_init(void)

/***************************************************************************/

static void m532x_cpu_reset(void)
{
	local_irq_disable();
	__raw_writeb(MCF_RCR_SWRESET, MCF_RCR);
}

/***************************************************************************/

void __init config_BSP(char *commandp, int size)
{
#if !defined(CONFIG_BOOTPARAM)
@@ -83,7 +75,6 @@ void __init config_BSP(char *commandp, int size)
#endif

	mach_sched_init = hw_timer_init;
	mach_reset = m532x_cpu_reset;
	m532x_uarts_init();
	m532x_fec_init();
#ifdef CONFIG_SPI_COLDFIRE_QSPI
Loading