aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-05-08 13:34:27 -0400
committerPaul Walmsley <paul@pwsan.com>2012-05-08 19:25:36 -0400
commit9e1b7498d79ab9076791807172d4603c7be63c1b (patch)
tree0eb9a5537123f3a79c0b87a2c811b1ae2f97815e /arch/arm/plat-omap
parentad1b6662eb5fe293e8b402497b3835710848c389 (diff)
ARM: OMAP2+: HDQ1W: add custom reset function
Implement a custom reset function for the HDQ1W IP block. This is because the HDQ1W IP block, like I2C, has an internal clock gating bit that needs to be toggled after setting the SOFTRESET bit to allow the reset to propagate. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: NeilBrown <neilb@suse.de> Cc: Avinash.H.M <avinashhm@ti.com> Tested-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/hdq1w.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/hdq1w.h b/arch/arm/plat-omap/include/plat/hdq1w.h
new file mode 100644
index 000000000000..0c1efc846d8d
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/hdq1w.h
@@ -0,0 +1,36 @@
1/*
2 * Shared macros and function prototypes for the HDQ1W/1-wire IP block
3 *
4 * Copyright (C) 2012 Texas Instruments, Inc.
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21#ifndef ARCH_ARM_MACH_OMAP2_HDQ1W_H
22#define ARCH_ARM_MACH_OMAP2_HDQ1W_H
23
24#include <plat/omap_hwmod.h>
25
26/*
27 * XXX A future cleanup patch should modify
28 * drivers/w1/masters/omap_hdq.c to use these macros
29 */
30#define HDQ_CTRL_STATUS_OFFSET 0x0c
31#define HDQ_CTRL_STATUS_CLOCKENABLE_SHIFT 5
32
33
34extern int omap_hdq1w_reset(struct omap_hwmod *oh);
35
36#endif