diff options
author | Ming Lei <ming.lei@canonical.com> | 2012-10-23 22:49:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-25 14:53:36 -0400 |
commit | 10bd4c7572b6c6eb97f1c15dedd2d36c63907f91 (patch) | |
tree | 01c09c3f0cc9e8dbd351ae34580f5cd873272b11 /Documentation/firmware_class | |
parent | 66081a72517a131430dcf986775f3268aafcb546 (diff) |
firmware loader: document kernel direct loading
This patch adds description on recently introduced direct firmware
loading by Linus.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/firmware_class')
-rw-r--r-- | Documentation/firmware_class/README | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README index 7eceaff63f5f..815b711bcd85 100644 --- a/Documentation/firmware_class/README +++ b/Documentation/firmware_class/README | |||
@@ -18,32 +18,40 @@ | |||
18 | High level behavior (mixed): | 18 | High level behavior (mixed): |
19 | ============================ | 19 | ============================ |
20 | 20 | ||
21 | kernel(driver): calls request_firmware(&fw_entry, $FIRMWARE, device) | 21 | 1), kernel(driver): |
22 | 22 | - calls request_firmware(&fw_entry, $FIRMWARE, device) | |
23 | userspace: | 23 | - kernel searchs the fimware image with name $FIRMWARE directly |
24 | in the below search path of root filesystem: | ||
25 | "/lib/firmware/updates/" UTS_RELEASE, | ||
26 | "/lib/firmware/updates", | ||
27 | "/lib/firmware/" UTS_RELEASE, | ||
28 | "/lib/firmware" | ||
29 | - If found, goto 7), else goto 2) | ||
30 | |||
31 | 2), userspace: | ||
24 | - /sys/class/firmware/xxx/{loading,data} appear. | 32 | - /sys/class/firmware/xxx/{loading,data} appear. |
25 | - hotplug gets called with a firmware identifier in $FIRMWARE | 33 | - hotplug gets called with a firmware identifier in $FIRMWARE |
26 | and the usual hotplug environment. | 34 | and the usual hotplug environment. |
27 | - hotplug: echo 1 > /sys/class/firmware/xxx/loading | 35 | - hotplug: echo 1 > /sys/class/firmware/xxx/loading |
28 | 36 | ||
29 | kernel: Discard any previous partial load. | 37 | 3), kernel: Discard any previous partial load. |
30 | 38 | ||
31 | userspace: | 39 | 4), userspace: |
32 | - hotplug: cat appropriate_firmware_image > \ | 40 | - hotplug: cat appropriate_firmware_image > \ |
33 | /sys/class/firmware/xxx/data | 41 | /sys/class/firmware/xxx/data |
34 | 42 | ||
35 | kernel: grows a buffer in PAGE_SIZE increments to hold the image as it | 43 | 5), kernel: grows a buffer in PAGE_SIZE increments to hold the image as it |
36 | comes in. | 44 | comes in. |
37 | 45 | ||
38 | userspace: | 46 | 6), userspace: |
39 | - hotplug: echo 0 > /sys/class/firmware/xxx/loading | 47 | - hotplug: echo 0 > /sys/class/firmware/xxx/loading |
40 | 48 | ||
41 | kernel: request_firmware() returns and the driver has the firmware | 49 | 7), kernel: request_firmware() returns and the driver has the firmware |
42 | image in fw_entry->{data,size}. If something went wrong | 50 | image in fw_entry->{data,size}. If something went wrong |
43 | request_firmware() returns non-zero and fw_entry is set to | 51 | request_firmware() returns non-zero and fw_entry is set to |
44 | NULL. | 52 | NULL. |
45 | 53 | ||
46 | kernel(driver): Driver code calls release_firmware(fw_entry) releasing | 54 | 8), kernel(driver): Driver code calls release_firmware(fw_entry) releasing |
47 | the firmware image and any related resource. | 55 | the firmware image and any related resource. |
48 | 56 | ||
49 | High level behavior (driver code): | 57 | High level behavior (driver code): |