diff options
Diffstat (limited to 'arch/arm/mach-highbank/highbank.c')
-rw-r--r-- | arch/arm/mach-highbank/highbank.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index b3d7e5634b83..bd3bf66ce344 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -17,12 +17,15 @@ | |||
17 | #include <linux/clkdev.h> | 17 | #include <linux/clkdev.h> |
18 | #include <linux/clocksource.h> | 18 | #include <linux/clocksource.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/input.h> | ||
20 | #include <linux/io.h> | 21 | #include <linux/io.h> |
21 | #include <linux/irqchip.h> | 22 | #include <linux/irqchip.h> |
23 | #include <linux/mailbox.h> | ||
22 | #include <linux/of.h> | 24 | #include <linux/of.h> |
23 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
24 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
25 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/reboot.h> | ||
26 | #include <linux/amba/bus.h> | 29 | #include <linux/amba/bus.h> |
27 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
28 | 31 | ||
@@ -130,6 +133,24 @@ static struct platform_device highbank_cpuidle_device = { | |||
130 | .name = "cpuidle-calxeda", | 133 | .name = "cpuidle-calxeda", |
131 | }; | 134 | }; |
132 | 135 | ||
136 | static int hb_keys_notifier(struct notifier_block *nb, unsigned long event, void *data) | ||
137 | { | ||
138 | u32 key = *(u32 *)data; | ||
139 | |||
140 | if (event != 0x1000) | ||
141 | return 0; | ||
142 | |||
143 | if (key == KEY_POWER) | ||
144 | orderly_poweroff(false); | ||
145 | else if (key == 0xffff) | ||
146 | ctrl_alt_del(); | ||
147 | |||
148 | return 0; | ||
149 | } | ||
150 | static struct notifier_block hb_keys_nb = { | ||
151 | .notifier_call = hb_keys_notifier, | ||
152 | }; | ||
153 | |||
133 | static void __init highbank_init(void) | 154 | static void __init highbank_init(void) |
134 | { | 155 | { |
135 | struct device_node *np; | 156 | struct device_node *np; |
@@ -145,6 +166,8 @@ static void __init highbank_init(void) | |||
145 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); | 166 | bus_register_notifier(&platform_bus_type, &highbank_platform_nb); |
146 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); | 167 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); |
147 | 168 | ||
169 | pl320_ipc_register_notifier(&hb_keys_nb); | ||
170 | |||
148 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 171 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
149 | 172 | ||
150 | if (psci_ops.cpu_suspend) | 173 | if (psci_ops.cpu_suspend) |