Commit Graph

13 Commits

Author SHA1 Message Date
Joseph Chen e1e885d399 misc: decompress: correct size_src and size_dst usage
We misunderstood the size_src as decompressed image size.

Without this patch, the decompress can work normally, but
it wastes the time to flush data cache. Let's correct it
for thunder boot version to save boot time.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I93014ccec7814faec5abbe96b383bc1170cdb0e2
2020-08-20 15:04:37 +08:00
Joseph Chen 656bdb598a misc: decompress: add/update API
- Support get gunzip data size from src data;
- Support sync decompress for this round;
- Support return the gunzip data size of compressed image.
- Add misc_decompress_cleanup() for waiting last decompress done.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie84b2a6174d04592110333d66667da66f98f07f6
2020-07-24 18:02:27 +08:00
Jason Zhu 4298c19d4f misc: decompress: add function misc_decompress_process()
Use it to decompress data.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I189cded00069cc9f559097811733a481aae8d08f
2020-06-18 10:34:30 +08:00
Jason Zhu 809af6ba3d misc: rockchip_decompress: update the decompress driver
1.add DECOM_AXI_STAT to test decompress whether is in idle
2.correct the misc_decompress_is_complete return value

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I904d9909ade709fb479893325dd6c0b3d47d5908
2020-06-18 10:34:04 +08:00
Simon Xue 3cafcfcd6f misc: rockchip_decompress: fix param size
Change-Id: Ia193a6035faff4bab66262cab2e97a3c6b94e45a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-05 11:30:07 +08:00
Joseph Chen 374c241cf9 misc: add a common api to get device by capability
fix: ioctl() should return error code but not capability.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8030a1842692697f32f87e765ce3d68d1adb1c11
2020-04-23 16:17:06 +08:00
Joseph Chen 1cef1b20c4 dm: misc: merge generic header file into misc.h
Puting the generic function declaration together that the
caller don't need care too much about different header file.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ib37d1550e5a747d8f18e30c428ea8f613f9cc006
2020-04-23 16:17:06 +08:00
Jason Zhu 5b7d32987c drivers: misc: use misc_mode to distinguish different device
The misc attach different device. We use the misc_mode to show
different device's capability.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibce5bb0465e452a7e783c5859f1e8ab2bfd8b0c5
2020-04-22 18:08:19 +08:00
Jason Zhu 74dce6fe82 misc: add IOCTL_REQ_CAPABILITY
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I1d1c6a93fd686d1a13450316b1edc09ce19b6dcf
2020-04-15 11:55:40 +08:00
Joseph Chen dbfe5ed512 dm: misc: add ioctl request command definition
Available for caller to call misc_ioctl(...).

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibac22caf80968ecc7f952d04aa2a1a0f8ad3417a
2020-03-02 09:19:32 +08:00
Stephen Warren b647f55420 misc: add "call" uclass op
The call op requests that the callee pass a message to the underlying HW
or device, wait for a response, and then pass back the response error code
and message to the callee. It is useful for drivers that represent some
kind of messaging or IPC channel to a remote device.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-08-12 11:01:22 -06:00
Robert P. J. Day f5abb40997 include: Correct "requset" typoes in misc.h
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
2016-01-08 10:15:42 -05:00
Thomas Chou 4395e06eb9 dm: implement a Miscellaneous uclass
Implement a Miscellaneous uclass with generic read or
write operations. This class is used only for those
do not fit other more general classes.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
2015-10-23 07:37:03 +08:00