ARM: restart: w90x900: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Родитель
f5733a1e80
Коммит
fe76daea9e
|
@ -33,9 +33,11 @@
|
||||||
#include <mach/regs-serial.h>
|
#include <mach/regs-serial.h>
|
||||||
#include <mach/regs-clock.h>
|
#include <mach/regs-clock.h>
|
||||||
#include <mach/regs-ebi.h>
|
#include <mach/regs-ebi.h>
|
||||||
|
#include <mach/regs-timer.h>
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "clock.h"
|
#include "clock.h"
|
||||||
|
#include "nuc9xx.h"
|
||||||
|
|
||||||
/* Initial IO mappings */
|
/* Initial IO mappings */
|
||||||
|
|
||||||
|
@ -222,3 +224,17 @@ void __init nuc900_init_clocks(void)
|
||||||
clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs));
|
clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WTCR (TMR_BA + 0x1C)
|
||||||
|
#define WTCLK (1 << 10)
|
||||||
|
#define WTE (1 << 7)
|
||||||
|
#define WTRE (1 << 1)
|
||||||
|
|
||||||
|
void nuc9xx_restart(char mode, const char *cmd)
|
||||||
|
{
|
||||||
|
if (mode == 's') {
|
||||||
|
/* Jump into ROM at address 0 */
|
||||||
|
soft_restart(0);
|
||||||
|
} else {
|
||||||
|
__raw_writel(WTE | WTRE | WTCLK, WTCR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -14,28 +14,11 @@
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/io.h>
|
|
||||||
#include <asm/proc-fns.h>
|
|
||||||
#include <mach/map.h>
|
|
||||||
#include <mach/regs-timer.h>
|
|
||||||
|
|
||||||
#define WTCR (TMR_BA + 0x1C)
|
|
||||||
#define WTCLK (1 << 10)
|
|
||||||
#define WTE (1 << 7)
|
|
||||||
#define WTRE (1 << 1)
|
|
||||||
|
|
||||||
static void arch_idle(void)
|
static void arch_idle(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arch_reset(char mode, const char *cmd)
|
static void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
if (mode == 's') {
|
|
||||||
/* Jump into ROM at address 0 */
|
|
||||||
soft_restart(0);
|
|
||||||
} else {
|
|
||||||
__raw_writel(WTE | WTRE | WTCLK, WTCR);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB")
|
||||||
.init_irq = nuc900_init_irq,
|
.init_irq = nuc900_init_irq,
|
||||||
.init_machine = nuc910evb_init,
|
.init_machine = nuc910evb_init,
|
||||||
.timer = &nuc900_timer,
|
.timer = &nuc900_timer,
|
||||||
|
.restart = nuc9xx_restart,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
|
@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB")
|
||||||
.init_irq = nuc900_init_irq,
|
.init_irq = nuc900_init_irq,
|
||||||
.init_machine = nuc950evb_init,
|
.init_machine = nuc950evb_init,
|
||||||
.timer = &nuc900_timer,
|
.timer = &nuc900_timer,
|
||||||
|
.restart = nuc9xx_restart,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
|
@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB")
|
||||||
.init_irq = nuc900_init_irq,
|
.init_irq = nuc900_init_irq,
|
||||||
.init_machine = nuc960evb_init,
|
.init_machine = nuc960evb_init,
|
||||||
.timer = &nuc900_timer,
|
.timer = &nuc900_timer,
|
||||||
|
.restart = nuc9xx_restart,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
|
@ -21,3 +21,4 @@ struct sys_timer;
|
||||||
|
|
||||||
extern void nuc900_init_irq(void);
|
extern void nuc900_init_irq(void);
|
||||||
extern struct sys_timer nuc900_timer;
|
extern struct sys_timer nuc900_timer;
|
||||||
|
extern void nuc9xx_restart(char, const char *);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче