[ARM] 4903/1: [AT91] SAM9/CAP9 system shutdown
Enable system shutdown/power-off on AT91SAM9 and AT91CAP9 based boards. This does not require power-management to be enabled, and the pm_power_off method can be overridden in board-specific files if necessary. Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Este commit está contenido en:

cometido por
Russell King

padre
b78eabde89
commit
3ef2fb4267
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
@@ -18,6 +19,7 @@
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_shdwc.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
@@ -267,6 +269,11 @@ static void at91sam9260_reset(void)
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
|
||||
}
|
||||
|
||||
static void at91sam9260_poweroff(void)
|
||||
{
|
||||
at91_sys_write(AT91_SHDW_CR, AT91_SHDW_KEY | AT91_SHDW_SHDW);
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* AT91SAM9260 processor initialization
|
||||
@@ -304,6 +311,7 @@ void __init at91sam9260_initialize(unsigned long main_clock)
|
||||
iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
|
||||
|
||||
at91_arch_reset = at91sam9260_reset;
|
||||
pm_power_off = at91sam9260_poweroff;
|
||||
at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
|
||||
| (1 << AT91SAM9260_ID_IRQ2);
|
||||
|
||||
|
Referencia en una nueva incidencia
Block a user