This source file includes following definitions.
- omap_hdq1w_reset
1
2
3
4
5
6
7
8
9
10
11
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/err.h>
15 #include <linux/platform_device.h>
16
17 #include "soc.h"
18 #include "omap_hwmod.h"
19 #include "omap_device.h"
20 #include "hdq1w.h"
21
22 #include "prm.h"
23 #include "common.h"
24
25
26
27
28
29
30
31
32
33
34
35
36
37 int omap_hdq1w_reset(struct omap_hwmod *oh)
38 {
39 u32 v;
40 int c = 0;
41
42
43 omap_hwmod_softreset(oh);
44
45
46 v = omap_hwmod_read(oh, HDQ_CTRL_STATUS_OFFSET);
47 v |= 1 << HDQ_CTRL_STATUS_CLOCKENABLE_SHIFT;
48 omap_hwmod_write(v, oh, HDQ_CTRL_STATUS_OFFSET);
49
50
51 omap_test_timeout((omap_hwmod_read(oh,
52 oh->class->sysc->syss_offs)
53 & SYSS_RESETDONE_MASK),
54 MAX_MODULE_SOFTRESET_WAIT, c);
55
56 if (c == MAX_MODULE_SOFTRESET_WAIT)
57 pr_warn("%s: %s: softreset failed (waited %d usec)\n",
58 __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
59 else
60 pr_debug("%s: %s: softreset in %d usec\n", __func__,
61 oh->name, c);
62
63 return 0;
64 }