|
21 | 21 | #include "ti_sci_proc.h" |
22 | 22 | #include "ti_k3_common.h" |
23 | 23 |
|
24 | | -/* |
25 | | - * The M4 cores have a local reset that affects only the CPU, and a |
26 | | - * generic module reset that powers on the device and allows the internal |
27 | | - * memories to be accessed while the local reset is asserted. This function is |
28 | | - * used to release the global reset on remote cores to allow loading into the |
29 | | - * internal RAMs. The .prepare() ops is invoked by remoteproc core before any |
30 | | - * firmware loading, and is followed by the .start() ops after loading to |
31 | | - * actually let the remote cores to run. |
32 | | - */ |
33 | | -static int k3_m4_rproc_prepare(struct rproc *rproc) |
34 | | -{ |
35 | | - struct k3_rproc *kproc = rproc->priv; |
36 | | - struct device *dev = kproc->dev; |
37 | | - int ret; |
38 | | - |
39 | | - /* If the core is running already no need to deassert the module reset */ |
40 | | - if (rproc->state == RPROC_DETACHED) |
41 | | - return 0; |
42 | | - |
43 | | - /* |
44 | | - * Ensure the local reset is asserted so the core doesn't |
45 | | - * execute bogus code when the module reset is released. |
46 | | - */ |
47 | | - ret = k3_rproc_reset(kproc); |
48 | | - if (ret) |
49 | | - return ret; |
50 | | - |
51 | | - ret = reset_control_status(kproc->reset); |
52 | | - if (ret <= 0) { |
53 | | - dev_err(dev, "local reset still not asserted\n"); |
54 | | - return ret; |
55 | | - } |
56 | | - |
57 | | - ret = kproc->ti_sci->ops.dev_ops.get_device(kproc->ti_sci, |
58 | | - kproc->ti_sci_id); |
59 | | - if (ret) { |
60 | | - dev_err(dev, "could not deassert module-reset for internal RAM loading\n"); |
61 | | - return ret; |
62 | | - } |
63 | | - |
64 | | - return 0; |
65 | | -} |
66 | | - |
67 | 24 | /* |
68 | 25 | * This function implements the .unprepare() ops and performs the complimentary |
69 | 26 | * operations to that of the .prepare() ops. The function is used to assert the |
@@ -368,7 +325,7 @@ static int k3_m4_rproc_detach(struct rproc *rproc) |
368 | 325 | } |
369 | 326 |
|
370 | 327 | static const struct rproc_ops k3_m4_rproc_ops = { |
371 | | - .prepare = k3_m4_rproc_prepare, |
| 328 | + .prepare = k3_rproc_prepare, |
372 | 329 | .unprepare = k3_m4_rproc_unprepare, |
373 | 330 | .start = k3_m4_rproc_start, |
374 | 331 | .stop = k3_m4_rproc_stop, |
|
0 commit comments