aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-08-19 18:18:18 -0400
committerRalf Baechle <ralf@linux-mips.org>2017-09-04 15:19:02 -0400
commitba73f0bcced372ca6d438a4c569f61c40f2702ce (patch)
treefadf45674be04f3b7ac7bb48592670c5b4291c35
parent79797b6fadf4d2b6ea639406e08c8ce1f259f6ae (diff)
MIPS: lantiq: remove old reset controller implementation
This code is now replaced by a reset controller in drivers/reset/reset- lantiq-rcu.c. The old code was never used anyway. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: martin.blumenstingl@googlemail.com Cc: john@phrozen.org Cc: robh@kernel.org Cc: andy.shevchenko@gmail.com Cc: p.zabel@pengutronix.de Cc: kishon@ti.com Cc: mark.rutland@arm.com Cc: linux-mips@linux-mips.org Cc: linux-mtd@lists.infradead.org Cc: linux-watchdog@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-spi@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17124/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/lantiq/xway/reset.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c
index 2dedcf939901..5cb9309b0047 100644
--- a/arch/mips/lantiq/xway/reset.c
+++ b/arch/mips/lantiq/xway/reset.c
@@ -194,74 +194,6 @@ int xrx200_gphy_boot(struct device *dev, unsigned int id, dma_addr_t dev_addr)
194 return 0; 194 return 0;
195} 195}
196 196
197/* reset a io domain for u micro seconds */
198void ltq_reset_once(unsigned int module, ulong u)
199{
200 ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) | module, RCU_RST_REQ);
201 udelay(u);
202 ltq_rcu_w32(ltq_rcu_r32(RCU_RST_REQ) & ~module, RCU_RST_REQ);
203}
204
205static int ltq_assert_device(struct reset_controller_dev *rcdev,
206 unsigned long id)
207{
208 u32 val;
209
210 if (id < 8)
211 return -1;
212
213 val = ltq_rcu_r32(RCU_RST_REQ);
214 val |= BIT(id);
215 ltq_rcu_w32(val, RCU_RST_REQ);
216
217 return 0;
218}
219
220static int ltq_deassert_device(struct reset_controller_dev *rcdev,
221 unsigned long id)
222{
223 u32 val;
224
225 if (id < 8)
226 return -1;
227
228 val = ltq_rcu_r32(RCU_RST_REQ);
229 val &= ~BIT(id);
230 ltq_rcu_w32(val, RCU_RST_REQ);
231
232 return 0;
233}
234
235static int ltq_reset_device(struct reset_controller_dev *rcdev,
236 unsigned long id)
237{
238 ltq_assert_device(rcdev, id);
239 return ltq_deassert_device(rcdev, id);
240}
241
242static const struct reset_control_ops reset_ops = {
243 .reset = ltq_reset_device,
244 .assert = ltq_assert_device,
245 .deassert = ltq_deassert_device,
246};
247
248static struct reset_controller_dev reset_dev = {
249 .ops = &reset_ops,
250 .owner = THIS_MODULE,
251 .nr_resets = 32,
252 .of_reset_n_cells = 1,
253};
254
255void ltq_rst_init(void)
256{
257 reset_dev.of_node = of_find_compatible_node(NULL, NULL,
258 "lantiq,xway-reset");
259 if (!reset_dev.of_node)
260 pr_err("Failed to find reset controller node");
261 else
262 reset_controller_register(&reset_dev);
263}
264
265static void ltq_machine_restart(char *command) 197static void ltq_machine_restart(char *command)
266{ 198{
267 u32 val = ltq_rcu_r32(RCU_RST_REQ); 199 u32 val = ltq_rcu_r32(RCU_RST_REQ);