diff options
Diffstat (limited to 'arch/arm/mach-prima2/rstc.c')
-rw-r--r-- | arch/arm/mach-prima2/rstc.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c index e1f1f86f6a95..7c251eb11d01 100644 --- a/arch/arm/mach-prima2/rstc.c +++ b/arch/arm/mach-prima2/rstc.c | |||
@@ -34,36 +34,20 @@ static int sirfsoc_reset_module(struct reset_controller_dev *rcdev, | |||
34 | 34 | ||
35 | mutex_lock(&rstc_lock); | 35 | mutex_lock(&rstc_lock); |
36 | 36 | ||
37 | if (of_device_is_compatible(rcdev->of_node, "sirf,prima2-rstc")) { | 37 | /* |
38 | /* | 38 | * Writing 1 to this bit resets corresponding block. |
39 | * Writing 1 to this bit resets corresponding block. | 39 | * Writing 0 to this bit de-asserts reset signal of the |
40 | * Writing 0 to this bit de-asserts reset signal of the | 40 | * corresponding block. datasheet doesn't require explicit |
41 | * corresponding block. datasheet doesn't require explicit | 41 | * delay between the set and clear of reset bit. it could |
42 | * delay between the set and clear of reset bit. it could | 42 | * be shorter if tests pass. |
43 | * be shorter if tests pass. | 43 | */ |
44 | */ | 44 | writel(readl(sirfsoc_rstc_base + |
45 | writel(readl(sirfsoc_rstc_base + | ||
46 | (reset_bit / 32) * 4) | (1 << reset_bit), | 45 | (reset_bit / 32) * 4) | (1 << reset_bit), |
47 | sirfsoc_rstc_base + (reset_bit / 32) * 4); | 46 | sirfsoc_rstc_base + (reset_bit / 32) * 4); |
48 | msleep(20); | 47 | msleep(20); |
49 | writel(readl(sirfsoc_rstc_base + | 48 | writel(readl(sirfsoc_rstc_base + |
50 | (reset_bit / 32) * 4) & ~(1 << reset_bit), | 49 | (reset_bit / 32) * 4) & ~(1 << reset_bit), |
51 | sirfsoc_rstc_base + (reset_bit / 32) * 4); | 50 | sirfsoc_rstc_base + (reset_bit / 32) * 4); |
52 | } else { | ||
53 | /* | ||
54 | * For MARCO and POLO | ||
55 | * Writing 1 to SET register resets corresponding block. | ||
56 | * Writing 1 to CLEAR register de-asserts reset signal of the | ||
57 | * corresponding block. | ||
58 | * datasheet doesn't require explicit delay between the set and | ||
59 | * clear of reset bit. it could be shorter if tests pass. | ||
60 | */ | ||
61 | writel(1 << reset_bit, | ||
62 | sirfsoc_rstc_base + (reset_bit / 32) * 8); | ||
63 | msleep(20); | ||
64 | writel(1 << reset_bit, | ||
65 | sirfsoc_rstc_base + (reset_bit / 32) * 8 + 4); | ||
66 | } | ||
67 | 51 | ||
68 | mutex_unlock(&rstc_lock); | 52 | mutex_unlock(&rstc_lock); |
69 | 53 | ||
@@ -106,7 +90,6 @@ static int sirfsoc_rstc_probe(struct platform_device *pdev) | |||
106 | 90 | ||
107 | static const struct of_device_id rstc_ids[] = { | 91 | static const struct of_device_id rstc_ids[] = { |
108 | { .compatible = "sirf,prima2-rstc" }, | 92 | { .compatible = "sirf,prima2-rstc" }, |
109 | { .compatible = "sirf,marco-rstc" }, | ||
110 | {}, | 93 | {}, |
111 | }; | 94 | }; |
112 | 95 | ||