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

Commit 1139b926 authored by Russell King's avatar Russell King
Browse files

ARM: restart: ixp2000: use new restart hook



Hook these platforms restart code into the new restart hook rather
than using arch_reset().

In doing so, we split out the IXDP2401, IXDP2801 and IXDP2805 platform
specific restart code into their own platform files.

Acked-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 00aa78ee
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -515,3 +515,7 @@ void __init ixp2000_init_irq(void)
	}
	}
}
}


void ixp2000_restart(char mode, const char *cmd)
{
	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -259,6 +259,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
	.init_irq	= ixp2000_init_irq,
	.init_irq	= ixp2000_init_irq,
	.timer		= &enp2611_timer,
	.timer		= &enp2611_timer,
	.init_machine	= enp2611_init_machine,
	.init_machine	= enp2611_init_machine,
	.restart	= ixp2000_restart,
MACHINE_END
MACHINE_END


+1 −0
Original line number Original line Diff line number Diff line
@@ -122,6 +122,7 @@ void ixp2000_map_io(void);
void ixp2000_uart_init(void);
void ixp2000_uart_init(void);
void ixp2000_init_irq(void);
void ixp2000_init_irq(void);
void ixp2000_init_time(unsigned long);
void ixp2000_init_time(unsigned long);
void ixp2000_restart(char, const char *);
unsigned long ixp2000_gettimeoffset(void);
unsigned long ixp2000_gettimeoffset(void);


struct pci_sys_data;
struct pci_sys_data;
+0 −29
Original line number Original line Diff line number Diff line
@@ -8,10 +8,6 @@
 * it under the terms of the GNU General Public License version 2 as
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 * published by the Free Software Foundation.
 */
 */

#include <mach/hardware.h>
#include <asm/mach-types.h>

static inline void arch_idle(void)
static inline void arch_idle(void)
{
{
	cpu_do_idle();
	cpu_do_idle();
@@ -19,29 +15,4 @@ static inline void arch_idle(void)


static inline void arch_reset(char mode, const char *cmd)
static inline void arch_reset(char mode, const char *cmd)
{
{
	/*
	 * Reset flash banking register so that we are pointing at
	 * RedBoot bank.
	 */
	if (machine_is_ixdp2401()) {
		ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
					((0 >> IXDP2X01_FLASH_WINDOW_BITS)
						| IXDP2X01_CPLD_FLASH_INTERN));
		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
	}

	/*
	 * On IXDP2801 we need to write this magic sequence to the CPLD
	 * to cause a complete reset of the CPU and all external devices
	 * and move the flash bank register back to 0.
	 */
	if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
		unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;

		reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
		ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
		ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
	}

	ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -176,5 +176,6 @@ MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
	.init_irq	= ixdp2400_init_irq,
	.init_irq	= ixdp2400_init_irq,
	.timer		= &ixdp2400_timer,
	.timer		= &ixdp2400_timer,
	.init_machine	= ixdp2x00_init_machine,
	.init_machine	= ixdp2x00_init_machine,
	.restart	= ixp2000_restart,
MACHINE_END
MACHINE_END
Loading