2006-01-10 01:05:41 +08:00
|
|
|
/*
|
2007-02-05 18:42:07 +08:00
|
|
|
* arch/arm/mach-at91/at91rm9200.c
|
2006-01-10 01:05:41 +08:00
|
|
|
*
|
|
|
|
* Copyright (C) 2005 SAN People
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
2013-10-11 15:37:45 +08:00
|
|
|
#include <linux/clk/at91_pmc.h>
|
2006-01-10 01:05:41 +08:00
|
|
|
|
|
|
|
#include <asm/mach/map.h>
|
2012-03-29 01:30:01 +08:00
|
|
|
#include <asm/system_misc.h>
|
2008-08-05 23:14:15 +08:00
|
|
|
#include <mach/at91_st.h>
|
2013-11-14 17:49:19 +08:00
|
|
|
#include <mach/hardware.h>
|
2006-01-10 01:05:41 +08:00
|
|
|
|
2011-04-23 15:28:34 +08:00
|
|
|
#include "soc.h"
|
2006-06-19 22:26:51 +08:00
|
|
|
#include "generic.h"
|
2006-09-27 17:50:59 +08:00
|
|
|
|
2011-08-02 22:21:36 +08:00
|
|
|
static void at91rm9200_idle(void)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Disable the processor clock. The processor will be automatically
|
|
|
|
* re-enabled by an interrupt or by a reset.
|
|
|
|
*/
|
2011-11-25 09:59:46 +08:00
|
|
|
at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK);
|
2011-08-02 22:21:36 +08:00
|
|
|
}
|
|
|
|
|
2013-07-09 07:01:40 +08:00
|
|
|
static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
|
2006-11-30 17:01:47 +08:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Perform a hardware reset with the use of the Watchdog timer.
|
|
|
|
*/
|
2012-02-20 18:07:39 +08:00
|
|
|
at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
|
|
|
|
at91_st_write(AT91_ST_CR, AT91_ST_WDRST);
|
2006-11-30 17:01:47 +08:00
|
|
|
}
|
|
|
|
|
2006-09-27 17:50:59 +08:00
|
|
|
/* --------------------------------------------------------------------
|
|
|
|
* AT91RM9200 processor initialization
|
|
|
|
* -------------------------------------------------------------------- */
|
|
|
|
|
2011-04-24 18:20:28 +08:00
|
|
|
static void __init at91rm9200_initialize(void)
|
2011-04-28 20:19:32 +08:00
|
|
|
{
|
2011-08-02 22:21:36 +08:00
|
|
|
arm_pm_idle = at91rm9200_idle;
|
2011-11-03 17:53:29 +08:00
|
|
|
arm_pm_restart = at91rm9200_restart;
|
2006-01-10 01:05:41 +08:00
|
|
|
}
|
|
|
|
|
2006-09-27 20:23:00 +08:00
|
|
|
|
2013-03-22 21:24:09 +08:00
|
|
|
AT91_SOC_START(at91rm9200)
|
2011-04-23 15:28:34 +08:00
|
|
|
.init = at91rm9200_initialize,
|
2012-08-16 17:36:55 +08:00
|
|
|
AT91_SOC_END
|