reset.c (ab277121426edca2ee0601fc6318c9467350771e) reset.c (04fef228fb00dd79475a2313f4ba73b4fbfe2faa)
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 */
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/delay.h>
9#include <linux/gpio.h>
10#include <asm/io.h>
11#include <asm/proc-fns.h>
12
13#include <asm/arch/pxa-regs.h>
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation.
5 */
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/delay.h>
9#include <linux/gpio.h>
10#include <asm/io.h>
11#include <asm/proc-fns.h>
12
13#include <asm/arch/pxa-regs.h>
14#include <asm/arch/pxa2xx-regs.h>
15#include <asm/arch/reset.h>
16
14#include <asm/arch/reset.h>
15
16unsigned int reset_status;
17EXPORT_SYMBOL(reset_status);
18
17static void do_hw_reset(void);
18
19static int reset_gpio = -1;
20
21int init_gpio_reset(int gpio)
22{
23 int rc;
24

--- 48 unchanged lines hidden (view full) ---

73 /* Initialize the watchdog and let it fire */
74 OWER = OWER_WME;
75 OSSR = OSSR_M3;
76 OSMR3 = OSCR + 368640; /* ... in 100 ms */
77}
78
79void arch_reset(char mode)
80{
19static void do_hw_reset(void);
20
21static int reset_gpio = -1;
22
23int init_gpio_reset(int gpio)
24{
25 int rc;
26

--- 48 unchanged lines hidden (view full) ---

75 /* Initialize the watchdog and let it fire */
76 OWER = OWER_WME;
77 OSSR = OSSR_M3;
78 OSMR3 = OSCR + 368640; /* ... in 100 ms */
79}
80
81void arch_reset(char mode)
82{
81 if (cpu_is_pxa2xx())
82 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
83 clear_reset_status(RESET_STATUS_ALL);
83
84 switch (mode) {
85 case 's':
86 /* Jump into ROM at address 0 */
87 cpu_reset(0);
88 break;
89 case 'h':
90 do_hw_reset();
91 break;
92 case 'g':
93 do_gpio_reset();
94 break;
95 }
96}
97
84
85 switch (mode) {
86 case 's':
87 /* Jump into ROM at address 0 */
88 cpu_reset(0);
89 break;
90 case 'h':
91 do_hw_reset();
92 break;
93 case 'g':
94 do_gpio_reset();
95 break;
96 }
97}
98