blob: 594e4f06892eea200e57b742eb380618d35c4eef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
.. SPDX-License-Identifier: GPL-2.0+:
unbind command
==============
Synopsis
--------
::
unbind <node path>
unbind <class> <index>
unbind <class> <index> <driver>
Description
-----------
The unbind command is used to unbind a device from a driver. This makes the
device unavailable in U-Boot.
node path
path of the device's device-tree node
class
device class name
index
index of the device in the device class
driver
device driver name
Example
-------
Given a system with a real time clock device with device path */pl031@9010000*
and using driver rtc-pl031 unbinding and binding of the device is demonstrated
using the three alternative unbind syntaxes.
.. code-block::
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
...
rtc 0 [ ] rtc-pl031 |-- pl031@9010000
...
=> fdt addr $fdtcontroladdr
Working FDT set to 7ed7fdb0
=> fdt print
/ {
interrupt-parent = <0x00008003>;
model = "linux,dummy-virt";
#size-cells = <0x00000002>;
#address-cells = <0x00000002>;
compatible = "linux,dummy-virt";
...
pl031@9010000 {
clock-names = "apb_pclk";
clocks = <0x00008000>;
interrupts = <0x00000000 0x00000002 0x00000004>;
reg = <0x00000000 0x09010000 0x00000000 0x00001000>;
compatible = "arm,pl031", "arm,primecell";
};
...
}
=> unbind /pl031@9010000
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
...
=> unbind /pl031@9010000
Cannot find a device with path /pl031@9010000
=> bind /pl031@9010000 rtc-pl031
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
root 0 [ + ] root_driver root_driver
...
rtc 0 [ ] rtc-pl031 |-- pl031@9010000
=> unbind rtc 0
=> bind /pl031@9010000 rtc-pl031
=> unbind rtc 0 rtc-pl031
Configuration
-------------
The unbind command is only available if CONFIG_CMD_BIND=y.
Return code
-----------
The return code $? is 0 (true) on success and 1 (false) on failure.
|