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

Commit 47cacdd4 authored by Russell King's avatar Russell King
Browse files

ARM: restart: realview: use new restart hook



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

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 271a74fc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -65,6 +65,5 @@ extern int realview_usb_register(struct resource *res);
extern void realview_init_early(void);
extern void realview_fixup(struct tag *tags, char **from,
			   struct meminfo *meminfo);
extern void (*realview_reset)(char);

#endif
+0 −13
Original line number Diff line number Diff line
@@ -21,12 +21,6 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H

#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/platform.h>

void (*realview_reset)(char mode);

static inline void arch_idle(void)
{
	/*
@@ -38,13 +32,6 @@ static inline void arch_idle(void)

static inline void arch_reset(char mode, const char *cmd)
{
	/*
	 * To reset, we hit the on-board reset register
	 * in the system FPGA
	 */
	if (realview_reset)
		realview_reset(mode);
	dsb();
}

#endif
+3 −2
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ static struct sys_timer realview_eb_timer = {
	.init		= realview_eb_timer_init,
};

static void realview_eb_reset(char mode)
static void realview_eb_restart(char mode, const char *cmd)
{
	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -427,6 +427,7 @@ static void realview_eb_reset(char mode)
	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
	if (core_tile_eb11mp())
		__raw_writel(0x0008, reset_ctrl);
	dsb();
}

static void __init realview_eb_init(void)
@@ -458,7 +459,6 @@ static void __init realview_eb_init(void)
#ifdef CONFIG_LEDS
	leds_event = realview_leds_event;
#endif
	realview_reset = realview_eb_reset;
}

MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
@@ -473,4 +473,5 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
#ifdef CONFIG_ZONE_DMA
	.dma_zone_size	= SZ_256M,
#endif
	.restart	= realview_eb_restart,
MACHINE_END
+3 −2
Original line number Diff line number Diff line
@@ -336,12 +336,13 @@ static struct sys_timer realview_pb1176_timer = {
	.init		= realview_pb1176_timer_init,
};

static void realview_pb1176_reset(char mode)
static void realview_pb1176_restart(char mode, const char *cmd)
{
	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
	__raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl);
	dsb();
}

static void realview_pb1176_fixup(struct tag *tags, char **from,
@@ -381,7 +382,6 @@ static void __init realview_pb1176_init(void)
#ifdef CONFIG_LEDS
	leds_event = realview_leds_event;
#endif
	realview_reset = realview_pb1176_reset;
}

MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
@@ -396,4 +396,5 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
#ifdef CONFIG_ZONE_DMA
	.dma_zone_size	= SZ_256M,
#endif
	.restart	= realview_pb1176_restart,
MACHINE_END
+3 −2
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ static struct sys_timer realview_pb11mp_timer = {
	.init		= realview_pb11mp_timer_init,
};

static void realview_pb11mp_reset(char mode)
static void realview_pb11mp_restart(char mode, const char *cmd)
{
	void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
	void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
@@ -327,6 +327,7 @@ static void realview_pb11mp_reset(char mode)
	__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
	__raw_writel(0x0000, reset_ctrl);
	__raw_writel(0x0004, reset_ctrl);
	dsb();
}

static void __init realview_pb11mp_init(void)
@@ -355,7 +356,6 @@ static void __init realview_pb11mp_init(void)
#ifdef CONFIG_LEDS
	leds_event = realview_leds_event;
#endif
	realview_reset = realview_pb11mp_reset;
}

MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
@@ -370,4 +370,5 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
#ifdef CONFIG_ZONE_DMA
	.dma_zone_size	= SZ_256M,
#endif
	.restart	= realview_pb11mp_restart,
MACHINE_END
Loading