blob: 532d57d6eb73389ac079edf04f57f3179ced7568 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13/*
14 * MSM architecture driver to control arm halt behavior
15 */
16
17#include <linux/module.h>
18#include <linux/debugfs.h>
19#include <linux/fs.h>
20#include <asm/system.h>
21
22static int set_nohalt(void *data, u64 val)
23{
24 if (val)
25 disable_hlt();
26 else
27 enable_hlt();
28 return 0;
29}
30
31DEFINE_SIMPLE_ATTRIBUTE(nohalt_ops, NULL, set_nohalt, "%llu\n");
32
33static int __init init_hlt_debug(void)
34{
35 debugfs_create_file("nohlt", 0200, NULL, NULL, &nohalt_ops);
36
37 return 0;
38}
39
40late_initcall(init_hlt_debug);